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

Methods included from Core::Logging

#logger

Constructor Details

#initializeMybusinessService

Returns a new instance of MybusinessService



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

def initialize
  super('https://mybusiness.googleapis.com/', '')
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • validate_only (Boolean)

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

  • request_id (String)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • page_token (String)

    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)

    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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • page_token (String)

    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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Resource name of the location to lookup available attributes.

  • category_id (String)

    The primary category stable id to find available attributes.

  • country (String)

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

  • language_code (String)

    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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • page_token (String)

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

  • order_by (String)

    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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

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

  • field_mask (String)

    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)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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)

    The language of the account update.

  • validate_only (Boolean)

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

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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

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