billing_accounts
Creates, updates, deletes, gets or lists a billing_accounts resource.
Overview​
| Name | billing_accounts |
| Type | Resource |
| Id | ovh.telephony.billing_accounts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
allowed_outplan | object | Allowed outplan (wire: allowedOutplan) |
billing_account | string | Name of the billing account (wire: billingAccount) |
credit_threshold | object | Allowed threshold credit (wire: creditThreshold) |
current_outplan | object | Current outplan (wire: currentOutplan) |
description | string | Description of the billing account |
has_special_numbers | boolean | Check if the billing account contains at least one special number (wire: hasSpecialNumbers) |
hidden_external_number | boolean | Hide called numbers in end-of-month call details CSV (wire: hiddenExternalNumber) |
iam | object | IAM resource metadata |
override_displayed_number | boolean | Override number display for calls between services of your billing account (wire: overrideDisplayedNumber) |
security_deposit | object | Security deposit amount (wire: securityDeposit) |
status | string | Current status of billing account (closed, deleted, enabled, expired) |
trusted | boolean | Is the billing account trusted |
Billing Account
| Name | Datatype | Description |
|---|---|---|
allowed_outplan | object | Allowed outplan (wire: allowedOutplan) |
billing_account | string | Name of the billing account (wire: billingAccount) |
credit_threshold | object | Allowed threshold credit (wire: creditThreshold) |
current_outplan | object | Current outplan (wire: currentOutplan) |
description | string | Description of the billing account |
has_special_numbers | boolean | Check if the billing account contains at least one special number (wire: hasSpecialNumbers) |
hidden_external_number | boolean | Hide called numbers in end-of-month call details CSV (wire: hiddenExternalNumber) |
iam | object | IAM resource metadata |
override_displayed_number | boolean | Override number display for calls between services of your billing account (wire: overrideDisplayedNumber) |
security_deposit | object | Security deposit amount (wire: securityDeposit) |
status | string | Current status of billing account (closed, deleted, enabled, expired) |
trusted | boolean | Is the billing account trusted |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account | Get a billing account | |
list | select | iam_tags, x_pagination_mode | List billing accounts | |
update | update | billing_account | Update a billing account | |
delete | delete | billing_account, reason | details | Terminate a billing account |
reseller_panel_generate_password | exec | Generate a reseller panel password | ||
set_default_sip_domain | exec | country, domain, type | Set the default SIP domain | |
can_transfer_security_deposit | exec | billingAccount, billingAccountDestination | Check a security deposit transfer | |
cancel_termination | exec | billingAccount | Cancel the billing account termination | |
change_contact | exec | billingAccount | Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service. | |
transfer_security_deposit | exec | billingAccount, amount, billingAccountDestination | Transfer the security deposit |
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 |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
billingAccount | string | The name of your billingAccount |
billing_account | string | The name of your billingAccount (wire: billingAccount) |
reason | string | Termination reason |
details | string | Termination reason details |
iam_tags | object | Filter resources on IAM tags (wire: iamTags) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a billing account
SELECT
allowed_outplan,
billing_account,
credit_threshold,
current_outplan,
description,
has_special_numbers,
hidden_external_number,
iam,
override_displayed_number,
security_deposit,
status,
trusted
FROM ovh.telephony.billing_accounts
WHERE billing_account = '{{ billing_account }}' -- required
;
List billing accounts
SELECT
allowed_outplan,
billing_account,
credit_threshold,
current_outplan,
description,
has_special_numbers,
hidden_external_number,
iam,
override_displayed_number,
security_deposit,
status,
trusted
FROM ovh.telephony.billing_accounts
WHERE iam_tags = '{{ iam_tags }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
UPDATE examples​
- update
Update a billing account
UPDATE ovh.telephony.billing_accounts
SET
credit_threshold = '{{ credit_threshold }}',
description = '{{ description }}',
hidden_external_number = {{ hidden_external_number }},
override_displayed_number = {{ override_displayed_number }}
WHERE
billing_account = '{{ billing_account }}' --required;
DELETE examples​
- delete
Terminate a billing account
DELETE FROM ovh.telephony.billing_accounts
WHERE billing_account = '{{ billing_account }}' --required
AND reason = '{{ reason }}' --required
AND details = '{{ details }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- reseller_panel_generate_password
- set_default_sip_domain
- can_transfer_security_deposit
- cancel_termination
- change_contact
- transfer_security_deposit
Generate a reseller panel password
EXEC ovh.telephony.billing_accounts.reseller_panel_generate_password
;
Set the default SIP domain
EXEC ovh.telephony.billing_accounts.set_default_sip_domain
@@json=
'{
"country": "{{ country }}",
"domain": "{{ domain }}",
"type": "{{ type }}"
}'
;
Check a security deposit transfer
EXEC ovh.telephony.billing_accounts.can_transfer_security_deposit
@billingAccount='{{ billingAccount }}' --required
@@json=
'{
"billingAccountDestination": "{{ billingAccountDestination }}"
}'
;
Cancel the billing account termination
EXEC ovh.telephony.billing_accounts.cancel_termination
@billingAccount='{{ billingAccount }}' --required
;
Change service contacts. Starts a procedure to change the admin, tech or billing contact of the service.
EXEC ovh.telephony.billing_accounts.change_contact
@billingAccount='{{ billingAccount }}' --required
@@json=
'{
"contactAdmin": "{{ contactAdmin }}",
"contactBilling": "{{ contactBilling }}",
"contactTech": "{{ contactTech }}"
}'
;
Transfer the security deposit
EXEC ovh.telephony.billing_accounts.transfer_security_deposit
@billingAccount='{{ billingAccount }}' --required
@@json=
'{
"amount": {{ amount }},
"billingAccountDestination": "{{ billingAccountDestination }}"
}'
;