accounts
Creates, updates, deletes, gets or lists an accounts
resource.
Overview
Name | accounts |
Type | Resource |
Id | netlify.account_membership.accounts |
Fields
The following fields are returned by SELECT
queries:
- getAccount
- listAccountsForUser
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
payment_method_id | string | |
type_id | string | |
billing_name | string | |
type_name | string | |
billing_details | string | |
billing_email | string | |
billing_period | string | |
capabilities | object | |
created_at | string (dateTime) | |
owner_ids | array | |
roles_allowed | array | |
slug | string | |
type | string | |
updated_at | string (dateTime) |
Name | Datatype | Description |
---|---|---|
id | string | |
name | string | |
payment_method_id | string | |
type_id | string | |
billing_name | string | |
type_name | string | |
billing_details | string | |
billing_email | string | |
billing_period | string | |
capabilities | object | |
created_at | string (dateTime) | |
owner_ids | array | |
roles_allowed | array | |
slug | string | |
type | string | |
updated_at | string (dateTime) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
getAccount | select | account_id | ||
listAccountsForUser | select | |||
createAccount | insert | data__name , data__type_id | ||
cancelAccount | exec | account_id | ||
updateAccount | exec | account_id |
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 |
---|---|---|
account_id | string |
SELECT
examples
- getAccount
- listAccountsForUser
OK
SELECT
id,
name,
payment_method_id,
type_id,
billing_name,
type_name,
billing_details,
billing_email,
billing_period,
capabilities,
created_at,
owner_ids,
roles_allowed,
slug,
type,
updated_at
FROM netlify.account_membership.accounts
WHERE account_id = '{{ account_id }}' -- required
;
OK
SELECT
id,
name,
payment_method_id,
type_id,
billing_name,
type_name,
billing_details,
billing_email,
billing_period,
capabilities,
created_at,
owner_ids,
roles_allowed,
slug,
type,
updated_at
FROM netlify.account_membership.accounts
;
INSERT
examples
- createAccount
- Manifest
No description available.
INSERT INTO netlify.account_membership.accounts (
data__extra_seats_block,
data__name,
data__payment_method_id,
data__period,
data__type_id
)
SELECT
{{ extra_seats_block }},
'{{ name }}' /* required */,
'{{ payment_method_id }}',
'{{ period }}',
'{{ type_id }}' /* required */
RETURNING
id,
name,
payment_method_id,
type_id,
billing_name,
type_name,
billing_details,
billing_email,
billing_period,
capabilities,
created_at,
owner_ids,
roles_allowed,
slug,
type,
updated_at
;
# Description fields are for documentation purposes
- name: accounts
props:
- name: extra_seats_block
value: integer
- name: name
value: string
- name: payment_method_id
value: string
- name: period
value: string
valid_values: ['monthly', 'yearly']
- name: type_id
value: string
Lifecycle Methods
- cancelAccount
- updateAccount
Not Content
EXEC netlify.account_membership.accounts.cancelAccount
@account_id='{{ account_id }}' --required
;
OK
EXEC netlify.account_membership.accounts.updateAccount
@account_id='{{ account_id }}' --required
@@json=
'{
"billing_details": "{{ billing_details }}",
"billing_email": "{{ billing_email }}",
"billing_name": "{{ billing_name }}",
"extra_seats_block": {{ extra_seats_block }},
"name": "{{ name }}",
"slug": "{{ slug }}",
"type_id": "{{ type_id }}"
}'
;