Table of Contents

Class GiftCard

Namespace
Dynamicweb.Ecommerce.GiftCards
Assembly
Dynamicweb.Ecommerce.dll

Represents a gift card: a prepaid balance, identified by a code, that can be redeemed against orders until it expires or is spent.

[Serializable]
public class GiftCard
Inheritance
GiftCard
Inherited Members

Constructors

GiftCard(bool)

Initializes a new instance of GiftCard.

public GiftCard(bool generateNewCode)

Parameters

generateNewCode bool

When true, assigns a freshly generated Code and an ExpiryDate derived from the configured expiration period. When false, both are left unset for the caller or the repository to populate.

Properties

Code

Gets the redemption code. Stored encrypted; see DecryptCode(string).

public string Code { get; }

Property Value

string

CreationDate

Gets or sets the date the gift card was created.

public DateTime CreationDate { get; set; }

Property Value

DateTime

CurrencyCode

Gets or sets the code of the Currency the balance is held in. A gift card is only applied to an order in the same currency.

public required string CurrencyCode { get; set; }

Property Value

string

ExpiryDate

Gets the date the gift card expires, after which it can no longer be applied to an order.

public DateTime ExpiryDate { get; }

Property Value

DateTime

GiftCardId

Gets or sets the gift card identifier used to look the gift card up and to relate its transactions.

public string GiftCardId { get; set; }

Property Value

string

ID

Gets or sets the database identity of the gift card. Zero until the gift card has been saved.

public int ID { get; set; }

Property Value

int

InitialAmount

Gets or sets the amount the gift card was issued with, before any redemptions.

public double InitialAmount { get; set; }

Property Value

double

IsNew

Gets a value indicating whether the gift card has not been persisted yet.

public bool IsNew { get; }

Property Value

bool

Name

Gets or sets the gift card name, shown on the discount order line when the card is applied.

public required string Name { get; set; }

Property Value

string

VATPercent

Gets or sets the VAT percent applied to the gift card amount, or null when none is recorded.

public double? VATPercent { get; set; }

Property Value

double?
To top