Skip to main content

line_phone_rmas

Creates, updates, deletes, gets or lists a line_phone_rmas resource.

Overview​

Nameline_phone_rmas
TypeResource
Idovh.telephony.line_phone_rmas

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstringReturn merchandise authorisation identifier
cancellablebooleanIs the RMA cancellable?
creation_datetimestring (date-time)Creation datetime of the return merchandise authorisation ticket (wire: creationDatetime)
equipment_referencestringMerchandise reference (wire: equipmentReference)
new_merchandisestringNew merchandise brand in case of exchange (wire: newMerchandise)
offer_type_newstringOffer type of the new merchandise in case of exchange (deposit, loan, purchase) (wire: offerTypeNew)
offer_type_oldstringOffer type of the return merchandise (deposit, loan, purchase) (wire: offerTypeOld)
processstringProcess determined for merchandise returned (changePhone, phoneRestitution, undefined)
reception_datetimestring (date-time)Reception datetime of the return merchandise authorisation ticket (wire: receptionDatetime)
shipping_contactobjectContact information related to the delivery shipping in case of exchange (wire: shippingContact)
statusstringReturn merchandise authorisation step (closed, open, received)
stepsarrayIndicates the current status of the RMA with a list of steps
termination_datetimestring (date-time)Termination datetime of the return merchandise authorisation ticket (wire: terminationDatetime)
typestringTypology 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:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectbilling_account, id, service_nameGet an RMA
listselectbilling_account, service_namex_pagination_modeList RMAs
createinsertbilling_account, service_name, typeCreate an RMA
updateupdatebilling_account, id, service_nameUpdate an RMA
deletedeletebilling_account, id, service_nameCancel an RMA
change_typeexecbillingAccount, id, serviceName, typeChange 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.

NameDatatypeDescription
api_hoststringThe 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"}})
billingAccountstringThe name of your billingAccount
billing_accountstringThe name of your billingAccount (wire: billingAccount)
idstringReturn merchandise authorisation identifier
serviceNamestring
service_namestring (wire: serviceName)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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​

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 the RMA type

EXEC ovh.telephony.line_phone_rmas.change_type
@billingAccount='{{ billingAccount }}' --required,
@id='{{ id }}' --required,
@serviceName='{{ serviceName }}' --required
@@json=
'{
"type": "{{ type }}"
}'
;