C# Класс Nop.Services.Orders.GiftCardService

Gift card service
Наследование: IGiftCardService
Показать файл Открыть проект

Открытые методы

Метод Описание
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

Описание методов

DeleteGiftCard() публичный Метод

Deletes a gift card
public DeleteGiftCard ( GiftCard giftCard ) : void
giftCard Nop.Core.Domain.Orders.GiftCard Gift card
Результат void

GenerateGiftCardCode() публичный Метод

Generate new gift card code
public GenerateGiftCardCode ( ) : string
Результат string

GetActiveGiftCardsAppliedByCustomer() публичный Метод

Get active gift cards that are applied by a customer
public GetActiveGiftCardsAppliedByCustomer ( Customer customer ) : IList
customer Nop.Core.Domain.Customers.Customer Customer
Результат IList

GetAllGiftCards() публичный Метод

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
Результат IPagedList

GetGiftCardById() публичный Метод

Gets a gift card
public GetGiftCardById ( int giftCardId ) : GiftCard
giftCardId int Gift card identifier
Результат Nop.Core.Domain.Orders.GiftCard

GetGiftCardsByPurchasedWithOrderProductVariantId() публичный Метод

Gets gift cards by 'PurchasedWithOrderProductVariantId'
public GetGiftCardsByPurchasedWithOrderProductVariantId ( int purchasedWithOrderProductVariantId ) : IList
purchasedWithOrderProductVariantId int Purchased with order product variant identifier
Результат IList

GiftCardService() публичный Метод

Ctor
public GiftCardService ( IRepository giftCardRepository, IEventPublisher eventPublisher ) : System
giftCardRepository IRepository Gift card context
eventPublisher IEventPublisher Event published
Результат System

InsertGiftCard() публичный Метод

Inserts a gift card
public InsertGiftCard ( GiftCard giftCard ) : void
giftCard Nop.Core.Domain.Orders.GiftCard Gift card
Результат void

UpdateGiftCard() публичный Метод

Updates the gift card
public UpdateGiftCard ( GiftCard giftCard ) : void
giftCard Nop.Core.Domain.Orders.GiftCard Gift card
Результат void