Class: Google::Apis::MybusinessaccountmanagementV1::MyBusinessAccountManagementService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/mybusinessaccountmanagement_v1/service.rb

Overview

My Business Account Management API

The My Business Account Management API provides an interface for managing access to a location on Google. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.

Examples:

require 'google/apis/mybusinessaccountmanagement_v1'

Mybusinessaccountmanagement = Google::Apis::MybusinessaccountmanagementV1 # Alias the module
service = Mybusinessaccountmanagement::MyBusinessAccountManagementService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://mybusinessaccountmanagement.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMyBusinessAccountManagementService

Returns a new instance of MyBusinessAccountManagementService.



49
50
51
52
53
54
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 49

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-mybusinessaccountmanagement_v1',
        client_version: Google::Apis::MybusinessaccountmanagementV1::GEM_VERSION)
  @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.



42
43
44
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 42

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.



47
48
49
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 47

def quota_user
  @quota_user
end

Instance Method Details

#accept_invitation(name, accept_invitation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::Empty

Accepts the specified invitation.

Parameters:

  • name (String)

    Required. The name of the invitation that is being accepted. accounts/ account_id/invitations/invitation_id``

  • accept_invitation_request_object (Google::Apis::MybusinessaccountmanagementV1::AcceptInvitationRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



373
374
375
376
377
378
379
380
381
382
383
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 373

def accept_invitation(name, accept_invitation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:accept', options)
  command.request_representation = Google::Apis::MybusinessaccountmanagementV1::AcceptInvitationRequest::Representation
  command.request_object = accept_invitation_request_object
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Empty::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::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(account_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::Account

Creates an account with the specified name and type under the given parent. - Personal accounts and Organizations cannot be created. - User Groups cannot be created with a Personal account as primary owner. - Location Groups cannot be created with a primary owner of a Personal account if the Personal account is in an Organization. - Location Groups cannot own Location Groups.

Parameters:

  • account_object (Google::Apis::MybusinessaccountmanagementV1::Account) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



79
80
81
82
83
84
85
86
87
88
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 79

def ( = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/accounts', options)
  command.request_representation = Google::Apis::MybusinessaccountmanagementV1::Account::Representation
  command.request_object = 
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Account::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::Account
  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(parent, admin_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::Admin

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

Parameters:

  • parent (String)

    Required. The resource name of the account this admin is created for. accounts/account_id``.

  • admin_object (Google::Apis::MybusinessaccountmanagementV1::Admin) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



237
238
239
240
241
242
243
244
245
246
247
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 237

def (parent, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/admins', options)
  command.request_representation = Google::Apis::MybusinessaccountmanagementV1::Admin::Representation
  command.request_object = admin_object
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Admin::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::Admin
  command.params['parent'] = parent unless parent.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_location_admin(parent, admin_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::Admin

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

Parameters:

  • parent (String)

    Required. The resource name of the location this admin is created for. locations/location_id/admins.

  • admin_object (Google::Apis::MybusinessaccountmanagementV1::Admin) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



514
515
516
517
518
519
520
521
522
523
524
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 514

def create_location_admin(parent, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+parent}/admins', options)
  command.request_representation = Google::Apis::MybusinessaccountmanagementV1::Admin::Representation
  command.request_object = admin_object
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Admin::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::Admin
  command.params['parent'] = parent unless parent.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#decline_invitation(name, decline_invitation_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::Empty

Declines the specified invitation.

Parameters:

  • name (String)

    Required. The name of the account invitation that is being declined. accounts/ account_id/invitations/invitation_id``

  • decline_invitation_request_object (Google::Apis::MybusinessaccountmanagementV1::DeclineInvitationRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



407
408
409
410
411
412
413
414
415
416
417
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 407

def decline_invitation(name, decline_invitation_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:decline', options)
  command.request_representation = Google::Apis::MybusinessaccountmanagementV1::DeclineInvitationRequest::Representation
  command.request_object = decline_invitation_request_object
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Empty::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::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_admin(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::Empty

Removes the specified admin from the specified account.

Parameters:

  • name (String)

    Required. The resource name of the admin to remove from the account. accounts/ account_id/admins/admin_id``.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



270
271
272
273
274
275
276
277
278
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 270

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

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

Parameters:

  • name (String)

    Required. The resource name of the admin to remove from the location.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



546
547
548
549
550
551
552
553
554
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 546

def delete_location_admin(name, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/{+name}', options)
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Empty::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::Empty
  command.params['name'] = name unless name.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::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)

    Required. The name of the account to fetch.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



111
112
113
114
115
116
117
118
119
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 111

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

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

Lists the admins for the specified account.

Parameters:

  • parent (String)

    Required. The name of the account from which to retrieve a list of admins. accounts/account_id/admins.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



301
302
303
304
305
306
307
308
309
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 301

def (parent, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/admins', options)
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::ListAccountAdminsResponse::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::ListAccountAdminsResponse
  command.params['parent'] = parent unless parent.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_invitations(parent, filter: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::ListInvitationsResponse

Lists pending invitations for the specified account.

Parameters:

  • parent (String)

    Required. The name of the account from which the list of invitations is being retrieved. accounts/account_id/invitations

  • filter (String) (defaults to: nil)

    Optional. Filtering the response is supported via the Invitation.target_type field.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



443
444
445
446
447
448
449
450
451
452
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 443

def (parent, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/invitations', options)
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::ListInvitationsResponse::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::ListInvitationsResponse
  command.params['parent'] = parent unless parent.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(filter: nil, page_size: nil, page_token: nil, parent_account: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::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:

  • filter (String) (defaults to: nil)

    Optional. A filter constraining the accounts to return. The response includes only entries that match the filter. If filter is empty, then no constraints are applied and all accounts (paginated) are retrieved for the requested account. For example, a request with the filter type=USER_GROUP will only return user groups. The type field is the only supported filter.

  • page_size (Fixnum) (defaults to: nil)

    Optional. How many accounts to fetch per page. The default and maximum is 20.

  • page_token (String) (defaults to: nil)

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

  • parent_account (String) (defaults to: nil)

    Optional. The resource name of the account for which the list of directly accessible accounts is to be retrieved. This only makes sense for Organizations and User Groups. If empty, will return ListAccounts for the authenticated user. accounts/account_id``.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 158

def list_accounts(filter: nil, page_size: nil, page_token: nil, parent_account: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/accounts', options)
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::ListAccountsResponse::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::ListAccountsResponse
  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['parentAccount'] =  unless .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_location_admins(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::ListLocationAdminsResponse

Lists all of the admins for the specified location.

Parameters:

  • parent (String)

    Required. The name of the location to list admins of. locations/location_id/ admins.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



577
578
579
580
581
582
583
584
585
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 577

def list_location_admins(parent, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/admins', options)
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::ListLocationAdminsResponse::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::ListLocationAdminsResponse
  command.params['parent'] = parent unless parent.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(name, account_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::Account

Updates the specified business account. Personal accounts cannot be updated using this method.

Parameters:

  • name (String)

    Immutable. The resource name, in the format accounts/account_id``.

  • account_object (Google::Apis::MybusinessaccountmanagementV1::Account) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Required. The specific fields that should be updated. The only editable field is accountName.

  • validate_only (Boolean) (defaults to: nil)

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

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 199

def (name,  = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::MybusinessaccountmanagementV1::Account::Representation
  command.request_object = 
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Account::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::Account
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['validateOnly'] = validate_only unless validate_only.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

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

Updates the Admin for the specified Account Admin.

Parameters:

  • name (String)

    Immutable. The resource name. For account admins, this is in the form: accounts/account_id/admins/admin_idFor location admins, this is in the form: `locations/`location_id`/admins/`admin_id This field will be ignored if set during admin creation.

  • admin_object (Google::Apis::MybusinessaccountmanagementV1::Admin) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Required. The specific fields that should be updated. The only editable field is role.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 338

def (name, admin_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::MybusinessaccountmanagementV1::Admin::Representation
  command.request_object = admin_object
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Admin::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::Admin
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

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

Updates the Admin for the specified location. Only the AdminRole of the Admin can be updated.

Parameters:

  • name (String)

    Immutable. The resource name. For account admins, this is in the form: accounts/account_id/admins/admin_idFor location admins, this is in the form: `locations/`location_id`/admins/`admin_id This field will be ignored if set during admin creation.

  • admin_object (Google::Apis::MybusinessaccountmanagementV1::Admin) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Required. The specific fields that should be updated. The only editable field is role.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



615
616
617
618
619
620
621
622
623
624
625
626
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 615

def patch_location_admin(name, admin_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:patch, 'v1/{+name}', options)
  command.request_representation = Google::Apis::MybusinessaccountmanagementV1::Admin::Representation
  command.request_object = admin_object
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Admin::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::Admin
  command.params['name'] = name unless name.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

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

Moves a location from an account that the user owns to another account that the same user administers. The user must be an owner of the account the location is currently associated with and must also be at least a manager of the destination account.

Parameters:

  • name (String)

    Required. The name of the location to transfer. locations/location_id``.

  • transfer_location_request_object (Google::Apis::MybusinessaccountmanagementV1::TransferLocationRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

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

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



478
479
480
481
482
483
484
485
486
487
488
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 478

def transfer_location(name, transfer_location_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/{+name}:transfer', options)
  command.request_representation = Google::Apis::MybusinessaccountmanagementV1::TransferLocationRequest::Representation
  command.request_object = transfer_location_request_object
  command.response_representation = Google::Apis::MybusinessaccountmanagementV1::Empty::Representation
  command.response_class = Google::Apis::MybusinessaccountmanagementV1::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