Class: Google::Apis::MybusinessbusinessinformationV1::MyBusinessBusinessInformationService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/mybusinessbusinessinformation_v1/service.rb

Overview

My Business Business Information API

The My Business Business Information API provides an interface for managing business information. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.

Examples:

require 'google/apis/mybusinessbusinessinformation_v1'

Mybusinessbusinessinformation = Google::Apis::MybusinessbusinessinformationV1 # Alias the module
service = Mybusinessbusinessinformation::MyBusinessBusinessInformationService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://mybusinessbusinessinformation.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMyBusinessBusinessInformationService

Returns a new instance of MyBusinessBusinessInformationService.



49
50
51
52
53
54
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 49

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-mybusinessbusinessinformation_v1',
        client_version: Google::Apis::MybusinessbusinessinformationV1::GEM_VERSION)
  @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.



42
43
44
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 42

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.



47
48
49
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 47

def quota_user
  @quota_user
end

Instance Method Details

#batch_category_get(language_code: nil, names: nil, region_code: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::BatchGetCategoriesResponse

Returns a list of business categories for the provided language and GConcept ids.

Parameters:

  • language_code (String) (defaults to: nil)

    Required. The BCP 47 code of language that the category names should be returned in.

  • names (Array<String>, String) (defaults to: nil)

    Required. At least one name must be set. The GConcept ids the localized category names should be returned for. To return details for more than one category, repeat this parameter in the request.

  • region_code (String) (defaults to: nil)

    Optional. The ISO 3166-1 alpha-2 country code used to infer non-standard language.

  • view (String) (defaults to: nil)

    Required. Specifies which parts to the Category resource should be returned in the response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 247

