bills
Creates, updates, deletes, gets or lists a bills resource.
Overview​
| Name | bills |
| Type | Resource |
| Id | ovh.me.bills |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
bill_id | string | (wire: billId) |
e_invoicing_id | string | (wire: eInvoicingId) |
order_id | integer | (wire: orderId) |
category | string | Types of plans (autorenew, earlyrenewal, purchase, purchase-cloud, purchase-servers, purchase-telecom, purchase-web) |
date | string (date-time) | |
e_invoicing_status | string | List of available eInvoicing Status types (accepted, error, ignored, invalid, new, ok, processing, readyToSubmit, rejected, submitted) (wire: eInvoicingStatus) |
password | string | |
pdf_url | string | (wire: pdfUrl) |
price_with_tax | object | Price with its currency and textual representation (wire: priceWithTax) |
price_without_tax | object | Price with its currency and textual representation (wire: priceWithoutTax) |
tax | object | Price with its currency and textual representation |
url | string |
Details about a Bill
| Name | Datatype | Description |
|---|---|---|
bill_id | string | (wire: billId) |
e_invoicing_id | string | (wire: eInvoicingId) |
order_id | integer | (wire: orderId) |
category | string | Types of plans (autorenew, earlyrenewal, purchase, purchase-cloud, purchase-servers, purchase-telecom, purchase-web) |
date | string (date-time) | |
e_invoicing_status | string | List of available eInvoicing Status types (accepted, error, ignored, invalid, new, ok, processing, readyToSubmit, rejected, submitted) (wire: eInvoicingStatus) |
password | string | |
pdf_url | string | (wire: pdfUrl) |
price_with_tax | object | Price with its currency and textual representation (wire: priceWithTax) |
price_without_tax | object | Price with its currency and textual representation (wire: priceWithoutTax) |
tax | object | Price with its currency and textual representation |
url | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | bill_id | Get this object properties | |
list | select | category, date.from, date.to, order_id, x_pagination_mode | List of all the bills the logged account has | |
export | exec | archiveType | Exports a bundle of invoices |
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"}}) |
bill_id | string | (wire: billId) |
category | string | Filter the value of category property (=) |
date.from | string (date-time) | Filter the value of date property (>=) |
date.to | string (date-time) | Filter the value of date property (<=) |
order_id | integer | Filter the value of orderId property (=) (wire: orderId) |
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 this object properties
SELECT
bill_id,
e_invoicing_id,
order_id,
category,
date,
e_invoicing_status,
password,
pdf_url,
price_with_tax,
price_without_tax,
tax,
url
FROM ovh.me.bills
WHERE bill_id = '{{ bill_id }}' -- required
;
List of all the bills the logged account has
SELECT
bill_id,
e_invoicing_id,
order_id,
category,
date,
e_invoicing_status,
password,
pdf_url,
price_with_tax,
price_without_tax,
tax,
url
FROM ovh.me.bills
WHERE category = '{{ category }}'
AND date.from = '{{ date.from }}'
AND date.to = '{{ date.to }}'
AND order_id = '{{ order_id }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- export
Exports a bundle of invoices
EXEC ovh.me.bills.export
@@json=
'{
"archiveType": "{{ archiveType }}",
"endDate": "{{ endDate }}",
"ids": "{{ ids }}",
"startDate": "{{ startDate }}"
}'
;