Table of Contents

Class GiftCard

Namespace
Dynamicweb.Ecommerce.GiftCards
Assembly
Dynamicweb.Ecommerce.dll
Represents information about an GiftCard.
[Serializable]
public class GiftCard : DbObject
Inheritance
GiftCard
Inherited Members

Constructors

GiftCard()

Initializes a new instance of the GiftCard class.
[Obsolete("Use overload with generateNewCode parameter instead.")]
public GiftCard()

GiftCard(bool)

Initializes a new instance of the GiftCard
public GiftCard(bool generateNewCode)

Parameters

generateNewCode bool
If set to true, generates a new code for the gift card.

GiftCard(IDataReader)

Initializes a new instance of the GiftCard class from datareader.
[Obsolete("This method is no longer used.")]
public GiftCard(IDataReader dataReader)

Parameters

dataReader IDataReader
The data reader.

Properties

Balance

Gets the GiftCard Balance.
[Obsolete("Use Services.GiftCard.GetGiftCardBalance instead.")]
public double Balance { get; }

Property Value

double

Code

Gets the GiftCard Code.
public string Code { get; }

Property Value

string

CreationDate

Gets or sets the GiftCard expiry date.
public DateTime CreationDate { get; set; }

Property Value

DateTime

CurrencyCode

Gets or sets the currency code.
public string CurrencyCode { get; set; }

Property Value

string

ExpiryDate

Gets the GiftCard expiry date.
public DateTime ExpiryDate { get; }

Property Value

DateTime

GiftCardId

Gets or sets the GiftCard ID.
public string GiftCardId { get; set; }

Property Value

string

InitialAmount

Gets or sets the GiftCard initial Amount.
public double InitialAmount { get; set; }

Property Value

double

Name

Gets or sets or sets the GiftCard name.
public string Name { get; set; }

Property Value

string

VATPercent

Gets or sets the VAT percent.
public double? VATPercent { get; set; }

Property Value

double?
The VAT percent

Methods

CreateGiftCards(Order)

Creates GiftCards for an order
[Obsolete("Use Services.GiftCard.CreateGiftCards instead.")]
public static void CreateGiftCards(Order order)

Parameters

order Order
The Order

Delete(int)

Deletes the gift card.
[Obsolete("Use Services.GiftCard.DeleteGiftCard instead.")]
public override void Delete(int id)

Parameters

id int

Fill(IDataReader)

Fills the GiftCard properties from the specified data reader.
[Obsolete("This method is no longer used.")]
public override void Fill(IDataReader reader)

Parameters

reader IDataReader
The data reader.

FillRow(DataRow)

Fills the given System.Data.DataRow object with property values of the current object.
[Obsolete("This method is no longer used.")]
protected override void FillRow(DataRow row)

Parameters

row DataRow
An instance of the System.Data.DataRow object to write data to.

GetAllGiftCards()

Retrieve all GiftCards
[Obsolete("Use Services.GiftCard.GetAllGiftCards instead.")]
public IEnumerable<GiftCard> GetAllGiftCards()

Returns

IEnumerable<GiftCard>

GetGiftCardByCode(string, bool)

Retrieve GiftCard by code
[Obsolete("Use Services.GiftCard.GetGiftCardByCode instead.")]
public GiftCard GetGiftCardByCode(string giftCardCode, bool encoded)

Parameters

giftCardCode string
GiftCard code
encoded bool
Boolean value indicates if code is already encoded

Returns

GiftCard

GetGiftCardsForOrder(string)

Retrieve GiftCards for the order
[Obsolete("Use Services.GiftCard.GetGiftCardsForOrder instead.")]
public IEnumerable<GiftCard> GetGiftCardsForOrder(string orderId)

Parameters

orderId string
The Order id

Returns

IEnumerable<GiftCard>

GetGiftCardsForOrderLine(string)

Retrieve GiftCards for the order line
[Obsolete("Use Services.GiftCard.GetGiftCardsForOrderLine instead.")]
public GiftCard GetGiftCardsForOrderLine(string orderLineId)

Parameters

orderLineId string
The OrderLine id

Returns

GiftCard

Save()

Saves the gift card.
[Obsolete("Use Services.GiftCard.SaveGiftCard instead.")]
public override void Save()

UseGiftCards(Order)

Make transactions for each orderline based on GiftCard code discount
[Obsolete("Use Services.GiftCard.UseGiftCards instead.")]
public static void UseGiftCards(Order order)

Parameters

order Order
The Order
To top