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:



286
287
288
289
290
291
292
293
294
295
296
# File 'generated/google/apis/mybusiness_v3/service.rb', line 286

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:



319
320
321
322
323
324
325
326
327
328
329
# File 'generated/google/apis/mybusiness_v3/service.rb', line 319

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:



353
354
355
356
357
358
359
360
361
362
363
# File 'generated/google/apis/mybusiness_v3/service.rb', line 353

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:



190
191
192
193
194
195
196
197
198
199
200
# File 'generated/google/apis/mybusiness_v3/service.rb', line 190

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, request_id: nil, validate_only: 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.

  • request_id (String)

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

  • validate_only (Boolean)

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



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

def (name, location_object = nil, language_code: nil, request_id: nil, validate_only: 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['requestId'] = request_id unless request_id.nil?
  command.query['validateOnly'] = validate_only unless validate_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

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



698
699
700
701
702
703
704
705
706
707
708
# File 'generated/google/apis/mybusiness_v3/service.rb', line 698

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:



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

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:



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

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:



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

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:



791
792
793
794
795
796
797
798
799
# File 'generated/google/apis/mybusiness_v3/service.rb', line 791

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:



467
468
469
470
471
472
473
474
475
476
477
# File 'generated/google/apis/mybusiness_v3/service.rb', line 467

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:



72
73
74
75
76
77
78
79
80
# File 'generated/google/apis/mybusiness_v3/service.rb', line 72

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:



500
501
502
503
504
505
506
507
508
# File 'generated/google/apis/mybusiness_v3/service.rb', line 500

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:



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

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:



823
824
825
826
827
828
829
830
831
# File 'generated/google/apis/mybusiness_v3/service.rb', line 823

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:



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



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(: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, filter: nil, page_size: nil, page_token: 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.

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

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

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



577
578
579
580
581
582
583
584
585
586
587
588
# File 'generated/google/apis/mybusiness_v3/service.rb', line 577

def (name, filter: nil, page_size: nil, page_token: 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['filter'] = filter unless filter.nil?
  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_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:



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

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(category_id: nil, country: nil, language_code: nil, name: 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:

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

  • name (String)

    Resource name of the location to lookup available attributes.

  • 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(category_id: nil, country: nil, language_code: nil, name: 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['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['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_reviews(name, order_by: nil, page_size: nil, page_token: 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.

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

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

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



863
864
865
866
867
868
869
870
871
872
873
874
# File 'generated/google/apis/mybusiness_v3/service.rb', line 863

def list_reviews(name, order_by: nil, page_size: nil, page_token: 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['orderBy'] = order_by unless order_by.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['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, field_mask: nil, language_code: 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)
  • 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.

  • language_code (String)

    The language of the location update. Currently this is used to disambiguate what localized categories are valid for this update 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:



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

def (name, location_object = nil, field_mask: nil, language_code: 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['fieldMask'] = field_mask unless field_mask.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

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



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

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