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 as last set by the merchant.
-
#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.
-
#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.
-
#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.
-
#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.
250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 250 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.
430 431 432 433 434 435 436 437 438 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 430 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.
333 334 335 336 337 338 339 340 341 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 333 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 as last set by the merchant. It may not reflect updates from Google or user-generated content that are live on Google Maps.
463 464 465 466 467 468 469 470 471 472 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 463 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
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.
653 654 655 656 657 658 659 660 661 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 653 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
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.
497 498 499 500 501 502 503 504 505 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 497 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
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.
533 534 535 536 537 538 539 540 541 542 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 533 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.
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 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.
202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 202 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').
298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 298 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.
571 572 573 574 575 576 577 578 579 580 581 582 583 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 571 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.
367 368 369 370 371 372 373 374 375 376 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 367 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.
397 398 399 400 401 402 403 404 405 406 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 397 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.
617 618 619 620 621 622 623 624 625 626 627 628 |
# File 'lib/google/apis/mybusinessbusinessinformation_v1/service.rb', line 617 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 |