Class: Google::Apis::MybusinessV3::MybusinessService

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

Overview

Google My Business API

The Google My Business API provides an interface for managing business location information on Google.

Examples:

require 'google/apis/mybusiness_v3'

Mybusiness = Google::Apis::MybusinessV3 # Alias the module
service = Mybusiness::MybusinessService.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

Constructor Details

#initializeMybusinessService

Returns a new instance of MybusinessService.


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

def initialize
  super('https://mybusiness.googleapis.com/', '')
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.


39
40
41
# File 'generated/google/apis/mybusiness_v3/service.rb', line 39

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.


44
45
46
# File 'generated/google/apis/mybusiness_v3/service.rb', line 44

def quota_user
  @quota_user
end

Instance Method Details

#associate_location(name, associate_location_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Empty

Associates a location to a place ID. Any previous association is overwritten. This operation is only valid if the location is unverified. The association must be valid, i.e. appear in the list of FindMatchingLocations.

Parameters:

  • name (String)

    The resource name of the location to associate.

  • associate_location_request_object (Google::Apis::MybusinessV3::AssociateLocationRequest) (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:


590
591
592
593
594
595
596
597
598
599
600
# File 'generated/google/apis/mybusiness_v3/service.rb', line 590

def associate_location(name, associate_location_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v3/{+name}:associate', options)
  command.request_representation = Google::Apis::MybusinessV3::AssociateLocationRequest::Representation
  command.request_object = associate_location_request_object
  command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
  command.response_class = Google::Apis::MybusinessV3::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

#batch_get_locations(name, batch_get_locations_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::BatchGetLocationsResponse

Gets all of the specified locations in the given account.

Parameters:

  • name (String)

    The name of the account from which to fetch locations.

  • batch_get_locations_request_object (Google::Apis::MybusinessV3::BatchGetLocationsRequest) (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:


362
363
364
365
366
367
368
369
370
371
372
# File 'generated/google/apis/mybusiness_v3/service.rb', line 362

def batch_get_locations(name, batch_get_locations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v3/{+name}/locations:batchGet', options)
  command.request_representation = Google::Apis::MybusinessV3::BatchGetLocationsRequest::Representation
  command.request_object = batch_get_locations_request_object
  command.response_representation = Google::Apis::MybusinessV3::BatchGetLocationsResponse::Representation
  command.response_class = Google::Apis::MybusinessV3::BatchGetLocationsResponse
  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

#clear_account_location_association(name, clear_location_association_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Empty

Clears an assocation between a location and its place ID. This operation is only valid if the location is unverified.

Parameters:

  • name (String)

    The resource name of the location to disassociate.

  • clear_location_association_request_object (Google::Apis::MybusinessV3::ClearLocationAssociationRequest) (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:


624
625
626
627
628
629
630
631
632
633
634
# File 'generated/google/apis/mybusiness_v3/service.rb', line 624

def (name, clear_location_association_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v3/{+name}:clearAssociation', options)
  command.request_representation = Google::Apis::MybusinessV3::ClearLocationAssociationRequest::Representation
  command.request_object = clear_location_association_request_object
  command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
  command.response_class = Google::Apis::MybusinessV3::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

#create_account_admin(name, admin_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Admin

Invites the specified user to become an administrator on the specified account. The invitee must accept the invitation in order to be granted access to the account.

Parameters:

  • name (String)

    The resource name. For account admins, this is in the form: accounts/account_id/admins/admin_id For location admins, this is in the form: `accounts/`account_id`/locations/`location_id`/admins/`admin_id

  • admin_object (Google::Apis::MybusinessV3::Admin) (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:


219
220
221
222
223
224
225
226
227
228
229
# File 'generated/google/apis/mybusiness_v3/service.rb', line 219

def (name, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v3/{+name}/admins', options)
  command.request_representation = Google::Apis::MybusinessV3::Admin::Representation
  command.request_object = admin_object
  command.response_representation = Google::Apis::MybusinessV3::Admin::Representation
  command.response_class = Google::Apis::MybusinessV3::Admin
  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

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

Creates a new location owned by the specified account, and returns it.

Parameters:

  • name (String)

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

  • location_object (Google::Apis::MybusinessV3::Location) (defaults to: nil)
  • language_code (String) (defaults to: nil)

    The language of the location update. Currently this is used to disambiguate what localized categories are valid for this create request.

  • validate_only (Boolean) (defaults to: nil)

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

  • request_id (String) (defaults to: nil)

    A unique request ID for the server to detect duplicated requests. UUIDs are recommended. Max length is 50 characters.

  • 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:


435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'generated/google/apis/mybusiness_v3/service.rb', line 435

def (name, location_object = nil, language_code: nil, validate_only: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v3/{+name}/locations', options)
  command.request_representation = Google::Apis::MybusinessV3::Location::Representation
  command.request_object = location_object
  command.response_representation = Google::Apis::MybusinessV3::Location::Representation
  command.response_class = Google::Apis::MybusinessV3::Location
  command.params['name'] = name unless name.nil?
  command.query['languageCode'] = language_code unless language_code.nil?
  command.query['validateOnly'] = validate_only unless validate_only.nil?
  command.query['requestId'] = request_id unless request_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_account_location_admin(name, admin_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Admin

Invites the specified user to become an administrator on the specified location. The invitee must accept the invitation in order to be granted access to the location.

Parameters:

  • name (String)

    The resource name. For account admins, this is in the form: accounts/account_id/admins/admin_id For location admins, this is in the form: `accounts/`account_id`/locations/`location_id`/admins/`admin_id

  • admin_object (Google::Apis::MybusinessV3::Admin) (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:


727
728
729
730
731
732
733
734
735
736
737
# File 'generated/google/apis/mybusiness_v3/service.rb', line 727

def (name, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v3/{+name}/admins', options)
  command.request_representation = Google::Apis::MybusinessV3::Admin::Representation
  command.request_object = admin_object
  command.response_representation = Google::Apis::MybusinessV3::Admin::Representation
  command.response_class = Google::Apis::MybusinessV3::Admin
  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

#delete_account_admin(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Empty

Removes the specified admin from the specified account.

Parameters:

  • name (String)

    The resource name of the admin to remove from the account.

  • 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:


251
252
253
254
255
256
257
258
259
# File 'generated/google/apis/mybusiness_v3/service.rb', line 251

def (name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v3/{+name}', options)
  command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
  command.response_class = Google::Apis::MybusinessV3::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

#delete_account_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Empty

Deletes a location. Note: If this location has an associated Google+ page, as indicated by a plus_page_id in the LocationKey, it cannot be deleted using the API, it must be done using the Google My Business website. Returns NOT_FOUND if the location does not exist.

Parameters:

  • name (String)

    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:


522
523
524
525
526
527
528
529
530
# File 'generated/google/apis/mybusiness_v3/service.rb', line 522

def (name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v3/{+name}', options)
  command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
  command.response_class = Google::Apis::MybusinessV3::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

#delete_account_location_admin(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Empty

Removes the specified admin as a manager of the specified location.

Parameters:

  • name (String)

    The resource name of the admin to remove from 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:


759
760
761
762
763
764
765
766
767
# File 'generated/google/apis/mybusiness_v3/service.rb', line 759

def (name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v3/{+name}', options)
  command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
  command.response_class = Google::Apis::MybusinessV3::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

#delete_reply(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Empty

Deletes the response to the specified review. This operation is only valid if the specified location is verified.

Parameters:

  • name (String)

    The name of the review reply 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:


900
901
902
903
904
905
906
907
908
# File 'generated/google/apis/mybusiness_v3/service.rb', line 900

def delete_reply(name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:delete, 'v3/{+name}/reply', options)
  command.response_representation = Google::Apis::MybusinessV3::Empty::Representation
  command.response_class = Google::Apis::MybusinessV3::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

#find_account_location_matches(name, find_matching_locations_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::FindMatchingLocationsResponse

Finds all of the possible locations that are a match to the specified location. This operation is only valid if the location is unverified.

Parameters:

  • name (String)

    The resource name of the location to find matches for.

  • find_matching_locations_request_object (Google::Apis::MybusinessV3::FindMatchingLocationsRequest) (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:


554
555
556
557
558
559
560
561
562
563
564
# File 'generated/google/apis/mybusiness_v3/service.rb', line 554

def (name, find_matching_locations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v3/{+name}:findMatches', options)
  command.request_representation = Google::Apis::MybusinessV3::FindMatchingLocationsRequest::Representation
  command.request_object = find_matching_locations_request_object
  command.response_representation = Google::Apis::MybusinessV3::FindMatchingLocationsResponse::Representation
  command.response_class = Google::Apis::MybusinessV3::FindMatchingLocationsResponse
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Account

Gets the specified account. Returns NOT_FOUND if the account does not exist or if the caller does not have access rights to it.

Parameters:

  • name (String)

    The name of the account to fetch.

  • 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:


109
110
111
112
113
114
115
116
117
# File 'generated/google/apis/mybusiness_v3/service.rb', line 109

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

#get_account_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Location

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

Parameters:

  • name (String)

    The name of the location to fetch.

  • 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:


331
332
333
334
335
336
337
338
339
# File 'generated/google/apis/mybusiness_v3/service.rb', line 331

def (name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}', options)
  command.response_representation = Google::Apis::MybusinessV3::Location::Representation
  command.response_class = Google::Apis::MybusinessV3::Location
  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_google_updated_account_location(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::GoogleUpdatedLocation

Gets the Google updated version of the specified location. Returns NOT_FOUND if the location does not exist.

Parameters:

  • name (String)

    The name of the location to fetch.

  • 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:


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

def (name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}:googleUpdated', options)
  command.response_representation = Google::Apis::MybusinessV3::GoogleUpdatedLocation::Representation
  command.response_class = Google::Apis::MybusinessV3::GoogleUpdatedLocation
  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_review(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Review

Returns the specified review. This operation is only valid if the specified location is verified. Returns NOT_FOUND if the review does not exist, or has been deleted.

Parameters:

  • name (String)

    The name of the review to fetch.

  • 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:


834
835
836
837
838
839
840
841
842
# File 'generated/google/apis/mybusiness_v3/service.rb', line 834

def get_review(name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}', options)
  command.response_representation = Google::Apis::MybusinessV3::Review::Representation
  command.response_class = Google::Apis::MybusinessV3::Review
  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

#list_account_admins(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::ListAccountAdminsResponse

Lists the admins for the specified account.

Parameters:

  • name (String)

    The name of the account from which to retrieve a list of admins.

  • 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:


183
184
185
186
187
188
189
190
191
# File 'generated/google/apis/mybusiness_v3/service.rb', line 183

def (name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}/admins', options)
  command.response_representation = Google::Apis::MybusinessV3::ListAccountAdminsResponse::Representation
  command.response_class = Google::Apis::MybusinessV3::ListAccountAdminsResponse
  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

#list_account_location_admins(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::ListLocationAdminsResponse

Lists all of the admins for the specified location.

Parameters:

  • name (String)

    The name of the location to list admins of.

  • 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:


691
692
693
694
695
696
697
698
699
# File 'generated/google/apis/mybusiness_v3/service.rb', line 691

def (name, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}/admins', options)
  command.response_representation = Google::Apis::MybusinessV3::ListLocationAdminsResponse::Representation
  command.response_class = Google::Apis::MybusinessV3::ListLocationAdminsResponse
  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

#list_account_locations(name, page_size: nil, page_token: nil, filter: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::ListLocationsResponse

Lists the locations for the specified account.

Parameters:

  • name (String)

    The name of the account to fetch locations from.

  • page_size (Fixnum) (defaults to: nil)

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

  • page_token (String) (defaults to: nil)

    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.

  • filter (String) (defaults to: nil)

    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. Further information on valid filter fields and example usage is available here .

  • 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:


297
298
299
300
301
302
303
304
305
306
307
308
# File 'generated/google/apis/mybusiness_v3/service.rb', line 297

def (name, page_size: nil, page_token: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}/locations', options)
  command.response_representation = Google::Apis::MybusinessV3::ListLocationsResponse::Representation
  command.response_class = Google::Apis::MybusinessV3::ListLocationsResponse
  command.params['name'] = name unless name.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['filter'] = filter unless filter.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_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::ListAccountsResponse

Lists all of the accounts for the authenticated user. This includes all accounts that the user owns, as well as any accounts for which the user has management rights.

Parameters:

  • page_size (Fixnum) (defaults to: nil)

    How many accounts to fetch per page. Default is 50, minimum is 1, and maximum page size is 50.

  • page_token (String) (defaults to: nil)

    If specified, the next page of accounts is retrieved. The pageToken is returned when a call to accounts.list returns more results than can fit into the requested page size.

  • 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:


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

def list_accounts(page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/accounts', options)
  command.response_representation = Google::Apis::MybusinessV3::ListAccountsResponse::Representation
  command.response_class = Google::Apis::MybusinessV3::ListAccountsResponse
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_attributes(name: nil, category_id: nil, country: nil, language_code: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse

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

Parameters:

  • name (String) (defaults to: nil)

    Resource name of the location to lookup available attributes.

  • category_id (String) (defaults to: nil)

    The primary category stable id to find available attributes.

  • country (String) (defaults to: nil)

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

  • 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.

  • 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:


938
939
940
941
942
943
944
945
946
947
948
949
# File 'generated/google/apis/mybusiness_v3/service.rb', line 938

def list_attributes(name: nil, category_id: nil, country: nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/attributes', options)
  command.response_representation = Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse::Representation
  command.response_class = Google::Apis::MybusinessV3::ListLocationAttributeMetadataResponse
  command.query['name'] = name unless name.nil?
  command.query['categoryId'] = category_id unless category_id.nil?
  command.query['country'] = country unless country.nil?
  command.query['languageCode'] = language_code unless language_code.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_reviews(name, page_size: nil, page_token: nil, order_by: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::ListReviewsResponse

Returns the paginated list of reviews for the specified location. This operation is only valid if the specified location is verified.

Parameters:

  • name (String)

    The name of the location to fetch reviews for.

  • page_size (Fixnum) (defaults to: nil)

    How many reviews to fetch per page. The maximum page_size is 200.

  • page_token (String) (defaults to: nil)

    If specified, it fetches the next ‘page’ of reviews.

  • order_by (String) (defaults to: nil)

    Specifies the field to sort reviews by. If unspecified, the order of reviews returned will default to "update_timedesc". Valid orders to sort by are rating and ratingdesc and update_timedesc.

  • 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:


799
800
801
802
803
804
805
806
807
808
809
810
# File 'generated/google/apis/mybusiness_v3/service.rb', line 799

def list_reviews(name, page_size: nil, page_token: nil, order_by: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:get, 'v3/{+name}/reviews', options)
  command.response_representation = Google::Apis::MybusinessV3::ListReviewsResponse::Representation
  command.response_class = Google::Apis::MybusinessV3::ListReviewsResponse
  command.params['name'] = name unless name.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#patch_account_location(name, location_object = nil, language_code: nil, field_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Location

Updates the specified location. Photos are only allowed on a location that has a Google+ page. Returns NOT_FOUND if the location does not exist.

Parameters:

  • name (String)

    The name of the location to update.

  • location_object (Google::Apis::MybusinessV3::Location) (defaults to: nil)
  • language_code (String) (defaults to: nil)

    The language of the location update. Currently this is used to disambiguate what localized categories are valid for this update request.

  • field_mask (String) (defaults to: nil)

    The specific fields to update. If no mask is specified, then this is treated as a full update and all fields are set to the values passed in, which may include unsetting empty fields in the request.

  • validate_only (Boolean) (defaults to: nil)

    If true, the request is validated without actually updating 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:


482
483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'generated/google/apis/mybusiness_v3/service.rb', line 482

def (name, location_object = nil, language_code: nil, field_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:patch, 'v3/{+name}', options)
  command.request_representation = Google::Apis::MybusinessV3::Location::Representation
  command.request_object = location_object
  command.response_representation = Google::Apis::MybusinessV3::Location::Representation
  command.response_class = Google::Apis::MybusinessV3::Location
  command.params['name'] = name unless name.nil?
  command.query['languageCode'] = language_code unless language_code.nil?
  command.query['fieldMask'] = field_mask unless field_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

#reply_to_review(name, review_reply_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::ReviewReply

Updates the reply to the specified review. A reply is created if one does not exist. This operation is only valid if the specified location is verified.

Parameters:

  • name (String)

    The name of the review to respond to.

  • review_reply_object (Google::Apis::MybusinessV3::ReviewReply) (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:


867
868
869
870
871
872
873
874
875
876
877
# File 'generated/google/apis/mybusiness_v3/service.rb', line 867

def reply_to_review(name, review_reply_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v3/{+name}/reply', options)
  command.request_representation = Google::Apis::MybusinessV3::ReviewReply::Representation
  command.request_object = review_reply_object
  command.response_representation = Google::Apis::MybusinessV3::ReviewReply::Representation
  command.response_class = Google::Apis::MybusinessV3::ReviewReply
  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

#transfer_location(name, transfer_location_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Location

Transfer a location from one account to another. The current account that the location is associated with and the destination account must have the same ultimate owner. Returns the Location with its new resource name.

Parameters:

  • name (String)

    The name of the location to transfer.

  • transfer_location_request_object (Google::Apis::MybusinessV3::TransferLocationRequest) (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:


659
660
661
662
663
664
665
666
667
668
669
# File 'generated/google/apis/mybusiness_v3/service.rb', line 659

def transfer_location(name, transfer_location_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:post, 'v3/{+name}:transfer', options)
  command.request_representation = Google::Apis::MybusinessV3::TransferLocationRequest::Representation
  command.request_object = transfer_location_request_object
  command.response_representation = Google::Apis::MybusinessV3::Location::Representation
  command.response_class = Google::Apis::MybusinessV3::Location
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_account(name, account_object = nil, language_code: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessV3::Account

Updates the specified business account. Personal accounts cannot be updated using this method. Note: At this time the only editable field for an account is account_name. Any other fields passed in (such as type, role, and verified) is ignored.

Parameters:

  • name (String)

    The name of the account to update.

  • account_object (Google::Apis::MybusinessV3::Account) (defaults to: nil)
  • language_code (String) (defaults to: nil)

    The language of the account update.

  • validate_only (Boolean) (defaults to: nil)

    If true, the request is validated without actually updating the account.

  • 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:


149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'generated/google/apis/mybusiness_v3/service.rb', line 149

def (name,  = nil, language_code: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command =  make_simple_command(:put, 'v3/{+name}', options)
  command.request_representation = Google::Apis::MybusinessV3::Account::Representation
  command.request_object = 
  command.response_representation = Google::Apis::MybusinessV3::Account::Representation
  command.response_class = Google::Apis::MybusinessV3::Account
  command.params['name'] = name unless name.nil?
  command.query['languageCode'] = language_code unless language_code.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