google-apis-css_v1 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,477 @@
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 CssV1
23
+ # CSS API
24
+ #
25
+ # Programmatically manage your Comparison Shopping Service (CSS) account data at
26
+ # scale.
27
+ #
28
+ # @example
29
+ # require 'google/apis/css_v1'
30
+ #
31
+ # Css = Google::Apis::CssV1 # Alias the module
32
+ # service = Css::CssService.new
33
+ #
34
+ # @see https://developers.google.com/comparison-shopping-services/api/overview
35
+ class CssService < Google::Apis::Core::BaseService
36
+ DEFAULT_ENDPOINT_TEMPLATE = "https://css.$UNIVERSE_DOMAIN$/"
37
+
38
+ # @return [String]
39
+ # API key. Your API key identifies your project and provides you with API access,
40
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
41
+ attr_accessor :key
42
+
43
+ # @return [String]
44
+ # Available to use for quota purposes for server-side applications. Can be any
45
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
46
+ attr_accessor :quota_user
47
+
48
+ def initialize
49
+ super(DEFAULT_ENDPOINT_TEMPLATE, '',
50
+ client_name: 'google-apis-css_v1',
51
+ client_version: Google::Apis::CssV1::GEM_VERSION)
52
+ @batch_path = 'batch'
53
+ end
54
+
55
+ # Retrieves a single CSS/MC account by ID.
56
+ # @param [String] name
57
+ # Required. The name of the managed CSS/MC account. Format: accounts/`account`
58
+ # @param [String] parent
59
+ # Optional. Only required when retrieving MC account information. The CSS domain
60
+ # that is the parent resource of the MC account. Format: accounts/`account`
61
+ # @param [String] fields
62
+ # Selector specifying which fields to include in a partial response.
63
+ # @param [String] quota_user
64
+ # Available to use for quota purposes for server-side applications. Can be any
65
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
66
+ # @param [Google::Apis::RequestOptions] options
67
+ # Request-specific options
68
+ #
69
+ # @yield [result, err] Result & error if block supplied
70
+ # @yieldparam result [Google::Apis::CssV1::Account] parsed result object
71
+ # @yieldparam err [StandardError] error object if request failed
72
+ #
73
+ # @return [Google::Apis::CssV1::Account]
74
+ #
75
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
76
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
77
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
78
+ def get_account(name, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
79
+ command = make_simple_command(:get, 'v1/{+name}', options)
80
+ command.response_representation = Google::Apis::CssV1::Account::Representation
81
+ command.response_class = Google::Apis::CssV1::Account
82
+ command.params['name'] = name unless name.nil?
83
+ command.query['parent'] = parent unless parent.nil?
84
+ command.query['fields'] = fields unless fields.nil?
85
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
86
+ execute_or_queue_command(command, &block)
87
+ end
88
+
89
+ # Lists all the accounts under the specified CSS account ID, and optionally
90
+ # filters by label ID and account name.
91
+ # @param [String] parent
92
+ # Required. The parent account. Must be a CSS group or domain. Format: accounts/`
93
+ # account`
94
+ # @param [String] full_name
95
+ # If set, only the MC accounts with the given name (case sensitive) will be
96
+ # returned.
97
+ # @param [Fixnum] label_id
98
+ # If set, only the MC accounts with the given label ID will be returned.
99
+ # @param [Fixnum] page_size
100
+ # Optional. The maximum number of accounts to return. The service may return
101
+ # fewer than this value. If unspecified, at most 50 accounts will be returned.
102
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
103
+ # @param [String] page_token
104
+ # Optional. A page token, received from a previous `ListChildAccounts` call.
105
+ # Provide this to retrieve the subsequent page. When paginating, all other
106
+ # parameters provided to `ListChildAccounts` must match the call that provided
107
+ # the page token.
108
+ # @param [String] fields
109
+ # Selector specifying which fields to include in a partial response.
110
+ # @param [String] quota_user
111
+ # Available to use for quota purposes for server-side applications. Can be any
112
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
113
+ # @param [Google::Apis::RequestOptions] options
114
+ # Request-specific options
115
+ #
116
+ # @yield [result, err] Result & error if block supplied
117
+ # @yieldparam result [Google::Apis::CssV1::ListChildAccountsResponse] parsed result object
118
+ # @yieldparam err [StandardError] error object if request failed
119
+ #
120
+ # @return [Google::Apis::CssV1::ListChildAccountsResponse]
121
+ #
122
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
123
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
124
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
125
+ def list_account_child_accounts(parent, full_name: nil, label_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
126
+ command = make_simple_command(:get, 'v1/{+parent}:listChildAccounts', options)
127
+ command.response_representation = Google::Apis::CssV1::ListChildAccountsResponse::Representation
128
+ command.response_class = Google::Apis::CssV1::ListChildAccountsResponse
129
+ command.params['parent'] = parent unless parent.nil?
130
+ command.query['fullName'] = full_name unless full_name.nil?
131
+ command.query['labelId'] = label_id unless label_id.nil?
132
+ command.query['pageSize'] = page_size unless page_size.nil?
133
+ command.query['pageToken'] = page_token unless page_token.nil?
134
+ command.query['fields'] = fields unless fields.nil?
135
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
136
+ execute_or_queue_command(command, &block)
137
+ end
138
+
139
+ # Updates labels assigned to CSS/MC accounts by a CSS domain.
140
+ # @param [String] name
141
+ # Required. The label resource name. Format: accounts/`account`
142
+ # @param [Google::Apis::CssV1::UpdateAccountLabelsRequest] update_account_labels_request_object
143
+ # @param [String] fields
144
+ # Selector specifying which fields to include in a partial response.
145
+ # @param [String] quota_user
146
+ # Available to use for quota purposes for server-side applications. Can be any
147
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
148
+ # @param [Google::Apis::RequestOptions] options
149
+ # Request-specific options
150
+ #
151
+ # @yield [result, err] Result & error if block supplied
152
+ # @yieldparam result [Google::Apis::CssV1::Account] parsed result object
153
+ # @yieldparam err [StandardError] error object if request failed
154
+ #
155
+ # @return [Google::Apis::CssV1::Account]
156
+ #
157
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
158
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
159
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
160
+ def update_account_labels(name, update_account_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
161
+ command = make_simple_command(:post, 'v1/{+name}:updateLabels', options)
162
+ command.request_representation = Google::Apis::CssV1::UpdateAccountLabelsRequest::Representation
163
+ command.request_object = update_account_labels_request_object
164
+ command.response_representation = Google::Apis::CssV1::Account::Representation
165
+ command.response_class = Google::Apis::CssV1::Account
166
+ command.params['name'] = name unless name.nil?
167
+ command.query['fields'] = fields unless fields.nil?
168
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
169
+ execute_or_queue_command(command, &block)
170
+ end
171
+
172
+ # Deletes a CSS Product input from your CSS Center account. After a delete it
173
+ # may take several minutes until the input is no longer available.
174
+ # @param [String] name
175
+ # Required. The name of the CSS product input resource to delete. Format:
176
+ # accounts/`account`/cssProductInputs/`css_product_input`
177
+ # @param [Fixnum] supplemental_feed_id
178
+ # The Content API Supplemental Feed ID. The field must not be set if the action
179
+ # applies to a primary feed. If the field is set, then product action applies to
180
+ # a supplemental feed instead of primary Content API feed.
181
+ # @param [String] fields
182
+ # Selector specifying which fields to include in a partial response.
183
+ # @param [String] quota_user
184
+ # Available to use for quota purposes for server-side applications. Can be any
185
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
186
+ # @param [Google::Apis::RequestOptions] options
187
+ # Request-specific options
188
+ #
189
+ # @yield [result, err] Result & error if block supplied
190
+ # @yieldparam result [Google::Apis::CssV1::Empty] parsed result object
191
+ # @yieldparam err [StandardError] error object if request failed
192
+ #
193
+ # @return [Google::Apis::CssV1::Empty]
194
+ #
195
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
196
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
197
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
198
+ def delete_account_css_product_input(name, supplemental_feed_id: nil, fields: nil, quota_user: nil, options: nil, &block)
199
+ command = make_simple_command(:delete, 'v1/{+name}', options)
200
+ command.response_representation = Google::Apis::CssV1::Empty::Representation
201
+ command.response_class = Google::Apis::CssV1::Empty
202
+ command.params['name'] = name unless name.nil?
203
+ command.query['supplementalFeedId'] = supplemental_feed_id unless supplemental_feed_id.nil?
204
+ command.query['fields'] = fields unless fields.nil?
205
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
206
+ execute_or_queue_command(command, &block)
207
+ end
208
+
209
+ # Uploads a CssProductInput to your CSS Center account. If an input with the
210
+ # same contentLanguage, identity, feedLabel and feedId already exists, this
211
+ # method replaces that entry. After inserting, updating, or deleting a CSS
212
+ # Product input, it may take several minutes before the processed CSS Product
213
+ # can be retrieved.
214
+ # @param [String] parent
215
+ # Required. The account where this CSS Product will be inserted. Format:
216
+ # accounts/`account`
217
+ # @param [Google::Apis::CssV1::CssProductInput] css_product_input_object
218
+ # @param [Fixnum] feed_id
219
+ # Required. The primary or supplemental feed id. If CSS Product already exists
220
+ # and feed id provided is different, then the CSS Product will be moved to a new
221
+ # feed. Note: For now, CSSs do not need to provide feed ids as we create feeds
222
+ # on the fly. We do not have supplemental feed support for CSS Products yet.
223
+ # @param [String] fields
224
+ # Selector specifying which fields to include in a partial response.
225
+ # @param [String] quota_user
226
+ # Available to use for quota purposes for server-side applications. Can be any
227
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
228
+ # @param [Google::Apis::RequestOptions] options
229
+ # Request-specific options
230
+ #
231
+ # @yield [result, err] Result & error if block supplied
232
+ # @yieldparam result [Google::Apis::CssV1::CssProductInput] parsed result object
233
+ # @yieldparam err [StandardError] error object if request failed
234
+ #
235
+ # @return [Google::Apis::CssV1::CssProductInput]
236
+ #
237
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
238
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
239
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
240
+ def insert_account_css_product_input(parent, css_product_input_object = nil, feed_id: nil, fields: nil, quota_user: nil, options: nil, &block)
241
+ command = make_simple_command(:post, 'v1/{+parent}/cssProductInputs:insert', options)
242
+ command.request_representation = Google::Apis::CssV1::CssProductInput::Representation
243
+ command.request_object = css_product_input_object
244
+ command.response_representation = Google::Apis::CssV1::CssProductInput::Representation
245
+ command.response_class = Google::Apis::CssV1::CssProductInput
246
+ command.params['parent'] = parent unless parent.nil?
247
+ command.query['feedId'] = feed_id unless feed_id.nil?
248
+ command.query['fields'] = fields unless fields.nil?
249
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
250
+ execute_or_queue_command(command, &block)
251
+ end
252
+
253
+ # Retrieves the processed CSS Product from your CSS Center account. After
254
+ # inserting, updating, or deleting a product input, it may take several minutes
255
+ # before the updated final product can be retrieved.
256
+ # @param [String] name
257
+ # Required. The name of the CSS product to retrieve.
258
+ # @param [String] fields
259
+ # Selector specifying which fields to include in a partial response.
260
+ # @param [String] quota_user
261
+ # Available to use for quota purposes for server-side applications. Can be any
262
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
263
+ # @param [Google::Apis::RequestOptions] options
264
+ # Request-specific options
265
+ #
266
+ # @yield [result, err] Result & error if block supplied
267
+ # @yieldparam result [Google::Apis::CssV1::CssProduct] parsed result object
268
+ # @yieldparam err [StandardError] error object if request failed
269
+ #
270
+ # @return [Google::Apis::CssV1::CssProduct]
271
+ #
272
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
273
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
274
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
275
+ def get_account_css_product(name, fields: nil, quota_user: nil, options: nil, &block)
276
+ command = make_simple_command(:get, 'v1/{+name}', options)
277
+ command.response_representation = Google::Apis::CssV1::CssProduct::Representation
278
+ command.response_class = Google::Apis::CssV1::CssProduct
279
+ command.params['name'] = name unless name.nil?
280
+ command.query['fields'] = fields unless fields.nil?
281
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
282
+ execute_or_queue_command(command, &block)
283
+ end
284
+
285
+ # Lists the processed CSS Products in your CSS Center account. The response
286
+ # might contain fewer items than specified by pageSize. Rely on pageToken to
287
+ # determine if there are more items to be requested. After inserting, updating,
288
+ # or deleting a CSS product input, it may take several minutes before the
289
+ # updated processed CSS product can be retrieved.
290
+ # @param [String] parent
291
+ # Required. The account/domain to list processed CSS Products for. Format:
292
+ # accounts/`account`
293
+ # @param [Fixnum] page_size
294
+ # The maximum number of CSS Products to return. The service may return fewer
295
+ # than this value. The maximum value is 1000; values above 1000 will be coerced
296
+ # to 1000. If unspecified, the maximum number of CSS products will be returned.
297
+ # @param [String] page_token
298
+ # A page token, received from a previous `ListCssProducts` call. Provide this to
299
+ # retrieve the subsequent page. When paginating, all other parameters provided
300
+ # to `ListCssProducts` must match the call that provided the page token.
301
+ # @param [String] fields
302
+ # Selector specifying which fields to include in a partial response.
303
+ # @param [String] quota_user
304
+ # Available to use for quota purposes for server-side applications. Can be any
305
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
306
+ # @param [Google::Apis::RequestOptions] options
307
+ # Request-specific options
308
+ #
309
+ # @yield [result, err] Result & error if block supplied
310
+ # @yieldparam result [Google::Apis::CssV1::ListCssProductsResponse] parsed result object
311
+ # @yieldparam err [StandardError] error object if request failed
312
+ #
313
+ # @return [Google::Apis::CssV1::ListCssProductsResponse]
314
+ #
315
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
316
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
317
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
318
+ def list_account_css_products(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
319
+ command = make_simple_command(:get, 'v1/{+parent}/cssProducts', options)
320
+ command.response_representation = Google::Apis::CssV1::ListCssProductsResponse::Representation
321
+ command.response_class = Google::Apis::CssV1::ListCssProductsResponse
322
+ command.params['parent'] = parent unless parent.nil?
323
+ command.query['pageSize'] = page_size unless page_size.nil?
324
+ command.query['pageToken'] = page_token unless page_token.nil?
325
+ command.query['fields'] = fields unless fields.nil?
326
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
327
+ execute_or_queue_command(command, &block)
328
+ end
329
+
330
+ # Creates a new label, not assigned to any account.
331
+ # @param [String] parent
332
+ # Required. The parent account. Format: accounts/`account`
333
+ # @param [Google::Apis::CssV1::AccountLabel] account_label_object
334
+ # @param [String] fields
335
+ # Selector specifying which fields to include in a partial response.
336
+ # @param [String] quota_user
337
+ # Available to use for quota purposes for server-side applications. Can be any
338
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
339
+ # @param [Google::Apis::RequestOptions] options
340
+ # Request-specific options
341
+ #
342
+ # @yield [result, err] Result & error if block supplied
343
+ # @yieldparam result [Google::Apis::CssV1::AccountLabel] parsed result object
344
+ # @yieldparam err [StandardError] error object if request failed
345
+ #
346
+ # @return [Google::Apis::CssV1::AccountLabel]
347
+ #
348
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
349
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
350
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
351
+ def create_account_label(parent, account_label_object = nil, fields: nil, quota_user: nil, options: nil, &block)
352
+ command = make_simple_command(:post, 'v1/{+parent}/labels', options)
353
+ command.request_representation = Google::Apis::CssV1::AccountLabel::Representation
354
+ command.request_object = account_label_object
355
+ command.response_representation = Google::Apis::CssV1::AccountLabel::Representation
356
+ command.response_class = Google::Apis::CssV1::AccountLabel
357
+ command.params['parent'] = parent unless parent.nil?
358
+ command.query['fields'] = fields unless fields.nil?
359
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
360
+ execute_or_queue_command(command, &block)
361
+ end
362
+
363
+ # Deletes a label and removes it from all accounts to which it was assigned.
364
+ # @param [String] name
365
+ # Required. The name of the label to delete. Format: accounts/`account`/labels/`
366
+ # label`
367
+ # @param [String] fields
368
+ # Selector specifying which fields to include in a partial response.
369
+ # @param [String] quota_user
370
+ # Available to use for quota purposes for server-side applications. Can be any
371
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
372
+ # @param [Google::Apis::RequestOptions] options
373
+ # Request-specific options
374
+ #
375
+ # @yield [result, err] Result & error if block supplied
376
+ # @yieldparam result [Google::Apis::CssV1::Empty] parsed result object
377
+ # @yieldparam err [StandardError] error object if request failed
378
+ #
379
+ # @return [Google::Apis::CssV1::Empty]
380
+ #
381
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
382
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
383
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
384
+ def delete_account_label(name, fields: nil, quota_user: nil, options: nil, &block)
385
+ command = make_simple_command(:delete, 'v1/{+name}', options)
386
+ command.response_representation = Google::Apis::CssV1::Empty::Representation
387
+ command.response_class = Google::Apis::CssV1::Empty
388
+ command.params['name'] = name unless name.nil?
389
+ command.query['fields'] = fields unless fields.nil?
390
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
391
+ execute_or_queue_command(command, &block)
392
+ end
393
+
394
+ # Lists the labels assigned to an account.
395
+ # @param [String] parent
396
+ # Required. The parent account. Format: accounts/`account`
397
+ # @param [Fixnum] page_size
398
+ # The maximum number of labels to return. The service may return fewer than this
399
+ # value. If unspecified, at most 50 labels will be returned. The maximum value
400
+ # is 1000; values above 1000 will be coerced to 1000.
401
+ # @param [String] page_token
402
+ # A page token, received from a previous `ListAccountLabels` call. Provide this
403
+ # to retrieve the subsequent page. When paginating, all other parameters
404
+ # provided to `ListAccountLabels` must match the call that provided the page
405
+ # token.
406
+ # @param [String] fields
407
+ # Selector specifying which fields to include in a partial response.
408
+ # @param [String] quota_user
409
+ # Available to use for quota purposes for server-side applications. Can be any
410
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
411
+ # @param [Google::Apis::RequestOptions] options
412
+ # Request-specific options
413
+ #
414
+ # @yield [result, err] Result & error if block supplied
415
+ # @yieldparam result [Google::Apis::CssV1::ListAccountLabelsResponse] parsed result object
416
+ # @yieldparam err [StandardError] error object if request failed
417
+ #
418
+ # @return [Google::Apis::CssV1::ListAccountLabelsResponse]
419
+ #
420
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
421
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
422
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
423
+ def list_account_labels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
424
+ command = make_simple_command(:get, 'v1/{+parent}/labels', options)
425
+ command.response_representation = Google::Apis::CssV1::ListAccountLabelsResponse::Representation
426
+ command.response_class = Google::Apis::CssV1::ListAccountLabelsResponse
427
+ command.params['parent'] = parent unless parent.nil?
428
+ command.query['pageSize'] = page_size unless page_size.nil?
429
+ command.query['pageToken'] = page_token unless page_token.nil?
430
+ command.query['fields'] = fields unless fields.nil?
431
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
432
+ execute_or_queue_command(command, &block)
433
+ end
434
+
435
+ # Updates a label.
436
+ # @param [String] name
437
+ # The resource name of the label. Format: accounts/`account`/labels/`label`
438
+ # @param [Google::Apis::CssV1::AccountLabel] account_label_object
439
+ # @param [String] fields
440
+ # Selector specifying which fields to include in a partial response.
441
+ # @param [String] quota_user
442
+ # Available to use for quota purposes for server-side applications. Can be any
443
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
444
+ # @param [Google::Apis::RequestOptions] options
445
+ # Request-specific options
446
+ #
447
+ # @yield [result, err] Result & error if block supplied
448
+ # @yieldparam result [Google::Apis::CssV1::AccountLabel] parsed result object
449
+ # @yieldparam err [StandardError] error object if request failed
450
+ #
451
+ # @return [Google::Apis::CssV1::AccountLabel]
452
+ #
453
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
454
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
455
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
456
+ def patch_account_label(name, account_label_object = nil, fields: nil, quota_user: nil, options: nil, &block)
457
+ command = make_simple_command(:patch, 'v1/{+name}', options)
458
+ command.request_representation = Google::Apis::CssV1::AccountLabel::Representation
459
+ command.request_object = account_label_object
460
+ command.response_representation = Google::Apis::CssV1::AccountLabel::Representation
461
+ command.response_class = Google::Apis::CssV1::AccountLabel
462
+ command.params['name'] = name unless name.nil?
463
+ command.query['fields'] = fields unless fields.nil?
464
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
465
+ execute_or_queue_command(command, &block)
466
+ end
467
+
468
+ protected
469
+
470
+ def apply_command_defaults(command)
471
+ command.query['key'] = key unless key.nil?
472
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
473
+ end
474
+ end
475
+ end
476
+ end
477
+ end
@@ -0,0 +1,37 @@
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/css_v1/service.rb'
16
+ require 'google/apis/css_v1/classes.rb'
17
+ require 'google/apis/css_v1/representations.rb'
18
+ require 'google/apis/css_v1/gem_version.rb'
19
+
20
+ module Google
21
+ module Apis
22
+ # CSS API
23
+ #
24
+ # Programmatically manage your Comparison Shopping Service (CSS) account data at
25
+ # scale.
26
+ #
27
+ # @see https://developers.google.com/comparison-shopping-services/api/overview
28
+ module CssV1
29
+ # Version of the CSS API this client connects to.
30
+ # This is NOT the gem version.
31
+ VERSION = 'V1'
32
+
33
+ # Manage your product listings and accounts for Google Shopping
34
+ AUTH_CONTENT = 'https://www.googleapis.com/auth/content'
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,15 @@
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/css_v1"
metadata ADDED
@@ -0,0 +1,82 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-apis-css_v1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Google LLC
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-07-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-apis-core
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 0.15.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 2.a
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 0.15.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 2.a
33
+ description: This is the simple REST client for CSS API V1. Simple REST clients are
34
+ Ruby client libraries that provide access to Google services via their HTTP REST
35
+ API endpoints. These libraries are generated and updated automatically based on
36
+ the discovery documents published by the service, and they handle most concerns
37
+ such as authentication, pagination, retry, timeouts, and logging. You can use this
38
+ client to access the CSS API, but note that some services may provide a separate
39
+ modern client that is easier to use.
40
+ email: googleapis-packages@google.com
41
+ executables: []
42
+ extensions: []
43
+ extra_rdoc_files: []
44
+ files:
45
+ - ".yardopts"
46
+ - CHANGELOG.md
47
+ - LICENSE.md
48
+ - OVERVIEW.md
49
+ - lib/google-apis-css_v1.rb
50
+ - lib/google/apis/css_v1.rb
51
+ - lib/google/apis/css_v1/classes.rb
52
+ - lib/google/apis/css_v1/gem_version.rb
53
+ - lib/google/apis/css_v1/representations.rb
54
+ - lib/google/apis/css_v1/service.rb
55
+ homepage: https://github.com/google/google-api-ruby-client
56
+ licenses:
57
+ - Apache-2.0
58
+ metadata:
59
+ bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
+ changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-css_v1/CHANGELOG.md
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-css_v1/v0.1.0
62
+ source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-css_v1
63
+ post_install_message:
64
+ rdoc_options: []
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '2.7'
72
+ required_rubygems_version: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubygems_version: 3.5.6
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: Simple REST client for CSS API V1
82
+ test_files: []