over_the_box_news
Creates, updates, deletes, gets or lists an over_the_box_news resource.
Overview​
| Name | over_the_box_news |
| Type | Resource |
| Id | ovh.order.over_the_box_news |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
order_id | integer | Identifier of the order (wire: orderId) |
contracts | array | List of contracts related to the order |
details | array | Details of the order |
prices | object | Prices of the order including with and without taxes |
url | string | URL to download the order |
An order
| Name | Datatype | Description |
|---|---|---|
order_id | integer | Identifier of the order (wire: orderId) |
contracts | array | List of contracts related to the order |
details | array | Details of the order |
prices | object | Prices of the order including with and without taxes |
url | string | URL to download the order |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | duration, offer | device_id, voucher | Get prices and contracts information |
list | select | offer | device_id, voucher, x_pagination_mode | Get allowed durations for 'new' option |
create | insert | duration, offer | Create order |
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"}}) |
duration | string | Duration |
offer | string | Offer name |
device_id | string | The id of the device (wire: deviceId) |
voucher | string | An optional voucher |
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 prices and contracts information
SELECT
order_id,
contracts,
details,
prices,
url
FROM ovh.order.over_the_box_news
WHERE duration = '{{ duration }}' -- required
AND offer = '{{ offer }}' -- required
AND device_id = '{{ device_id }}'
AND voucher = '{{ voucher }}'
;
Get allowed durations for 'new' option
SELECT
order_id,
contracts,
details,
prices,
url
FROM ovh.order.over_the_box_news
WHERE offer = '{{ offer }}' -- required
AND device_id = '{{ device_id }}'
AND voucher = '{{ voucher }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create order
INSERT INTO ovh.order.over_the_box_news (
device_id,
offer,
voucher,
duration
)
SELECT
'{{ device_id }}',
'{{ offer }}' /* required */,
'{{ voucher }}',
'{{ duration }}'
RETURNING
order_id,
contracts,
details,
prices,
url
;
# Description fields are for documentation purposes
- name: over_the_box_news
props:
- name: duration
value: "{{ duration }}"
description: Required parameter for the over_the_box_news resource.
- name: device_id
value: "{{ device_id }}"
description: |
The id of the device
- name: offer
value: "{{ offer }}"
description: |
Offer name
- name: voucher
value: "{{ voucher }}"
description: |
An optional voucher