line_phone_rmas
Creates, updates, deletes, gets or lists a line_phone_rmas resource.
Overview​
| Name | line_phone_rmas |
| Type | Resource |
| Id | ovh.telephony.line_phone_rmas |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string | Return merchandise authorisation identifier |
cancellable | boolean | Is the RMA cancellable? |
creation_datetime | string (date-time) | Creation datetime of the return merchandise authorisation ticket (wire: creationDatetime) |
equipment_reference | string | Merchandise reference (wire: equipmentReference) |
new_merchandise | string | New merchandise brand in case of exchange (wire: newMerchandise) |
offer_type_new | string | Offer type of the new merchandise in case of exchange (deposit, loan, purchase) (wire: offerTypeNew) |
offer_type_old | string | Offer type of the return merchandise (deposit, loan, purchase) (wire: offerTypeOld) |
process | string | Process determined for merchandise returned (changePhone, phoneRestitution, undefined) |
reception_datetime | string (date-time) | Reception datetime of the return merchandise authorisation ticket (wire: receptionDatetime) |
shipping_contact | object | Contact information related to the delivery shipping in case of exchange (wire: shippingContact) |
status | string | Return merchandise authorisation step (closed, open, received) |
steps | array | Indicates the current status of the RMA with a list of steps |
termination_datetime | string (date-time) | Termination datetime of the return merchandise authorisation ticket (wire: terminationDatetime) |
type | string | Typology process of merchandise return (after sale equipment service exchange, after sale phone service exchange, equipment restitution, fast exchange, old merchandise reception before exchange, phone restitution, resends due to shipping lost by the carrier, resends due to shipping not withdraw, specific return merchandise authorisation, termination, unknown) |
Current Return Merchandise Authorisation
| Name | Datatype | Description |
|---|---|---|
id | string | Return merchandise authorisation identifier |
cancellable | boolean | Is the RMA cancellable? |
creation_datetime | string (date-time) | Creation datetime of the return merchandise authorisation ticket (wire: creationDatetime) |
equipment_reference | string | Merchandise reference (wire: equipmentReference) |
new_merchandise | string | New merchandise brand in case of exchange (wire: newMerchandise) |
offer_type_new | string | Offer type of the new merchandise in case of exchange (deposit, loan, purchase) (wire: offerTypeNew) |
offer_type_old | string | Offer type of the return merchandise (deposit, loan, purchase) (wire: offerTypeOld) |
process | string | Process determined for merchandise returned (changePhone, phoneRestitution, undefined) |
reception_datetime | string (date-time) | Reception datetime of the return merchandise authorisation ticket (wire: receptionDatetime) |
shipping_contact | object | Contact information related to the delivery shipping in case of exchange (wire: shippingContact) |
status | string | Return merchandise authorisation step (closed, open, received) |
steps | array | Indicates the current status of the RMA with a list of steps |
termination_datetime | string (date-time) | Termination datetime of the return merchandise authorisation ticket (wire: terminationDatetime) |
type | string | Typology process of merchandise return (after sale equipment service exchange, after sale phone service exchange, equipment restitution, fast exchange, old merchandise reception before exchange, phone restitution, resends due to shipping lost by the carrier, resends due to shipping not withdraw, specific return merchandise authorisation, termination, unknown) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | billing_account, id, service_name | Get an RMA | |
list | select | billing_account, service_name | x_pagination_mode | List RMAs |
create | insert | billing_account, service_name, type | Create an RMA | |
update | update | billing_account, id, service_name | Update an RMA | |
delete | delete | billing_account, id, service_name | Cancel an RMA | |
change_type | exec | billingAccount, id, serviceName, type | Change the RMA type |
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) |
id | string | Return merchandise authorisation identifier |
serviceName | string | |
service_name | string | (wire: serviceName) |
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 an RMA
SELECT
id,
cancellable,
creation_datetime,
equipment_reference,
new_merchandise,
offer_type_new,
offer_type_old,
process,
reception_datetime,
shipping_contact,
status,
steps,
termination_datetime,
type
FROM ovh.telephony.line_phone_rmas
WHERE billing_account = '{{ billing_account }}' -- required
AND id = '{{ id }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List RMAs
SELECT
id,
cancellable,
creation_datetime,
equipment_reference,
new_merchandise,
offer_type_new,
offer_type_old,
process,
reception_datetime,
shipping_contact,
status,
steps,
termination_datetime,
type
FROM ovh.telephony.line_phone_rmas
WHERE billing_account = '{{ billing_account }}' -- required
AND service_name = '{{ service_name }}' -- required
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Create an RMA
INSERT INTO ovh.telephony.line_phone_rmas (
mondial_relay_id,
new_merchandise,
shipping_contact_id,
type,
billing_account,
service_name
)
SELECT
'{{ mondial_relay_id }}',
'{{ new_merchandise }}',
{{ shipping_contact_id }},
'{{ type }}' /* required */,
'{{ billing_account }}',
'{{ service_name }}'
RETURNING
id
;
# Description fields are for documentation purposes
- name: line_phone_rmas
props:
- name: billing_account
value: "{{ billing_account }}"
description: Required parameter for the line_phone_rmas resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the line_phone_rmas resource.
- name: mondial_relay_id
value: "{{ mondial_relay_id }}"
description: |
Use /supply/mondialRelay entry point to specify a relay point and ignore shipping contact address information entry.
- name: new_merchandise
value: "{{ new_merchandise }}"
description: |
New merchandise brand in case of exchange
- name: shipping_contact_id
value: {{ shipping_contact_id }}
description: |
Shipping contact information id from /me entry point
- name: type
value: "{{ type }}"
description: |
Typology process of merchandise return
valid_values: ['change to another phone/equipment (restitution first and shipping then)', 'restitution but keep the service enable']
UPDATE examples​
- update
Update an RMA
UPDATE ovh.telephony.line_phone_rmas
SET
process = '{{ process }}',
shipping_contact = '{{ shipping_contact }}'
WHERE
billing_account = '{{ billing_account }}' --required
AND id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required;
DELETE examples​
- delete
Cancel an RMA
DELETE FROM ovh.telephony.line_phone_rmas
WHERE billing_account = '{{ billing_account }}' --required
AND id = '{{ id }}' --required
AND service_name = '{{ service_name }}' --required
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- change_type
Change the RMA type
EXEC ovh.telephony.line_phone_rmas.change_type
@billingAccount='{{ billingAccount }}' --required,
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"type": "{{ type }}"
}'
;