Class: Google::Apis::MybusinessaccountmanagementV1::MyBusinessAccountManagementService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MybusinessaccountmanagementV1::MyBusinessAccountManagementService
- 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.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#get_account(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::Account
Gets the specified account.
-
#initialize ⇒ MyBusinessAccountManagementService
constructor
A new instance of MyBusinessAccountManagementService.
-
#list_account_admins(parent, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessaccountmanagementV1::ListAccountAdminsResponse
Lists the admins for the specified account.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
Constructor Details
#initialize ⇒ MyBusinessAccountManagementService
Returns a new instance of MyBusinessAccountManagementService.
46 47 48 49 50 51 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 46 def initialize super('https://mybusinessaccountmanagement.googleapis.com/', '', client_name: 'google-apis-mybusinessaccountmanagement_v1', client_version: Google::Apis::MybusinessaccountmanagementV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
39 40 41 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 39 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
44 45 46 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 44 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.
370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 370 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', ) 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.
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 76 def create_account(account_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/accounts', ) command.request_representation = Google::Apis::MybusinessaccountmanagementV1::Account::Representation command.request_object = account_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.
234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 234 def create_account_admin(parent, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/admins', ) 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.
511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 511 def create_location_admin(parent, admin_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/admins', ) 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.
404 405 406 407 408 409 410 411 412 413 414 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 404 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', ) 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.
267 268 269 270 271 272 273 274 275 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 267 def delete_account_admin(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) 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.
543 544 545 546 547 548 549 550 551 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 543 def delete_location_admin(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) 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.
108 109 110 111 112 113 114 115 116 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 108 def get_account(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) 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.
298 299 300 301 302 303 304 305 306 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 298 def list_account_admins(parent, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/admins', ) 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.
440 441 442 443 444 445 446 447 448 449 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 440 def list_account_invitations(parent, filter: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/invitations', ) 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.
155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 155 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', ) 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'] = parent_account unless parent_account.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.
574 575 576 577 578 579 580 581 582 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 574 def list_location_admins(parent, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/admins', ) 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.
196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 196 def patch_account(name, account_object = nil, update_mask: nil, validate_only: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::MybusinessaccountmanagementV1::Account::Representation command.request_object = account_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.
335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 335 def patch_account_admin(name, admin_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) 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.
612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 612 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}', ) 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.
475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/google/apis/mybusinessaccountmanagement_v1/service.rb', line 475 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', ) 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 |