google-apis-adexchangebuyer_v1_2 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-adexchangebuyer_v1_2.rb +15 -0
- data/lib/google/apis/adexchangebuyer_v1_2.rb +37 -0
- data/lib/google/apis/adexchangebuyer_v1_2/classes.rb +457 -0
- data/lib/google/apis/adexchangebuyer_v1_2/gem_version.rb +28 -0
- data/lib/google/apis/adexchangebuyer_v1_2/representations.rb +189 -0
- data/lib/google/apis/adexchangebuyer_v1_2/service.rb +315 -0
- metadata +76 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Apis
|
17
|
+
module AdexchangebuyerV1_2
|
18
|
+
# Version of the google-apis-adexchangebuyer_v1_2 gem
|
19
|
+
GEM_VERSION = "0.1.0"
|
20
|
+
|
21
|
+
# Version of the code generator used to generate this client
|
22
|
+
GENERATOR_VERSION = "0.1.1"
|
23
|
+
|
24
|
+
# Revision of the discovery document this client was generated from
|
25
|
+
REVISION = "20180222"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,189 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module AdexchangebuyerV1_2
|
24
|
+
|
25
|
+
class Account
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
class BidderLocation
|
29
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
30
|
+
|
31
|
+
include Google::Apis::Core::JsonObjectSupport
|
32
|
+
end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class AccountsList
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class Creative
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
class Correction
|
47
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
48
|
+
|
49
|
+
include Google::Apis::Core::JsonObjectSupport
|
50
|
+
end
|
51
|
+
|
52
|
+
class DisapprovalReason
|
53
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
54
|
+
|
55
|
+
include Google::Apis::Core::JsonObjectSupport
|
56
|
+
end
|
57
|
+
|
58
|
+
class FilteringReasons
|
59
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
60
|
+
|
61
|
+
class Reason
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
|
64
|
+
include Google::Apis::Core::JsonObjectSupport
|
65
|
+
end
|
66
|
+
|
67
|
+
include Google::Apis::Core::JsonObjectSupport
|
68
|
+
end
|
69
|
+
|
70
|
+
include Google::Apis::Core::JsonObjectSupport
|
71
|
+
end
|
72
|
+
|
73
|
+
class CreativesList
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
|
76
|
+
include Google::Apis::Core::JsonObjectSupport
|
77
|
+
end
|
78
|
+
|
79
|
+
class Account
|
80
|
+
# @private
|
81
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
82
|
+
collection :bidder_location, as: 'bidderLocation', class: Google::Apis::AdexchangebuyerV1_2::Account::BidderLocation, decorator: Google::Apis::AdexchangebuyerV1_2::Account::BidderLocation::Representation
|
83
|
+
|
84
|
+
property :cookie_matching_nid, as: 'cookieMatchingNid'
|
85
|
+
property :cookie_matching_url, as: 'cookieMatchingUrl'
|
86
|
+
property :id, as: 'id'
|
87
|
+
property :kind, as: 'kind'
|
88
|
+
property :maximum_active_creatives, as: 'maximumActiveCreatives'
|
89
|
+
property :maximum_total_qps, as: 'maximumTotalQps'
|
90
|
+
property :number_active_creatives, as: 'numberActiveCreatives'
|
91
|
+
end
|
92
|
+
|
93
|
+
class BidderLocation
|
94
|
+
# @private
|
95
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
96
|
+
property :maximum_qps, as: 'maximumQps'
|
97
|
+
property :region, as: 'region'
|
98
|
+
property :url, as: 'url'
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class AccountsList
|
104
|
+
# @private
|
105
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
106
|
+
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_2::Account, decorator: Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
107
|
+
|
108
|
+
property :kind, as: 'kind'
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
class Creative
|
113
|
+
# @private
|
114
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
115
|
+
property :html_snippet, as: 'HTMLSnippet'
|
116
|
+
property :account_id, as: 'accountId'
|
117
|
+
collection :advertiser_id, as: 'advertiserId'
|
118
|
+
property :advertiser_name, as: 'advertiserName'
|
119
|
+
property :agency_id, :numeric_string => true, as: 'agencyId'
|
120
|
+
property :api_upload_timestamp, as: 'apiUploadTimestamp', type: DateTime
|
121
|
+
|
122
|
+
collection :attribute, as: 'attribute'
|
123
|
+
property :buyer_creative_id, as: 'buyerCreativeId'
|
124
|
+
collection :click_through_url, as: 'clickThroughUrl'
|
125
|
+
collection :corrections, as: 'corrections', class: Google::Apis::AdexchangebuyerV1_2::Creative::Correction, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::Correction::Representation
|
126
|
+
|
127
|
+
collection :disapproval_reasons, as: 'disapprovalReasons', class: Google::Apis::AdexchangebuyerV1_2::Creative::DisapprovalReason, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::DisapprovalReason::Representation
|
128
|
+
|
129
|
+
property :filtering_reasons, as: 'filteringReasons', class: Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons::Representation
|
130
|
+
|
131
|
+
property :height, as: 'height'
|
132
|
+
collection :impression_tracking_url, as: 'impressionTrackingUrl'
|
133
|
+
property :kind, as: 'kind'
|
134
|
+
collection :product_categories, as: 'productCategories'
|
135
|
+
collection :restricted_categories, as: 'restrictedCategories'
|
136
|
+
collection :sensitive_categories, as: 'sensitiveCategories'
|
137
|
+
property :status, as: 'status'
|
138
|
+
collection :vendor_type, as: 'vendorType'
|
139
|
+
property :version, as: 'version'
|
140
|
+
property :video_url, as: 'videoURL'
|
141
|
+
property :width, as: 'width'
|
142
|
+
end
|
143
|
+
|
144
|
+
class Correction
|
145
|
+
# @private
|
146
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
147
|
+
collection :details, as: 'details'
|
148
|
+
property :reason, as: 'reason'
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
class DisapprovalReason
|
153
|
+
# @private
|
154
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
155
|
+
collection :details, as: 'details'
|
156
|
+
property :reason, as: 'reason'
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
class FilteringReasons
|
161
|
+
# @private
|
162
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
163
|
+
property :date, as: 'date'
|
164
|
+
collection :reasons, as: 'reasons', class: Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons::Reason, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::FilteringReasons::Reason::Representation
|
165
|
+
|
166
|
+
end
|
167
|
+
|
168
|
+
class Reason
|
169
|
+
# @private
|
170
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
171
|
+
property :filtering_count, :numeric_string => true, as: 'filteringCount'
|
172
|
+
property :filtering_status, as: 'filteringStatus'
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
176
|
+
end
|
177
|
+
|
178
|
+
class CreativesList
|
179
|
+
# @private
|
180
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
181
|
+
collection :items, as: 'items', class: Google::Apis::AdexchangebuyerV1_2::Creative, decorator: Google::Apis::AdexchangebuyerV1_2::Creative::Representation
|
182
|
+
|
183
|
+
property :kind, as: 'kind'
|
184
|
+
property :next_page_token, as: 'nextPageToken'
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
@@ -0,0 +1,315 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module AdexchangebuyerV1_2
|
23
|
+
# Ad Exchange Buyer API
|
24
|
+
#
|
25
|
+
# Accesses your bidding-account information, submits creatives for validation,
|
26
|
+
# finds available direct deals, and retrieves performance reports.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/adexchangebuyer_v1_2'
|
30
|
+
#
|
31
|
+
# Adexchangebuyer = Google::Apis::AdexchangebuyerV1_2 # Alias the module
|
32
|
+
# service = Adexchangebuyer::AdExchangeBuyerService.new
|
33
|
+
#
|
34
|
+
# @see https://developers.google.com/ad-exchange/buyer-rest
|
35
|
+
class AdExchangeBuyerService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
43
|
+
# characters.
|
44
|
+
attr_accessor :quota_user
|
45
|
+
|
46
|
+
# @return [String]
|
47
|
+
# Deprecated. Please use quotaUser instead.
|
48
|
+
attr_accessor :user_ip
|
49
|
+
|
50
|
+
def initialize
|
51
|
+
super('https://www.googleapis.com/', 'adexchangebuyer/v1.2/',
|
52
|
+
client_name: 'google-apis-adexchangebuyer_v1_2',
|
53
|
+
client_version: Google::Apis::AdexchangebuyerV1_2::GEM_VERSION)
|
54
|
+
@batch_path = 'batch/adexchangebuyer/v1.2'
|
55
|
+
end
|
56
|
+
|
57
|
+
# Gets one account by ID.
|
58
|
+
# @param [Fixnum] id
|
59
|
+
# The account id
|
60
|
+
# @param [String] fields
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
62
|
+
# @param [String] quota_user
|
63
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
64
|
+
# characters.
|
65
|
+
# @param [String] user_ip
|
66
|
+
# Deprecated. Please use quotaUser instead.
|
67
|
+
# @param [Google::Apis::RequestOptions] options
|
68
|
+
# Request-specific options
|
69
|
+
#
|
70
|
+
# @yield [result, err] Result & error if block supplied
|
71
|
+
# @yieldparam result [Google::Apis::AdexchangebuyerV1_2::Account] parsed result object
|
72
|
+
# @yieldparam err [StandardError] error object if request failed
|
73
|
+
#
|
74
|
+
# @return [Google::Apis::AdexchangebuyerV1_2::Account]
|
75
|
+
#
|
76
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
77
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
78
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
79
|
+
def get_account(id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
80
|
+
command = make_simple_command(:get, 'accounts/{id}', options)
|
81
|
+
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
82
|
+
command.response_class = Google::Apis::AdexchangebuyerV1_2::Account
|
83
|
+
command.params['id'] = id unless id.nil?
|
84
|
+
command.query['fields'] = fields unless fields.nil?
|
85
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
86
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
87
|
+
execute_or_queue_command(command, &block)
|
88
|
+
end
|
89
|
+
|
90
|
+
# Retrieves the authenticated user's list of accounts.
|
91
|
+
# @param [String] fields
|
92
|
+
# Selector specifying which fields to include in a partial response.
|
93
|
+
# @param [String] quota_user
|
94
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
95
|
+
# characters.
|
96
|
+
# @param [String] user_ip
|
97
|
+
# Deprecated. Please use quotaUser instead.
|
98
|
+
# @param [Google::Apis::RequestOptions] options
|
99
|
+
# Request-specific options
|
100
|
+
#
|
101
|
+
# @yield [result, err] Result & error if block supplied
|
102
|
+
# @yieldparam result [Google::Apis::AdexchangebuyerV1_2::AccountsList] parsed result object
|
103
|
+
# @yieldparam err [StandardError] error object if request failed
|
104
|
+
#
|
105
|
+
# @return [Google::Apis::AdexchangebuyerV1_2::AccountsList]
|
106
|
+
#
|
107
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
108
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
109
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
110
|
+
def list_accounts(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
111
|
+
command = make_simple_command(:get, 'accounts', options)
|
112
|
+
command.response_representation = Google::Apis::AdexchangebuyerV1_2::AccountsList::Representation
|
113
|
+
command.response_class = Google::Apis::AdexchangebuyerV1_2::AccountsList
|
114
|
+
command.query['fields'] = fields unless fields.nil?
|
115
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
116
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
117
|
+
execute_or_queue_command(command, &block)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Updates an existing account. This method supports patch semantics.
|
121
|
+
# @param [Fixnum] id
|
122
|
+
# The account id
|
123
|
+
# @param [Google::Apis::AdexchangebuyerV1_2::Account] account_object
|
124
|
+
# @param [String] fields
|
125
|
+
# Selector specifying which fields to include in a partial response.
|
126
|
+
# @param [String] quota_user
|
127
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
128
|
+
# characters.
|
129
|
+
# @param [String] user_ip
|
130
|
+
# Deprecated. Please use quotaUser instead.
|
131
|
+
# @param [Google::Apis::RequestOptions] options
|
132
|
+
# Request-specific options
|
133
|
+
#
|
134
|
+
# @yield [result, err] Result & error if block supplied
|
135
|
+
# @yieldparam result [Google::Apis::AdexchangebuyerV1_2::Account] parsed result object
|
136
|
+
# @yieldparam err [StandardError] error object if request failed
|
137
|
+
#
|
138
|
+
# @return [Google::Apis::AdexchangebuyerV1_2::Account]
|
139
|
+
#
|
140
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
141
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
142
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
143
|
+
def patch_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
144
|
+
command = make_simple_command(:patch, 'accounts/{id}', options)
|
145
|
+
command.request_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
146
|
+
command.request_object = account_object
|
147
|
+
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
148
|
+
command.response_class = Google::Apis::AdexchangebuyerV1_2::Account
|
149
|
+
command.params['id'] = id unless id.nil?
|
150
|
+
command.query['fields'] = fields unless fields.nil?
|
151
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
152
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
153
|
+
execute_or_queue_command(command, &block)
|
154
|
+
end
|
155
|
+
|
156
|
+
# Updates an existing account.
|
157
|
+
# @param [Fixnum] id
|
158
|
+
# The account id
|
159
|
+
# @param [Google::Apis::AdexchangebuyerV1_2::Account] account_object
|
160
|
+
# @param [String] fields
|
161
|
+
# Selector specifying which fields to include in a partial response.
|
162
|
+
# @param [String] quota_user
|
163
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
164
|
+
# characters.
|
165
|
+
# @param [String] user_ip
|
166
|
+
# Deprecated. Please use quotaUser instead.
|
167
|
+
# @param [Google::Apis::RequestOptions] options
|
168
|
+
# Request-specific options
|
169
|
+
#
|
170
|
+
# @yield [result, err] Result & error if block supplied
|
171
|
+
# @yieldparam result [Google::Apis::AdexchangebuyerV1_2::Account] parsed result object
|
172
|
+
# @yieldparam err [StandardError] error object if request failed
|
173
|
+
#
|
174
|
+
# @return [Google::Apis::AdexchangebuyerV1_2::Account]
|
175
|
+
#
|
176
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
177
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
178
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
179
|
+
def update_account(id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
180
|
+
command = make_simple_command(:put, 'accounts/{id}', options)
|
181
|
+
command.request_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
182
|
+
command.request_object = account_object
|
183
|
+
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Account::Representation
|
184
|
+
command.response_class = Google::Apis::AdexchangebuyerV1_2::Account
|
185
|
+
command.params['id'] = id unless id.nil?
|
186
|
+
command.query['fields'] = fields unless fields.nil?
|
187
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
188
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
189
|
+
execute_or_queue_command(command, &block)
|
190
|
+
end
|
191
|
+
|
192
|
+
# Gets the status for a single creative. A creative will be available 30-40
|
193
|
+
# minutes after submission.
|
194
|
+
# @param [Fixnum] account_id
|
195
|
+
# The id for the account that will serve this creative.
|
196
|
+
# @param [String] buyer_creative_id
|
197
|
+
# The buyer-specific id for this creative.
|
198
|
+
# @param [String] fields
|
199
|
+
# Selector specifying which fields to include in a partial response.
|
200
|
+
# @param [String] quota_user
|
201
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
202
|
+
# characters.
|
203
|
+
# @param [String] user_ip
|
204
|
+
# Deprecated. Please use quotaUser instead.
|
205
|
+
# @param [Google::Apis::RequestOptions] options
|
206
|
+
# Request-specific options
|
207
|
+
#
|
208
|
+
# @yield [result, err] Result & error if block supplied
|
209
|
+
# @yieldparam result [Google::Apis::AdexchangebuyerV1_2::Creative] parsed result object
|
210
|
+
# @yieldparam err [StandardError] error object if request failed
|
211
|
+
#
|
212
|
+
# @return [Google::Apis::AdexchangebuyerV1_2::Creative]
|
213
|
+
#
|
214
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
215
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
216
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
217
|
+
def get_creative(account_id, buyer_creative_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
218
|
+
command = make_simple_command(:get, 'creatives/{accountId}/{buyerCreativeId}', options)
|
219
|
+
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation
|
220
|
+
command.response_class = Google::Apis::AdexchangebuyerV1_2::Creative
|
221
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
222
|
+
command.params['buyerCreativeId'] = buyer_creative_id unless buyer_creative_id.nil?
|
223
|
+
command.query['fields'] = fields unless fields.nil?
|
224
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
225
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
226
|
+
execute_or_queue_command(command, &block)
|
227
|
+
end
|
228
|
+
|
229
|
+
# Submit a new creative.
|
230
|
+
# @param [Google::Apis::AdexchangebuyerV1_2::Creative] creative_object
|
231
|
+
# @param [String] fields
|
232
|
+
# Selector specifying which fields to include in a partial response.
|
233
|
+
# @param [String] quota_user
|
234
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
235
|
+
# characters.
|
236
|
+
# @param [String] user_ip
|
237
|
+
# Deprecated. Please use quotaUser instead.
|
238
|
+
# @param [Google::Apis::RequestOptions] options
|
239
|
+
# Request-specific options
|
240
|
+
#
|
241
|
+
# @yield [result, err] Result & error if block supplied
|
242
|
+
# @yieldparam result [Google::Apis::AdexchangebuyerV1_2::Creative] parsed result object
|
243
|
+
# @yieldparam err [StandardError] error object if request failed
|
244
|
+
#
|
245
|
+
# @return [Google::Apis::AdexchangebuyerV1_2::Creative]
|
246
|
+
#
|
247
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
248
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
249
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
250
|
+
def insert_creative(creative_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
251
|
+
command = make_simple_command(:post, 'creatives', options)
|
252
|
+
command.request_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation
|
253
|
+
command.request_object = creative_object
|
254
|
+
command.response_representation = Google::Apis::AdexchangebuyerV1_2::Creative::Representation
|
255
|
+
command.response_class = Google::Apis::AdexchangebuyerV1_2::Creative
|
256
|
+
command.query['fields'] = fields unless fields.nil?
|
257
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
258
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
259
|
+
execute_or_queue_command(command, &block)
|
260
|
+
end
|
261
|
+
|
262
|
+
# Retrieves a list of the authenticated user's active creatives. A creative will
|
263
|
+
# be available 30-40 minutes after submission.
|
264
|
+
# @param [Fixnum] max_results
|
265
|
+
# Maximum number of entries returned on one result page. If not set, the default
|
266
|
+
# is 100. Optional.
|
267
|
+
# @param [String] page_token
|
268
|
+
# A continuation token, used to page through ad clients. To retrieve the next
|
269
|
+
# page, set this parameter to the value of "nextPageToken" from the previous
|
270
|
+
# response. Optional.
|
271
|
+
# @param [String] status_filter
|
272
|
+
# When specified, only creatives having the given status are returned.
|
273
|
+
# @param [String] fields
|
274
|
+
# Selector specifying which fields to include in a partial response.
|
275
|
+
# @param [String] quota_user
|
276
|
+
# An opaque string that represents a user for quota purposes. Must not exceed 40
|
277
|
+
# characters.
|
278
|
+
# @param [String] user_ip
|
279
|
+
# Deprecated. Please use quotaUser instead.
|
280
|
+
# @param [Google::Apis::RequestOptions] options
|
281
|
+
# Request-specific options
|
282
|
+
#
|
283
|
+
# @yield [result, err] Result & error if block supplied
|
284
|
+
# @yieldparam result [Google::Apis::AdexchangebuyerV1_2::CreativesList] parsed result object
|
285
|
+
# @yieldparam err [StandardError] error object if request failed
|
286
|
+
#
|
287
|
+
# @return [Google::Apis::AdexchangebuyerV1_2::CreativesList]
|
288
|
+
#
|
289
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
290
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
291
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
292
|
+
def list_creatives(max_results: nil, page_token: nil, status_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
293
|
+
command = make_simple_command(:get, 'creatives', options)
|
294
|
+
command.response_representation = Google::Apis::AdexchangebuyerV1_2::CreativesList::Representation
|
295
|
+
command.response_class = Google::Apis::AdexchangebuyerV1_2::CreativesList
|
296
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
297
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
298
|
+
command.query['statusFilter'] = status_filter unless status_filter.nil?
|
299
|
+
command.query['fields'] = fields unless fields.nil?
|
300
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
301
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
302
|
+
execute_or_queue_command(command, &block)
|
303
|
+
end
|
304
|
+
|
305
|
+
protected
|
306
|
+
|
307
|
+
def apply_command_defaults(command)
|
308
|
+
command.query['key'] = key unless key.nil?
|
309
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
310
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
311
|
+
end
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|