Class GiftCertificate
Represents a Gift Certificate that can be used to purchase
products.
Constant Summary
Constant Description 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.
Property Summary
Property Description 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 : 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. 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.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
Method Description 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.
Methods inherited from class ExtensibleObject
describe , getCustom
Methods inherited from class PersistentObject
getCreationDate , getLastModified , getUUID
Methods inherited from class Object
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
Constant Details
STATUS_ISSUED
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
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
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
STATUS_REDEEMED: Number = 3
Represents a status of 'redeemed', which indicates that the Gift Certificate
has been used and no longer contains a balance.
Property Details
ID
ID: String (read-only)
Returns the code of the gift certificate. This redemption code is send to
gift certificate recipient.
Deprecated:
Use getGiftCertificateCode()
amount
amount: Money (read-only)
Returns the original amount on the gift certificate.
balance
balance: Money (read-only)
Returns the balance on the gift certificate.
description
description: String
Returns the description string.
enabled
enabled: Boolean
Returns true if the Gift Certificate is enabled, false otherwise.
giftCertificateCode
giftCertificateCode: String (read-only)
Returns the code of the gift certificate. This redemption code is send to
gift certificate recipient.
maskedGiftCertificateCode
maskedGiftCertificateCode: String (read-only)
Returns the masked gift certificate code with
all but the last 4 characters replaced with a '*' character.
merchantID
merchantID: String (read-only)
Returns the merchant ID of the gift certificate.
message
message: String
Returns the message to include in the email of the person receiving
the gift certificate.
orderNo
orderNo: String
Returns the order number
recipientEmail
recipientEmail: String
Returns the email address of the person receiving
the gift certificate.
recipientName
recipientName: String
Returns the name of the person receiving
the gift certificate.
senderName
senderName: String
Returns the name of the person or organization that
sent the gift certificate or null if undefined.
status
status: Number
Returns the status where the possible values are
STATUS_PENDING, STATUS_ISSUED, STATUS_PARTIALLY_REDEEMED
or STATUS_REDEEMED.
Method Details
getAmount()
getAmount(): Money
Returns the original amount on the gift certificate.
Returns:
the original amount on the gift certificate.
getBalance()
getBalance(): Money
Returns the balance on the gift certificate.
Returns:
the balance on the gift certificate.
getDescription()
getDescription(): String
Returns the description string.
Returns:
getGiftCertificateCode()
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()
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()
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(Number)
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()
getMerchantID(): String
Returns the merchant ID of the gift certificate.
Returns:
the merchant ID of the gift certificate.
getMessage()
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()
getOrderNo(): String
Returns the order number
Returns:
getRecipientEmail()
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()
getRecipientName(): String
Returns the name of the person receiving
the gift certificate.
Returns:
the name of the person receiving
the gift certificate.
getSenderName()
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()
getStatus(): Number
Returns the status where the possible values are
STATUS_PENDING, STATUS_ISSUED, STATUS_PARTIALLY_REDEEMED
or STATUS_REDEEMED.
Returns:
isEnabled()
isEnabled(): Boolean
Returns true if the Gift Certificate is enabled, false otherwise.
Returns:
true if the Gift Certificate is enabled, false otherwise.
setDescription(String)
setDescription(description: String ): void
An optional description that you can use to categorize the
gift certificate.
Parameters:
description - additional description.
setEnabled(Boolean)
setEnabled(enabled: Boolean ): void
Controls if the Gift Certificate is enabled.
Parameters:
enabled - if true, enables the Gift Certificate.
setMessage(String)
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(String)
setOrderNo(orderNo: String ): void
Sets the order number
Parameters:
orderNo - the order number to be set
setRecipientEmail(String)
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(String)
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(String)
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(Number)
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