Class: Google::Apis::AdexchangebuyerV1_2::AdExchangeBuyerService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::AdexchangebuyerV1_2::AdExchangeBuyerService
- 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.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#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.
-
#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.
-
#initialize ⇒ AdExchangeBuyerService
constructor
A new instance of AdExchangeBuyerService.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ AdExchangeBuyerService
Returns a new instance of AdExchangeBuyerService
52 53 54 55 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 52 def initialize super('https://www.googleapis.com/', 'adexchangebuyer/v1.2/') @batch_path = 'batch/adexchangebuyer/v1.2' end |
Instance Attribute Details
#key ⇒ String
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.
39 40 41 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
45 46 47 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 45 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
50 51 52 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 50 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.
81 82 83 84 85 86 87 88 89 90 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 81 def get_account(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'accounts/{id}', ) 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.
227 228 229 230 231 232 233 234 235 236 237 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 227 def get_creative(account_id, buyer_creative_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'creatives/{accountId}/{buyerCreativeId}', ) command.response_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation command.response_class = Google::Apis::AdexchangebuyerV1_2::Creative command.params['accountId'] = account_id unless account_id.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.
262 263 264 265 266 267 268 269 270 271 272 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 262 def insert_creative(creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'creatives', ) 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.
114 115 116 117 118 119 120 121 122 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 114 def list_accounts(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'accounts', ) 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.
306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 306 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', ) 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.
149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 149 def patch_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'accounts/{id}', ) command.request_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation command.request_object = account_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.
187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'generated/google/apis/adexchangebuyer_v1_2/service.rb', line 187 def update_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'accounts/{id}', ) command.request_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation command.request_object = account_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 |