C# Класс SaasEcom.Core.Infrastructure.PaymentProcessor.Stripe.CardProvider

Implementation for CRUD related to credit cards with Stripe and also saves the details in the database.
Наследование: ICardProvider
Показать файл Открыть проект

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

Метод Описание
AddAsync ( SaasEcom.Core.Models.SaasEcomUser user, CreditCard card ) : System.Threading.Tasks.Task

Adds the credit card asynchronous.

CardBelongToUser ( int cardId, string userId ) : Task

Check if the Card belong to user.

CardProvider ( string apiKey, ICardDataService cardDataService ) : System.Collections.Generic

Initializes a new instance of the CardProvider class.

DeleteAsync ( string customerId, string custStripeId, int cardId ) : System.Threading.Tasks.Task

Deletes the credit card asynchronous.

FindAsync ( string customerId, int cardId ) : Task

Finds the credit card asynchronous.

GetAllAsync ( string customerId ) : Task>

Gets all the credit cards asynchronous.

UpdateAsync ( SaasEcom.Core.Models.SaasEcomUser user, CreditCard creditcard ) : System.Threading.Tasks.Task

Updates the credit card asynchronous.

Приватные методы

Метод Описание
AddCardToStripe ( CreditCard card, string stripeCustomerId ) : StripeCard

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

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

Adds the credit card asynchronous.
public AddAsync ( SaasEcom.Core.Models.SaasEcomUser user, CreditCard card ) : System.Threading.Tasks.Task
user SaasEcom.Core.Models.SaasEcomUser The user.
card CreditCard The card.
Результат System.Threading.Tasks.Task

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

Check if the Card belong to user.
public CardBelongToUser ( int cardId, string userId ) : Task
cardId int The card identifier.
userId string The user identifier.
Результат Task

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

Initializes a new instance of the CardProvider class.
public CardProvider ( string apiKey, ICardDataService cardDataService ) : System.Collections.Generic
apiKey string The API key.
cardDataService ICardDataService The card data service.
Результат System.Collections.Generic

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

Deletes the credit card asynchronous.
public DeleteAsync ( string customerId, string custStripeId, int cardId ) : System.Threading.Tasks.Task
customerId string The customer identifier.
custStripeId string The customer stripe identifier.
cardId int The Card identifier.
Результат System.Threading.Tasks.Task

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

Finds the credit card asynchronous.
public FindAsync ( string customerId, int cardId ) : Task
customerId string The customer identifier.
cardId int The card identifier.
Результат Task

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

Gets all the credit cards asynchronous.
public GetAllAsync ( string customerId ) : Task>
customerId string The customer identifier.
Результат Task>

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

Updates the credit card asynchronous.
public UpdateAsync ( SaasEcom.Core.Models.SaasEcomUser user, CreditCard creditcard ) : System.Threading.Tasks.Task
user SaasEcom.Core.Models.SaasEcomUser The user.
creditcard CreditCard The creditcard.
Результат System.Threading.Tasks.Task