Skip to main content

accounts

Creates, updates, deletes, gets or lists an accounts resource.

Overview

Nameaccounts
TypeResource
Idgoogle.cloudcommerceprocurement.accounts

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. The resource name of the account. Account names have the form accounts/{account_id}.
approvalsarrayOutput only. The approvals for this account. These approvals are used to track actions that are permitted or have been completed by a customer within the context of the provider. This might include a sign up flow or a provisioning step, for example, that the provider can admit to having happened.
createTimestring (google-datetime)Output only. The creation timestamp.
inputPropertiesobjectOutput only. The custom properties that were collected from the user to create this account.
providerstringOutput only. The identifier of the service provider that this account was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform.
statestringOutput only. The state of the account. This is used to decide whether the customer is in good standing with the provider and is able to make purchases. An account might not be able to make a purchase if the billing account is suspended, for example.
updateTimestring (google-datetime)Output only. The last update timestamp.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprovidersId, accountsIdGets a requested Account resource.
listselectprovidersIdpageSize, pageTokenLists Accounts that the provider has access to.
approveexecprovidersId, accountsIdGrants an approval on an Account.
rejectexecprovidersId, accountsIdRejects an approval on an Account.
resetexecprovidersId, accountsIdResets an Account and cancels all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
accountsIdstring
providersIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Gets a requested Account resource.

SELECT
name,
approvals,
createTime,
inputProperties,
provider,
state,
updateTime
FROM google.cloudcommerceprocurement.accounts
WHERE providersId = '{{ providersId }}' -- required
AND accountsId = '{{ accountsId }}' -- required;

Lifecycle Methods

Grants an approval on an Account.

EXEC google.cloudcommerceprocurement.accounts.approve 
@providersId='{{ providersId }}' --required,
@accountsId='{{ accountsId }}' --required
@@json=
'{
"properties": "{{ properties }}",
"approvalName": "{{ approvalName }}",
"reason": "{{ reason }}"
}';