An object representing a gift certificate.
Property | Type | Description |
---|---|---|
uid | integer | The unique identifier of the gift certificate. |
code | string | The code that a customer would use to pay with the gift certificate at checkout. |
ordernr | integer | An order uid |
webshop | integer | The uid of the webshop that has the gift certificate. |
article | integer | |
article_name | string | |
to | string | The receiver's name. |
to_email | string | The receiver's email address. |
from | string | The sender's name. |
from_email | string | The sender's email address. |
originalValue | number | The original value of the gift certificate. |
remainingValue | number | The current remaining value of the gift certificate. |
expiredate | string | The date and time for when the gift certificate expires. |
currency | string | The currency for the value. |
created | string | Date and time of twhen the gift certificate was created. |
cancelled | boolean | Whether this gift certificate is cancelled. |
Generates a code for a gift certificate.
Giftcertificate.generateCode()
Fetches information about a gift certificate.
Parameter | Description |
---|---|
uid | The unique identifier of a gift certificate. |
query | Which info to return. See Query language. |
Fetches the JSON Schema which can be used for client-side validation.
The unique identifier of a gift certificate or null
for a new instance.
Creates or updates a gift certificate.
Giftcertificate.set(null, {
"to": "Receiver",
"to_email": "receiver@example.com",
"from": "Sender",
"from_email": "sender@example.com",
"code": "1630632412583",
"expiredate": "2015-05-29",
"currency": "EUR",
"originalValue": 600,
"remainingValue": 600
}, true)