Class GiftCertificate

Represents a Gift Certificate that can be used to purchase products.

ConstantDescription
STATUS_ISSUED: Number = 1Represents a status of 'issued', which indicates that the Gift Certificate has been created and that it can be used to purchase products.
STATUS_PARTIALLY_REDEEMED: Number = 2Represents a status of 'partially redeemed', which indicates that the Gift Certificate has been used to purchase products, but that there is still a balance on the gift certificate.
STATUS_PENDING: Number = 0Represents a status of 'pending', which indicates that the Gift Certificate has been created but that it cannot be used yet.
STATUS_REDEEMED: Number = 3Represents a status of 'redeemed', which indicates that the Gift Certificate has been used and no longer contains a balance.
PropertyDescription
ID: String (read-only)Returns the code of the gift certificate.
amount: Money (read-only)Returns the original amount on the gift certificate.
balance: Money (read-only)Returns the balance on the gift certificate.
description: StringReturns the description string.
enabled: BooleanReturns true if the Gift Certificate is enabled, false otherwise.
giftCertificateCode: String (read-only)Returns the code of the gift certificate.
maskedGiftCertificateCode: String (read-only)Returns the masked gift certificate code with all but the last 4 characters replaced with a '*' character.
merchantID: String (read-only)Returns the merchant ID of the gift certificate.
message: StringReturns the message to include in the email of the person receiving the gift certificate.
orderNo: StringReturns the order number
recipientEmail: StringReturns the email address of the person receiving the gift certificate.
recipientName: StringReturns the name of the person receiving the gift certificate.
senderName: StringReturns the name of the person or organization that sent the gift certificate or null if undefined.
status: NumberReturns the status where the possible values are STATUS_PENDING, STATUS_ISSUED, STATUS_PARTIALLY_REDEEMED or STATUS_REDEEMED.

This class does not have a constructor, so you cannot create it directly.

MethodDescription
getAmount()Returns the original amount on the gift certificate.
getBalance()Returns the balance on the gift certificate.
getDescription()Returns the description string.
getGiftCertificateCode()Returns the code of the gift certificate.
getID()Returns the code of the gift certificate.
getMaskedGiftCertificateCode()Returns the masked gift certificate code with all but the last 4 characters replaced with a '*' character.
getMaskedGiftCertificateCode(Number)Returns the masked gift certificate code with all but the specified number of characters replaced with a '*' character.
getMerchantID()Returns the merchant ID of the gift certificate.
getMessage()Returns the message to include in the email of the person receiving the gift certificate.
getOrderNo()Returns the order number
getRecipientEmail()Returns the email address of the person receiving the gift certificate.
getRecipientName()Returns the name of the person receiving the gift certificate.
getSenderName()Returns the name of the person or organization that sent the gift certificate or null if undefined.
getStatus()Returns the status where the possible values are STATUS_PENDING, STATUS_ISSUED, STATUS_PARTIALLY_REDEEMED or STATUS_REDEEMED.
isEnabled()Returns true if the Gift Certificate is enabled, false otherwise.
setDescription(String)An optional description that you can use to categorize the gift certificate.
setEnabled(Boolean)Controls if the Gift Certificate is enabled.
setMessage(String)Sets the message to include in the email of the person receiving the gift certificate.
setOrderNo(String)Sets the order number
setRecipientEmail(String)Sets the email address of the person receiving the gift certificate.
setRecipientName(String)Sets the name of the person receiving the gift certificate.
setSenderName(String)Sets the name of the person or organization that sent the gift certificate.
setStatus(Number)Sets the status of the gift certificate.

describe, getCustom

getCreationDate, getLastModified, getUUID

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

STATUS_ISSUED: Number = 1

Represents a status of 'issued', which indicates that the Gift Certificate has been created and that it can be used to purchase products.


STATUS_PARTIALLY_REDEEMED: Number = 2

Represents a status of 'partially redeemed', which indicates that the Gift Certificate has been used to purchase products, but that there is still a balance on the gift certificate.


STATUS_PENDING: Number = 0

Represents a status of 'pending', which indicates that the Gift Certificate has been created but that it cannot be used yet.


STATUS_REDEEMED: Number = 3

Represents a status of 'redeemed', which indicates that the Gift Certificate has been used and no longer contains a balance.


ID: String (read-only)

Returns the code of the gift certificate. This redemption code is send to gift certificate recipient.

Deprecated:

Use getGiftCertificateCode()


amount: Money (read-only)

Returns the original amount on the gift certificate.


balance: Money (read-only)

Returns the balance on the gift certificate.


