accounts
Creates, updates, deletes, gets or lists an accounts resource.
Overview
| Name | accounts |
| Type | Resource |
| Id | google.cloudcommerceprocurement.accounts |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The resource name of the account. Account names have the form accounts/{account_id}. |
approvals | array | Output 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. |
createTime | string (google-datetime) | Output only. The creation timestamp. |
inputProperties | object | Output only. The custom properties that were collected from the user to create this account. |
provider | string | Output 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. |
resellerParentBillingAccount | string | Output only. The reseller parent billing account of the account's corresponding billing account, applicable only when the corresponding billing account is a subaccount of a reseller. Included in responses only for view: ACCOUNT_VIEW_FULL. Format: billingAccounts/{billing_account_id} |
state | string | Output 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. The resource name of the account. Account names have the form accounts/{account_id}. |
approvals | array | Output 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. |
createTime | string (google-datetime) | Output only. The creation timestamp. |
inputProperties | object | Output only. The custom properties that were collected from the user to create this account. |
provider | string | Output 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. |
resellerParentBillingAccount | string | Output only. The reseller parent billing account of the account's corresponding billing account, applicable only when the corresponding billing account is a subaccount of a reseller. Included in responses only for view: ACCOUNT_VIEW_FULL. Format: billingAccounts/{billing_account_id} |
state | string | Output 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. |
updateTime | string (google-datetime) | Output only. The last update timestamp. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | providersId, accountsId | view | Gets a requested Account resource. |
list | select | providersId | pageSize, pageToken | Lists Accounts that the provider has access to. |
reset | exec | providersId, accountsId | Resets an Account and cancels all associated Entitlements. Partner can only reset accounts they own rather than customer accounts. | |
reject | exec | providersId, accountsId | Rejects an approval on an Account. | |
approve | exec | providersId, accountsId | Grants an approval on an Account. |
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.
| Name | Datatype | Description |
|---|---|---|
accountsId | string | |
providersId | string | |
pageSize | integer (int32) | |
pageToken | string | |
view | string |
SELECT examples
- get
- list
Gets a requested Account resource.
SELECT
name,
approvals,
createTime,
inputProperties,
provider,
resellerParentBillingAccount,
state,
updateTime
FROM google.cloudcommerceprocurement.accounts
WHERE providersId = '{{ providersId }}' -- required
AND accountsId = '{{ accountsId }}' -- required
AND view = '{{ view }}'
;
Lists Accounts that the provider has access to.
SELECT
name,
approvals,
createTime,
inputProperties,
provider,
resellerParentBillingAccount,
state,
updateTime
FROM google.cloudcommerceprocurement.accounts
WHERE providersId = '{{ providersId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
Lifecycle Methods
- reset
- reject
- approve
Resets an Account and cancels all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.
EXEC google.cloudcommerceprocurement.accounts.reset
@providersId='{{ providersId }}' --required,
@accountsId='{{ accountsId }}' --required
;
Rejects an approval on an Account.
EXEC google.cloudcommerceprocurement.accounts.reject
@providersId='{{ providersId }}' --required,
@accountsId='{{ accountsId }}' --required
@@json=
'{
"approvalName": "{{ approvalName }}",
"reason": "{{ reason }}"
}'
;
Grants an approval on an Account.
EXEC google.cloudcommerceprocurement.accounts.approve
@providersId='{{ providersId }}' --required,
@accountsId='{{ accountsId }}' --required
@@json=
'{
"approvalName": "{{ approvalName }}",
"reason": "{{ reason }}",
"properties": "{{ properties }}"
}'
;