Class: Google::Apis::ManufacturersV1::ManufacturerCenterService

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

Overview

Manufacturer Center API

Public API for managing Manufacturer Center related data.

Examples:

require 'google/apis/manufacturers_v1'

Manufacturers = Google::Apis::ManufacturersV1 # Alias the module
service = Manufacturers::ManufacturerCenterService.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

#initializeManufacturerCenterService

Returns a new instance of ManufacturerCenterService



45
46
47
48
# File 'generated/google/apis/manufacturers_v1/service.rb', line 45

def initialize
  super('https://manufacturers.googleapis.com/', '')
  @batch_path = 'batch'
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.



38
39
40
# File 'generated/google/apis/manufacturers_v1/service.rb', line 38

def key
  @key
end

#quota_userString

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.

Returns:

  • (String)

    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.



43
44
45
# File 'generated/google/apis/manufacturers_v1/service.rb', line 43

def quota_user
  @quota_user
end

Instance Method Details

#get_account_product(parent, name, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ManufacturersV1::Product

Gets the product from a Manufacturer Center account, including product issues.

Parameters:

  • parent (String)

    Parent ID in the format accounts/account_id`. account_id` - The ID of the Manufacturer Center account.

  • name (String)

    Name in the format target_country`:`content_language`:`product_id. target_country - The target country of the product as a CLDR territory code (for example, US). content_language - The content language of the product as a two-letter ISO 639-1 language code (for example, en). product_id - The ID of the product. For more information, see https://support.google.com/manufacturers/answer/6124116# id.

  • quota_user (String)

    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.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



119
120
121
122
123
124
125
126
127
128
# File 'generated/google/apis/manufacturers_v1/service.rb', line 119

def (parent, name, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+parent}/products/{+name}', options)
  command.response_representation = Google::Apis::ManufacturersV1::Product::Representation
  command.response_class = Google::Apis::ManufacturersV1::Product
  command.params['parent'] = parent unless parent.nil?
  command.params['name'] = name unless name.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end

#list_account_products(parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::ManufacturersV1::ListProductsResponse

Lists all the products in a Manufacturer Center account.

Parameters:

  • parent (String)

    Parent ID in the format accounts/account_id`. account_id` - The ID of the Manufacturer Center account.

  • page_token (String)

    The token returned by the previous request.

  • page_size (Fixnum)

    Maximum number of product statuses to return in the response, used for paging.

  • quota_user (String)

    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.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

def (parent, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v1/{+parent}/products', options)
  command.response_representation = Google::Apis::ManufacturersV1::ListProductsResponse::Representation
  command.response_class = Google::Apis::ManufacturersV1::ListProductsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['fields'] = fields unless fields.nil?
  execute_or_queue_command(command, &block)
end