Class: Google::Apis::AdexchangebuyerV1_2::AdExchangeBuyerService

Inherits:
Core::BaseService show all
Defined in:
generated/google/apis/adexchangebuyer_v1_2/service.rb

Overview

Ad Exchange Buyer API

Accesses your bidding-account information, submits creatives for validation, finds available direct deals, and retrieves performance reports.

Examples:

require 'google/apis/adexchangebuyer_v1_2'

Adexchangebuyer = Google::Apis::AdexchangebuyerV1_2 # Alias the module
service = Adexchangebuyer::AdExchangeBuyerService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeAdExchangeBuyerService

Returns a new instance of AdExchangeBuyerService



50
51
52
53
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 50

def initialize
  super('https://www.googleapis.com/', 'adexchangebuyer/v1.2/')
  @batch_path = 'batch/adexchangebuyer/v1.2'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



39
40
41
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 39

def key
  @key
end

#quota_userString

Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.



44
45
46
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 44

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.



48
49
50
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 48

def user_ip
  @user_ip
end

Instance Method Details

#get_account(id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdexchangebuyerV1_2::Account

Gets one account by ID.

Parameters:

  • id (Fixnum)

    The account id

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



77
78
79
80
81
82
83
84
85
86
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 77

def (id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'accounts/{id}', options)
  command.response_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
  command.response_class = Google::Apis::AdexchangebuyerV1_2::Account
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_creative(account_id, buyer_creative_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdexchangebuyerV1_2::Creative

Gets the status for a single creative. A creative will be available 30-40 minutes after submission.

Parameters:

  • account_id (Fixnum)

    The id for the account that will serve this creative.

  • buyer_creative_id (String)

    The buyer-specific id for this creative.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



215
216
217
218
219
220
221
222
223
224
225
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 215

def get_creative(, buyer_creative_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'creatives/{accountId}/{buyerCreativeId}', options)
  command.response_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation
  command.response_class = Google::Apis::AdexchangebuyerV1_2::Creative
  command.params['accountId'] =  unless .nil?
  command.params['buyerCreativeId'] = buyer_creative_id unless buyer_creative_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_creative(creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdexchangebuyerV1_2::Creative

Submit a new creative.

Parameters:

  • creative_object (Google::Apis::AdexchangebuyerV1_2::Creative) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



248
249
250
251
252
253
254
255
256
257
258
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 248

def insert_creative(creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:post, 'creatives', options)
  command.request_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation
  command.request_object = creative_object
  command.response_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation
  command.response_class = Google::Apis::AdexchangebuyerV1_2::Creative
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_accounts(fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdexchangebuyerV1_2::AccountsList

Retrieves the authenticated user's list of accounts.

Parameters:

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



108
109
110
111
112
113
114
115
116
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 108

def list_accounts(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'accounts', options)
  command.response_representation = Google::Apis::AdexchangebuyerV1_2::AccountsList::Representation
  command.response_class = Google::Apis::AdexchangebuyerV1_2::AccountsList
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_creatives(max_results: nil, page_token: nil, status_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdexchangebuyerV1_2::CreativesList

Retrieves a list of the authenticated user's active creatives. A creative will be available 30-40 minutes after submission.

Parameters:

  • max_results (Fixnum)

    Maximum number of entries returned on one result page. If not set, the default is 100. Optional.

  • page_token (String)

    A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional.

  • status_filter (String)

    When specified, only creatives having the given status are returned.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



290
291
292
293
294
295
296
297
298
299
300
301
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 290

def list_creatives(max_results: nil, page_token: nil, status_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:get, 'creatives', options)
  command.response_representation = Google::Apis::AdexchangebuyerV1_2::CreativesList::Representation
  command.response_class = Google::Apis::AdexchangebuyerV1_2::CreativesList
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['statusFilter'] = status_filter unless status_filter.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdexchangebuyerV1_2::Account

Updates an existing account. This method supports patch semantics.

Parameters:

  • id (Fixnum)

    The account id

  • account_object (Google::Apis::AdexchangebuyerV1_2::Account) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



141
142
143
144
145
146
147
148
149
150
151
152
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 141

def (id,  = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'accounts/{id}', options)
  command.request_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
  command.request_object = 
  command.response_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
  command.response_class = Google::Apis::AdexchangebuyerV1_2::Account
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::AdexchangebuyerV1_2::Account

Updates an existing account.

Parameters:

  • id (Fixnum)

    The account id

  • account_object (Google::Apis::AdexchangebuyerV1_2::Account) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



177
178
179
180
181
182
183
184
185
186
187
188
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 177

def (id,  = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command =  make_simple_command(:put, 'accounts/{id}', options)
  command.request_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
  command.request_object = 
  command.response_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
  command.response_class = Google::Apis::AdexchangebuyerV1_2::Account
  command.params['id'] = id unless id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end