Class: Google::Apis::MybusinessbusinessinformationV1::MyBusinessBusinessInformationService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MybusinessbusinessinformationV1::MyBusinessBusinessInformationService
- 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.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://mybusinessbusinessinformation.$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
-
#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.
-
#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.
-
#delete_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Empty
Deletes a location.
-
#get_chain(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Chain
Gets the specified chain.
-
#get_location(name, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Location
Returns the specified location.
-
#get_location_attribute_google_updated(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Attributes
Gets the version of the specified location, returning an
Attributesmessage that provides the attributes view as it appears to consumers, which may be different than the merchant's information. -
#get_location_attributes(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::Attributes
Looks up all the attributes set for a given location.
-
#get_location_google_updated(name, read_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessbusinessinformationV1::GoogleUpdatedLocation
Gets the version of the specified location, returning a
GoogleUpdatedLocationthat provides the location view as it appears to consumers and masks indicating which fields are different than the merchant's information. -
#initialize ⇒ MyBusinessBusinessInformationService
constructor
A new instance of MyBusinessBusinessInformationService.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
Constructor Details
#initialize ⇒ MyBusinessBusinessInformationService
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
#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.
42 43 44 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 42 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.
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.
244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 244 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', ) 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.
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 83 def create_account_location(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', ) 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.
424 425 426 427 428 429 430 431 432 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 424 def delete_location(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) 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.
327 328 329 330 331 332 333 334 335 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 327 def get_chain(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) 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.
456 457 458 459 460 461 462 463 464 465 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 456 def get_location(name, read_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) 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
Gets the version of the specified location, returning an Attributes message
that provides the attributes view as it appears to consumers, which may be
different than the merchant's information.
642 643 644 645 646 647 648 649 650 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 642 def get_location_attribute_google_updated(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}:getGoogleUpdated', ) 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
Looks up all the attributes set for a given location.
488 489 490 491 492 493 494 495 496 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 488 def get_location_attributes(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) 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
Gets the version of the specified location, returning a GoogleUpdatedLocation
that provides the location view as it appears to consumers and masks
indicating which fields are different than the merchant's information.
522 523 524 525 526 527 528 529 530 531 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 522 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', ) 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.
142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 142 def 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, &block) command = make_simple_command(:get, 'v1/{+parent}/locations', ) 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.
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 196 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', ) 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').
292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 292 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', ) 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.
560 561 562 563 564 565 566 567 568 569 570 571 572 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 560 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}', ) 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.
361 362 363 364 365 366 367 368 369 370 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 361 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', ) 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.
391 392 393 394 395 396 397 398 399 400 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 391 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', ) 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.
606 607 608 609 610 611 612 613 614 615 616 617 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 606 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}', ) 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 |