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
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
GetAllGiftCards()
Retrieve all GiftCards
public IEnumerable<GiftCard> GetAllGiftCards()
Returns
GetGiftCardBalance(GiftCard)
Gets remaining balance for given gift card
public double GetGiftCardBalance(GiftCard giftCard)
Parameters
giftCard
GiftCard- The gift card
Returns
GetGiftCardByCode(string, bool)
Retrieve GiftCard by code
public GiftCard GetGiftCardByCode(string giftCardCode, bool encoded)
Parameters
Returns
GetGiftCardsForOrder(string)
Retrieve GiftCards for the order
public IEnumerable<GiftCard> GetGiftCardsForOrder(string orderId)
Parameters
orderId
string- The Order id
Returns
GetGiftCardsForOrderLine(string)
Retrieve GiftCards for the order line
public GiftCard GetGiftCardsForOrderLine(string orderLineId)
Parameters
orderLineId
string- The OrderLine id
Returns
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)