Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

MyBusinessAccountManagement

import { MyBusinessAccountManagement } from "https://googleapis.deno.dev/v1/mybusinessaccountmanagement:v1.ts";

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.

class MyBusinessAccountManagement {
constructor(client?: CredentialsClient, baseUrl?: string);
async accountsAdminsCreate(parent: string, req: Admin): Promise<Admin>;
async accountsAdminsDelete(name: string): Promise<Empty>;
async accountsAdminsList(parent: string): Promise<ListAccountAdminsResponse>;
async accountsAdminsPatch(
name: string,
req: Admin,
): Promise<Admin>;
async accountsCreate(req: Account): Promise<Account>;
async accountsGet(name: string): Promise<Account>;
async accountsInvitationsAccept(name: string, req: AcceptInvitationRequest): Promise<Empty>;
async accountsInvitationsDecline(name: string, req: DeclineInvitationRequest): Promise<Empty>;
async accountsInvitationsList(parent: string, opts?: AccountsInvitationsListOptions): Promise<ListInvitationsResponse>;
async accountsList(opts?: AccountsListOptions): Promise<ListAccountsResponse>;
async accountsPatch(
name: string,
req: Account,
): Promise<Account>;
async locationsAdminsCreate(parent: string, req: Admin): Promise<Admin>;
async locationsAdminsDelete(name: string): Promise<Empty>;
async locationsAdminsList(parent: string): Promise<ListLocationAdminsResponse>;
async locationsAdminsPatch(
name: string,
req: Admin,
): Promise<Admin>;
async locationsTransfer(name: string, req: TransferLocationRequest): Promise<Empty>;
}

§Constructors

§
new MyBusinessAccountManagement(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
accountsAdminsCreate(parent: string, req: Admin): Promise<Admin>
[src]

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.

@param parent

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

§
accountsAdminsDelete(name: string): Promise<Empty>
[src]

Removes the specified admin from the specified account.

@param name

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

§
accountsAdminsList(parent: string): Promise<ListAccountAdminsResponse>
[src]

Lists the admins for the specified account.

@param parent

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

§
accountsAdminsPatch(name: string, req: Admin, opts?: AccountsAdminsPatchOptions): Promise<Admin>
[src]

Updates the Admin for the specified Account Admin.

@param name

Immutable. 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: locations/{location_id}/admins/{admin_id} This field will be ignored if set during admin creation.

§
accountsCreate(req: Account): Promise<Account>
[src]

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.

§
accountsGet(name: string): Promise<Account>
[src]

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

@param name

Required. The name of the account to fetch.

§
accountsInvitationsAccept(name: string, req: AcceptInvitationRequest): Promise<Empty>
[src]

Accepts the specified invitation.

@param name

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

§
accountsInvitationsDecline(name: string, req: DeclineInvitationRequest): Promise<Empty>
[src]

Declines the specified invitation.

@param name

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

§
accountsInvitationsList(parent: string, opts?: AccountsInvitationsListOptions): Promise<ListInvitationsResponse>
[src]

Lists pending invitations for the specified account.

@param parent

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

§
accountsList(opts?: AccountsListOptions): Promise<ListAccountsResponse>
[src]

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.

§
accountsPatch(name: string, req: Account, opts?: AccountsPatchOptions): Promise<Account>
[src]

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

@param name

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

§
locationsAdminsCreate(parent: string, req: Admin): Promise<Admin>
[src]

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.

@param parent

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

§
locationsAdminsDelete(name: string): Promise<Empty>
[src]

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

@param name

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

§
locationsAdminsList(parent: string): Promise<ListLocationAdminsResponse>
[src]

Lists all of the admins for the specified location.

@param parent

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

§
locationsAdminsPatch(name: string, req: Admin, opts?: LocationsAdminsPatchOptions): Promise<Admin>
[src]

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

@param name

Immutable. 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: locations/{location_id}/admins/{admin_id} This field will be ignored if set during admin creation.

§
locationsTransfer(name: string, req: TransferLocationRequest): Promise<Empty>
[src]

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.

@param name

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