description: String

Returns the description string.


enabled: Boolean

Returns true if the Gift Certificate is enabled, false otherwise.


giftCertificateCode: String (read-only)

Returns the code of the gift certificate. This redemption code is send to gift certificate recipient.


maskedGiftCertificateCode: String (read-only)

Returns the masked gift certificate code with all but the last 4 characters replaced with a '*' character.


merchantID: String (read-only)

Returns the merchant ID of the gift certificate.


message: String

Returns the message to include in the email of the person receiving the gift certificate.


orderNo: String

Returns the order number


recipientEmail: String

Returns the email address of the person receiving the gift certificate.


recipientName: String

Returns the name of the person receiving the gift certificate.


senderName: String

Returns the name of the person or organization that sent the gift certificate or null if undefined.


status: Number

Returns the status where the possible values are STATUS_PENDING, STATUS_ISSUED, STATUS_PARTIALLY_REDEEMED or STATUS_REDEEMED.


getAmount(): Money

Returns the original amount on the gift certificate.

Returns:

  • the original amount on the gift certificate.

getBalance(): Money

Returns the balance on the gift certificate.

Returns:

  • the balance on the gift certificate.

getDescription(): String

Returns the description string.

Returns:

  • the description.

getGiftCertificateCode(): String

Returns the code of the gift certificate. This redemption code is send to gift certificate recipient.

Returns:

  • the code of the gift certificate.

getID(): String

Returns the code of the gift certificate. This redemption code is send to gift certificate recipient.

Returns:

  • the code of the gift certificate.

Deprecated:

Use getGiftCertificateCode()


getMaskedGiftCertificateCode(): String

Returns the masked gift certificate code with all but the last 4 characters replaced with a '*' character.

Returns:

  • the masked gift certificate code.

getMaskedGiftCertificateCode(ignore: Number): String

Returns the masked gift certificate code with all but the specified number of characters replaced with a '*' character.

Parameters:

  • ignore - the number of characters to leave unmasked.

Returns:

  • the masked gift certificate code.

Throws:

  • IllegalArgumentException - if ignore is negative.

getMerchantID(): String

Returns the merchant ID of the gift certificate.

Returns:

  • the merchant ID of the gift certificate.

getMessage(): String

Returns the message to include in the email of the person receiving the gift certificate.

Returns:

  • the message to include in the email of the person receiving the gift certificate.

getOrderNo(): String

Returns the order number

Returns:

  • the order number

getRecipientEmail(): String

Returns the email address of the person receiving the gift certificate.

Returns:

  • the email address of the person receiving the gift certificate.

getRecipientName(): String

Returns the name of the person receiving the gift certificate.

Returns:

  • the name of the person receiving the gift certificate.

getSenderName(): String

Returns the name of the person or organization that sent the gift certificate or null if undefined.

Returns:

  • the name of the person or organization that sent the gift certificate or null if undefined.

getStatus(): Number

Returns the status where the possible values are STATUS_PENDING, STATUS_ISSUED, STATUS_PARTIALLY_REDEEMED or STATUS_REDEEMED.

Returns:

  • the status.

isEnabled(): Boolean

Returns true if the Gift Certificate is enabled, false otherwise.

Returns:

  • true if the Gift Certificate is enabled, false otherwise.

setDescription(description: String): void

An optional description that you can use to categorize the gift certificate.

Parameters:

  • description - additional description.

setEnabled(enabled: Boolean): void

Controls if the Gift Certificate is enabled.

Parameters:

  • enabled - if true, enables the Gift Certificate.

setMessage(message: String): void

Sets the message to include in the email of the person receiving the gift certificate.

Parameters:

  • message - the message to include in the email of the person receiving the gift certificate.

setOrderNo(orderNo: String): void

Sets the order number

Parameters:

  • orderNo - the order number to be set

setRecipientEmail(recipientEmail: String): void

Sets the email address of the person receiving the gift certificate.

Parameters:

  • recipientEmail - the email address of the person receiving the gift certificate.

setRecipientName(recipient: String): void

Sets the name of the person receiving the gift certificate.

Parameters:

  • recipient - the name of the person receiving the gift certificate.

setSenderName(sender: String): void

Sets the name of the person or organization that sent the gift certificate.

Parameters:

  • sender - the name of the person or organization that sent the gift certificate.

setStatus(status: Number): void

Sets the status of the gift certificate.

Possible values are: STATUS_ISSUED, STATUS_PENDING, STATUS_PARTIALLY_REDEEMED and STATUS_REDEEMED.

Parameters:

  • status - Gift certificate status