Table of Contents

Class GiftCardService

Namespace
Dynamicweb.Ecommerce.GiftCards
Assembly
Dynamicweb.Ecommerce.dll
public class GiftCardService
Inheritance
GiftCardService
Inherited Members

Methods

CreateGiftCards(Order)

Creates GiftCards for an order
public void CreateGiftCards(Order order)

Parameters

order Order
The Order

DecryptCode(string)

Returns decrypted input string
public string DecryptCode(string input)

Parameters

input string
String value

Returns

string

DeleteGiftCard(GiftCard)

Deletes the giftCard.
public void DeleteGiftCard(GiftCard giftCard)

Parameters

giftCard GiftCard

DeleteGiftCardTransaction(GiftCardTransaction)

Deletes the giftCard transaction.
public void DeleteGiftCardTransaction(GiftCardTransaction transaction)

Parameters

transaction GiftCardTransaction

EncryptCode(string)

Returns encrypted input string
public string EncryptCode(string input)

Parameters

input string
String value

Returns

string

GetAllGiftCards()

Retrieve all GiftCards
public IEnumerable<GiftCard> GetAllGiftCards()

Returns

IEnumerable<GiftCard>

GetGiftCardBalance(GiftCard)

Gets remaining balance for given gift card
public double GetGiftCardBalance(GiftCard giftCard)

Parameters

giftCard GiftCard
The gift card

Returns

double

GetGiftCardByCode(string, bool)

Retrieve GiftCard by code
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
public IEnumerable<GiftCard> GetGiftCardsForOrder(string orderId)

Parameters

orderId string
The Order id

Returns

IEnumerable<GiftCard>

GetGiftCardsForOrderLine(string)

Retrieve GiftCards for the order line
public GiftCard GetGiftCardsForOrderLine(string orderLineId)

Parameters

orderLineId string
The OrderLine id

Returns

GiftCard

SaveGiftCard(GiftCard)

Saves GiftCard to the database.
public void SaveGiftCard(GiftCard giftCard)

Parameters

giftCard GiftCard

SaveGiftCardTransaction(GiftCardTransaction)

Saves GiftCard transaction to the database.
public void SaveGiftCardTransaction(GiftCardTransaction transaction)

Parameters

transaction GiftCardTransaction

UseGiftCards(Order)

Make transactions for each orderline based on GiftCard code discount
public void UseGiftCards(Order order)

Parameters

order Order
The Order

UseGiftCards(Order, Currency, Country)

Make transactions for each orderline based on GiftCard code discount
[Obsolete("Use UseGiftCards(Order) instead.")]
public void UseGiftCards(Order order, Currency currency, Country country)

Parameters

order Order
The Order
currency Currency
The country.
country Country
The currency.
To top