C# Class Nop.Services.Orders.GiftCardService

Gift card service
Inheritance: IGiftCardService
Mostrar archivo Open project: emilianionascu/NopCommerce

Public Methods

Method Description
DeleteGiftCard ( GiftCard giftCard ) : void

Deletes a gift card

GenerateGiftCardCode ( ) : string

Generate new gift card code

GetActiveGiftCardsAppliedByCustomer ( Customer customer ) : IList

Get active gift cards that are applied by a customer

GetAllGiftCards ( int purchasedWithOrderId, System.DateTime startTime, System.DateTime endTime, bool isGiftCardActivated, string giftCardCouponCode, int pageIndex, int pageSize ) : IPagedList

Gets all gift cards

GetGiftCardById ( int giftCardId ) : GiftCard

Gets a gift card

GetGiftCardsByPurchasedWithOrderProductVariantId ( int purchasedWithOrderProductVariantId ) : IList

Gets gift cards by 'PurchasedWithOrderProductVariantId'

GiftCardService ( IRepository giftCardRepository, IEventPublisher eventPublisher ) : System

Ctor

InsertGiftCard ( GiftCard giftCard ) : void

Inserts a gift card

UpdateGiftCard ( GiftCard giftCard ) : void

Updates the gift card

Method Details

DeleteGiftCard() public method

Deletes a gift card
public DeleteGiftCard ( GiftCard giftCard ) : void
giftCard Nop.Core.Domain.Orders.GiftCard Gift card
return void

GenerateGiftCardCode() public method

Generate new gift card code
public GenerateGiftCardCode ( ) : string
return string

GetActiveGiftCardsAppliedByCustomer() public method

Get active gift cards that are applied by a customer
public GetActiveGiftCardsAppliedByCustomer ( Customer customer ) : IList
customer Nop.Core.Domain.Customers.Customer Customer
return IList

GetAllGiftCards() public method

Gets all gift cards
public GetAllGiftCards ( int purchasedWithOrderId, System.DateTime startTime, System.DateTime endTime, bool isGiftCardActivated, string giftCardCouponCode, int pageIndex, int pageSize ) : IPagedList
purchasedWithOrderId int Associated order ID; null to load all records
startTime System.DateTime Order start time; null to load all records
endTime System.DateTime Order end time; null to load all records
isGiftCardActivated bool Value indicating whether gift card is activated; null to load all records
giftCardCouponCode string Gift card coupon code; null or string.empty to load all records
pageIndex int Page index
pageSize int Page size
return IPagedList

GetGiftCardById() public method

Gets a gift card
public GetGiftCardById ( int giftCardId ) : GiftCard
giftCardId int Gift card identifier
return Nop.Core.Domain.Orders.GiftCard

GetGiftCardsByPurchasedWithOrderProductVariantId() public method

Gets gift cards by 'PurchasedWithOrderProductVariantId'
public GetGiftCardsByPurchasedWithOrderProductVariantId ( int purchasedWithOrderProductVariantId ) : IList
purchasedWithOrderProductVariantId int Purchased with order product variant identifier
return IList

GiftCardService() public method

Ctor
public GiftCardService ( IRepository giftCardRepository, IEventPublisher eventPublisher ) : System
giftCardRepository IRepository Gift card context
eventPublisher IEventPublisher Event published
return System

InsertGiftCard() public method

Inserts a gift card
public InsertGiftCard ( GiftCard giftCard ) : void
giftCard Nop.Core.Domain.Orders.GiftCard Gift card
return void

UpdateGiftCard() public method

Updates the gift card
public UpdateGiftCard ( GiftCard giftCard ) : void
giftCard Nop.Core.Domain.Orders.GiftCard Gift card
return void