def batch_category_get(language_code: nil, names: nil, region_code: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/categories:batchGet', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::BatchGetCategoriesResponse::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::BatchGetCategoriesResponse
  command.query['languageCode'] = language_code unless language_code.nil?
  command.query['names'] = names unless names.nil?
  command.query['regionCode'] = region_code unless region_code.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_account_location(parent, location_object = nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Location

Creates a new Location that will be owned by the logged in user.

Parameters:

  • parent (String)

    Required. The name of the account in which to create this location.

  • location_object (Google::Apis::MybusinessbusinessinformationV1::Location) (defaults to: nil)
  • request_id (String) (defaults to: nil)

    Optional. A unique request ID for the server to detect duplicated requests. We recommend using UUIDs. Max length is 50 characters.

  • validate_only (Boolean) (defaults to: nil)

    Optional. If true, the request is validated without actually creating the location.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 83

def (parent, location_object = nil, request_id: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/locations', options)
  command.request_representation = Google::Apis::MybusinessbusinessinformationV1::Location::Representation
  command.request_object = location_object
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::Location::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::Location
  command.params['parent'] = parent unless parent.nil?
  command.query['requestId'] = request_id unless request_id.nil?
  command.query['validateOnly'] = validate_only unless validate_only.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_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Empty

Deletes a location. If this location cannot be deleted using the API and it is marked so in the google.mybusiness.businessinformation.v1.LocationState, use the Google Business Profile website.

Parameters:

  • name (String)

    Required. The name of the location to delete.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



427
428
429
430
431
432
433
434
435
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 427

def delete_location(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::Empty::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::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_chain(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Chain

Gets the specified chain. Returns NOT_FOUND if the chain does not exist.

Parameters:

  • name (String)

    Required. The chain's resource name, in the format chains/chain_place_id``.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



330
331
332
333
334
335
336
337
338
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 330

def get_chain(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::Chain::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::Chain
  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_location(name, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Location

Returns the specified location as last set by the merchant. It may not reflect updates from Google or user-generated content that are live on Google Maps.

Parameters:

  • name (String)

    Required. The name of the location to fetch.

  • read_mask (String) (defaults to: nil)

    Required. Read mask to specify what fields will be returned in the response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



460
461
462
463
464
465
466
467
468
469
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 460

def get_location(name, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::Location::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::Location
  command.params['name'] = name unless name.nil?
  command.query['readMask'] = read_mask unless read_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

#get_location_attribute_google_updated(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Attributes

Retrieves attributes for a location as they appear live on Google Maps and Search. This consumer-facing view may have been updated by Google or user- generated content and may differ from the merchant's version.

Parameters:

  • name (String)

    Required. Google identifier for this location in the form of locations/ location_id/attributes.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



650
651
652
653
654
655
656
657
658
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 650

def get_location_attribute_google_updated(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}:getGoogleUpdated', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::Attributes::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::Attributes
  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_location_attributes(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Attributes

Retrieves attributes for a location as last set by the merchant. It may not reflect updates from Google or user-generated content that are live on Google Maps.

Parameters:

  • name (String)

    Required. Google identifier for this location in the form of locations/ location_id/attributes.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



494
495
496
497
498
499
500
501
502
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 494

def get_location_attributes(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::Attributes::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::Attributes
  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_location_google_updated(name, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::GoogleUpdatedLocation

Returns the specified location as it appears live on Google Maps and Search. This consumer-facing view may have been updated by Google or user-generated content and may differ from the merchant's version. The returned GoogleUpdatedLocation contains masks that indicate which fields differ from the merchant's information.

Parameters:

  • name (String)

    Required. The name of the location to fetch.

  • read_mask (String) (defaults to: nil)

    Required. Read mask to specify what fields will be returned in the response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



530
531
532
533
534
535
536
537
538
539
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 530

def get_location_google_updated(name, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+name}:getGoogleUpdated', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::GoogleUpdatedLocation::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::GoogleUpdatedLocation
  command.params['name'] = name unless name.nil?
  command.query['readMask'] = read_mask unless read_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

#list_account_locations(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::ListLocationsResponse

Lists the locations for the specified account.

Parameters:

  • parent (String)

    Required. The name of the account to fetch locations from. * Specific Account ID: If the account is of type AccountType.PERSONAL, the response returns only locations directly owned by that account. For all other types (e. g., AccountType.LOCATION_GROUP), it returns all accessible locations. * ** Wildcard (-)**: Using accounts/- identifies the authenticated user. This scope defaults to AccountType.PERSONAL but includes both directly and indirectly owned locations (e.g., those accessible via member groups).

  • filter (String) (defaults to: nil)

    Optional. A filter constraining the locations to return. The response includes only entries that match the filter. If filter is empty, then constraints are applied and all locations (paginated) are retrieved for the requested account. For more information about valid fields and example usage, see Work with Location Data Guide.

  • order_by (String) (defaults to: nil)

    Optional. Sorting order for the request. Multiple fields should be comma- separated, following SQL syntax. The default sorting order is ascending. To specify descending order, a suffix " desc" should be added. Valid fields to order_by are title and store_code. For example: "title, store_code desc" or " title" or "store_code desc"

  • page_size (Fixnum) (defaults to: nil)

    Optional. How many locations to fetch per page. Default value is 10 if not set. Minimum is 1, and maximum page size is 100.

  • page_token (String) (defaults to: nil)

    Optional. If specified, it fetches the next page of locations. The page token is returned by previous calls to ListLocations when there were more locations than could fit in the requested page size.

  • read_mask (String) (defaults to: nil)

    Required. Read mask to specify what fields will be returned in the response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 145

def (parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/locations', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::ListLocationsResponse::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::ListLocationsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['readMask'] = read_mask unless read_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

#list_attributes(category_name: nil, language_code: nil, page_size: nil, page_token: nil, parent: nil, region_code: nil, show_all: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::ListAttributeMetadataResponse

Returns the list of attributes that would be available for a location with the given primary category and country.

Parameters:

  • category_name (String) (defaults to: nil)

    The primary category stable ID to find available attributes. Must be of the format categories/category_id.

  • language_code (String) (defaults to: nil)

    The BCP 47 code of language to get attribute display names in. If this language is not available, they will be provided in English.

  • page_size (Fixnum) (defaults to: nil)

    How many attributes to include per page. Default is 200, minimum is 1.

  • page_token (String) (defaults to: nil)

    If specified, the next page of attribute metadata is retrieved.

  • parent (String) (defaults to: nil)

    Resource name of the location to look up available attributes. If this field is set, category_name, region_code, language_code and show_all are not required and must not be set.

  • region_code (String) (defaults to: nil)

    The ISO 3166-1 alpha-2 country code to find available attributes.

  • show_all (Boolean) (defaults to: nil)

    Metadata for all available attributes are returned when this field is set to true, disregarding parent and category_name fields. language_code and region_code are required when show_all is set to true.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 199

def list_attributes(category_name: nil, language_code: nil, page_size: nil, page_token: nil, parent: nil, region_code: nil, show_all: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/attributes', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::ListAttributeMetadataResponse::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::ListAttributeMetadataResponse
  command.query['categoryName'] = category_name unless category_name.nil?
  command.query['languageCode'] = language_code unless language_code.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['parent'] = parent unless parent.nil?
  command.query['regionCode'] = region_code unless region_code.nil?
  command.query['showAll'] = show_all unless show_all.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_categories(filter: nil, language_code: nil, page_size: nil, page_token: nil, region_code: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::ListCategoriesResponse

Returns a list of business categories. Search will match the category name but not the category ID. Search only matches the front of a category name (that is, 'food' may return 'Food Court' but not 'Fast Food Restaurant').

Parameters:

  • filter (String) (defaults to: nil)

    Optional. Filter string from user. The only field that supported is displayName. Eg: filter=displayName=foo.

  • language_code (String) (defaults to: nil)

    Required. The BCP 47 code of language.

  • page_size (Fixnum) (defaults to: nil)

    Optional. How many categories to fetch per page. Default is 100, minimum is 1, and maximum page size is 100.

  • page_token (String) (defaults to: nil)

    Optional. If specified, the next page of categories will be fetched.

  • region_code (String) (defaults to: nil)

    Required. The ISO 3166-1 alpha-2 country code.

  • view (String) (defaults to: nil)

    Required. Specifies which parts to the Category resource should be returned in the response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



295
296
297
298
299
300
301
302
303
304
305
306
307
308
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 295

def list_categories(filter: nil, language_code: nil, page_size: nil, page_token: nil, region_code: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/categories', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::ListCategoriesResponse::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::ListCategoriesResponse
  command.query['filter'] = filter unless filter.nil?
  command.query['languageCode'] = language_code unless language_code.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['regionCode'] = region_code unless region_code.nil?
  command.query['view'] = view unless view.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_location(name, location_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Location

Updates the specified location.

Parameters:

  • name (String)

    Google identifier for this location in the form: locations/location_id``.

  • location_object (Google::Apis::MybusinessbusinessinformationV1::Location) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Required. The specific fields to update.

  • validate_only (Boolean) (defaults to: nil)

    Optional. If true, the request is validated without actually updating the location. When this field is set, we will only return validation errors if there were any. The response will be empty if no errors were found.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



568
569
570
571
572
573
574
575
576
577
578
579
580
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 568

def patch_location(name, location_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::MybusinessbusinessinformationV1::Location::Representation
  command.request_object = location_object
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::Location::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::Location
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['validateOnly'] = validate_only unless validate_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#search_chains(chain_name: nil, page_size: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::SearchChainsResponse

Searches the chain based on chain name.

Parameters:

  • chain_name (String) (defaults to: nil)

    Required. Search for a chain by its name. Exact/partial/fuzzy/related queries are supported. Examples: "walmart", "wal-mart", "walmmmart", "沃尔玛"

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of matched chains to return from this query. The default is

    1. The maximum possible value is 500.
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



364
365
366
367
368
369
370
371
372
373
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 364

def search_chains(chain_name: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/chains:search', options)
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::SearchChainsResponse::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::SearchChainsResponse
  command.query['chainName'] = chain_name unless chain_name.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#search_google_locations(search_google_locations_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::SearchGoogleLocationsResponse

Search all of the possible locations that are a match to the specified request.

Parameters:

  • search_google_locations_request_object (Google::Apis::MybusinessbusinessinformationV1::SearchGoogleLocationsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



394
395
396
397
398
399
400
401
402
403
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 394

def search_google_locations(search_google_locations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/googleLocations:search', options)
  command.request_representation = Google::Apis::MybusinessbusinessinformationV1::SearchGoogleLocationsRequest::Representation
  command.request_object = search_google_locations_request_object
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::SearchGoogleLocationsResponse::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::SearchGoogleLocationsResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_location_attributes(name, attributes_object = nil, attribute_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Attributes

Update attributes for a given location.

Parameters:

  • name (String)

    Required. Google identifier for this location in the form of locations/ location_id/attributes.

  • attributes_object (Google::Apis::MybusinessbusinessinformationV1::Attributes) (defaults to: nil)
  • attribute_mask (String) (defaults to: nil)

    Required. Attribute name of attributes that you'd like to update. Represented by attributes/attribute`. Updates: All attributes provided in the attributes field that you would like to update must be set in the attribute_mask. Attributes set in the above list but not in the attribute_maskwill be ignored. Deletes: If you'd like to delete certain attributes, they must be specified in theattribute_maskwith no matching entry in the attributes list. If you'd like to delete all attributes set on a location, you should look up all the applicable attributes for the location and then add them to theattribute_mask` with an empty attributes field.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



614
615
616
617
618
619
620
621
622
623
624
625
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 614

def update_location_attributes(name, attributes_object = nil, attribute_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::MybusinessbusinessinformationV1::Attributes::Representation
  command.request_object = attributes_object
  command.response_representation = Google::Apis::MybusinessbusinessinformationV1::Attributes::Representation
  command.response_class = Google::Apis::MybusinessbusinessinformationV1::Attributes
  command.params['name'] = name unless name.nil?
  command.query['attributeMask'] = attribute_mask unless attribute_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