carts
Creates, updates, deletes, gets or lists a carts resource.
Overview​
| Name | carts |
| Type | Resource |
| Id | ovh.order.carts |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|
A shopping cart
| Name | Datatype | Description |
|---|---|---|
cart_id | string | Cart identifier (wire: cartId) |
description | string | Description of your cart |
expire | string (date-time) | Expiration time |
items | array | Items of your cart |
read_only | boolean | Indicates if the cart has already been validated (wire: readOnly) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | cart_id | Retrieve information about a specific cart | |
list | select | description, x_pagination_mode | List of your OVH order carts | |
create | insert | ovh_subsidiary | Create a new OVH order cart | |
update | update | cart_id | Modify information about a specific cart | |
delete | delete | cart_id | Delete a cart | |
assign | exec | cartId | Assign an order cart to your 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 |
|---|---|---|
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"}}) |
cartId | string | Cart ID |
cart_id | string | Cart ID (wire: cartId) |
description | string | Filter the value of description property (=) |
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
Retrieve information about a specific cart
SELECT
*
FROM ovh.order.carts
WHERE cart_id = '{{ cart_id }}' -- required
;
List of your OVH order carts
SELECT
cart_id,
description,
expire,
items,
read_only
FROM ovh.order.carts
WHERE description = '{{ description }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create a new OVH order cart
INSERT INTO ovh.order.carts (
description,
expire,
ovh_subsidiary
)
SELECT
'{{ description }}',
'{{ expire }}',
'{{ ovh_subsidiary }}' /* required */
;
# Description fields are for documentation purposes
- name: carts
props:
- name: description
value: "{{ description }}"
description: |
Description of your cart
- name: expire
value: "{{ expire }}"
description: |
Time of expiration of the cart
- name: ovh_subsidiary
value: "{{ ovh_subsidiary }}"
description: |
OVH Subsidiary where you want to order
valid_values: ['CZ', 'DE', 'ES', 'EU', 'FI', 'FR', 'GB', 'IE', 'IT', 'LT', 'MA', 'NL', 'PL', 'PT', 'SN', 'TN']
UPDATE examples​
- update
Modify information about a specific cart
UPDATE ovh.order.carts
SET
description = '{{ description }}',
expire = '{{ expire }}'
WHERE
cart_id = '{{ cart_id }}' --required;
DELETE examples​
- delete
Delete a cart
DELETE FROM ovh.order.carts
WHERE cart_id = '{{ cart_id }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- assign
Assign an order cart to your account
EXEC ovh.order.carts.assign
@cartId='{{ cartId }}' --required
;