Class: Google::Apis::CssV1::CssService
- Inherits:
-
Google::Apis::Core::BaseService
- Object
- Google::Apis::Core::BaseService
- Google::Apis::CssV1::CssService
- Defined in:
- lib/google/apis/css_v1/service.rb
Overview
CSS API
Programmatically manage your Comparison Shopping Service (CSS) account data at scale.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://css.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_account_label(parent, account_label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::AccountLabel
Creates a new label, not assigned to any account.
-
#delete_account_css_product_input(name, supplemental_feed_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::Empty
Deletes a CSS Product input from your CSS Center account.
-
#delete_account_label(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::Empty
Deletes a label and removes it from all accounts to which it was assigned.
-
#get_account(name, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::Account
Retrieves a single CSS/MC account by ID.
-
#get_account_css_product(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::CssProduct
Retrieves the processed CSS Product from your CSS Center account.
-
#initialize ⇒ CssService
constructor
A new instance of CssService.
-
#insert_account_css_product_input(parent, css_product_input_object = nil, feed_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::CssProductInput
Uploads a CssProductInput to your CSS Center account.
-
#list_account_child_accounts(parent, full_name: nil, label_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::ListChildAccountsResponse
Lists all the accounts under the specified CSS account ID, and optionally filters by label ID and account name.
-
#list_account_css_products(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::ListCssProductsResponse
Lists the processed CSS Products in your CSS Center account.
-
#list_account_labels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::ListAccountLabelsResponse
Lists the labels owned by an account.
-
#patch_account_css_product_input(name, css_product_input_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::CssProductInput
Updates the existing Css Product input in your CSS Center account.
-
#patch_account_label(name, account_label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::AccountLabel
Updates a label.
-
#update_account_labels(name, update_account_labels_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::Account
Updates labels assigned to CSS/MC accounts by a CSS domain.
Constructor Details
#initialize ⇒ CssService
Returns a new instance of CssService.
48 49 50 51 52 53 |
# File 'lib/google/apis/css_v1/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-css_v1', client_version: Google::Apis::CssV1::GEM_VERSION) @batch_path = 'batch' 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.
41 42 43 |
# File 'lib/google/apis/css_v1/service.rb', line 41 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.
46 47 48 |
# File 'lib/google/apis/css_v1/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#create_account_label(parent, account_label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::AccountLabel
Creates a new label, not assigned to any account.
397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/google/apis/css_v1/service.rb', line 397 def create_account_label(parent, account_label_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/labels', ) command.request_representation = Google::Apis::CssV1::AccountLabel::Representation command.request_object = account_label_object command.response_representation = Google::Apis::CssV1::AccountLabel::Representation command.response_class = Google::Apis::CssV1::AccountLabel command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_account_css_product_input(name, supplemental_feed_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::Empty
Deletes a CSS Product input from your CSS Center account. After a delete it may take several minutes until the input is no longer available.
198 199 200 201 202 203 204 205 206 207 |
# File 'lib/google/apis/css_v1/service.rb', line 198 def delete_account_css_product_input(name, supplemental_feed_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::CssV1::Empty::Representation command.response_class = Google::Apis::CssV1::Empty command.params['name'] = name unless name.nil? command.query['supplementalFeedId'] = supplemental_feed_id unless supplemental_feed_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_account_label(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::Empty
Deletes a label and removes it from all accounts to which it was assigned.
430 431 432 433 434 435 436 437 438 |
# File 'lib/google/apis/css_v1/service.rb', line 430 def delete_account_label(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::CssV1::Empty::Representation command.response_class = Google::Apis::CssV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_account(name, parent: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::Account
Retrieves a single CSS/MC account by ID.
78 79 80 81 82 83 84 85 86 87 |
# File 'lib/google/apis/css_v1/service.rb', line 78 def get_account(name, parent: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CssV1::Account::Representation command.response_class = Google::Apis::CssV1::Account command.params['name'] = name unless name.nil? command.query['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_account_css_product(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::CssProduct
Retrieves the processed CSS Product from your CSS Center account. After inserting, updating, or deleting a product input, it may take several minutes before the updated final product can be retrieved.
321 322 323 324 325 326 327 328 329 |
# File 'lib/google/apis/css_v1/service.rb', line 321 def get_account_css_product(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::CssV1::CssProduct::Representation command.response_class = Google::Apis::CssV1::CssProduct command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_account_css_product_input(parent, css_product_input_object = nil, feed_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::CssProductInput
Uploads a CssProductInput to your CSS Center account. If an input with the same contentLanguage, identity, feedLabel and feedId already exists, this method replaces that entry. After inserting, updating, or deleting a CSS Product input, it may take several minutes before the processed CSS Product can be retrieved.
240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/google/apis/css_v1/service.rb', line 240 def insert_account_css_product_input(parent, css_product_input_object = nil, feed_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/cssProductInputs:insert', ) command.request_representation = Google::Apis::CssV1::CssProductInput::Representation command.request_object = css_product_input_object command.response_representation = Google::Apis::CssV1::CssProductInput::Representation command.response_class = Google::Apis::CssV1::CssProductInput command.params['parent'] = parent unless parent.nil? command.query['feedId'] = feed_id unless feed_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_account_child_accounts(parent, full_name: nil, label_id: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::ListChildAccountsResponse
Lists all the accounts under the specified CSS account ID, and optionally filters by label ID and account name.
125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/google/apis/css_v1/service.rb', line 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) command = make_simple_command(:get, 'v1/{+parent}:listChildAccounts', ) command.response_representation = Google::Apis::CssV1::ListChildAccountsResponse::Representation command.response_class = Google::Apis::CssV1::ListChildAccountsResponse command.params['parent'] = parent unless parent.nil? command.query['fullName'] = full_name unless full_name.nil? command.query['labelId'] = label_id unless label_id.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_account_css_products(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::ListCssProductsResponse
Lists the processed CSS Products in your CSS Center account. The response might contain fewer items than specified by pageSize. Rely on pageToken to determine if there are more items to be requested. After inserting, updating, or deleting a CSS product input, it may take several minutes before the updated processed CSS product can be retrieved.
364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/google/apis/css_v1/service.rb', line 364 def list_account_css_products(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/cssProducts', ) command.response_representation = Google::Apis::CssV1::ListCssProductsResponse::Representation command.response_class = Google::Apis::CssV1::ListCssProductsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_account_labels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::ListAccountLabelsResponse
Lists the labels owned by an account.
469 470 471 472 473 474 475 476 477 478 479 |
# File 'lib/google/apis/css_v1/service.rb', line 469 def list_account_labels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/labels', ) command.response_representation = Google::Apis::CssV1::ListAccountLabelsResponse::Representation command.response_class = Google::Apis::CssV1::ListAccountLabelsResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_account_css_product_input(name, css_product_input_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::CssProductInput
Updates the existing Css Product input in your CSS Center account. After inserting, updating, or deleting a CSS Product input, it may take several minutes before the processed Css Product can be retrieved.
286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/google/apis/css_v1/service.rb', line 286 def patch_account_css_product_input(name, css_product_input_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::CssV1::CssProductInput::Representation command.request_object = css_product_input_object command.response_representation = Google::Apis::CssV1::CssProductInput::Representation command.response_class = Google::Apis::CssV1::CssProductInput command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_account_label(name, account_label_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::AccountLabel
Updates a label.
502 503 504 505 506 507 508 509 510 511 512 |
# File 'lib/google/apis/css_v1/service.rb', line 502 def patch_account_label(name, account_label_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::CssV1::AccountLabel::Representation command.request_object = account_label_object command.response_representation = Google::Apis::CssV1::AccountLabel::Representation command.response_class = Google::Apis::CssV1::AccountLabel command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_account_labels(name, update_account_labels_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::CssV1::Account
Updates labels assigned to CSS/MC accounts by a CSS domain.
160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/google/apis/css_v1/service.rb', line 160 def update_account_labels(name, update_account_labels_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+name}:updateLabels', ) command.request_representation = Google::Apis::CssV1::UpdateAccountLabelsRequest::Representation command.request_object = update_account_labels_request_object command.response_representation = Google::Apis::CssV1::Account::Representation command.response_class = Google::Apis::CssV1::Account command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |