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

Implementation for subscription management with Stripe
Наследование: ISubscriptionProvider
Показать файл Открыть проект

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

Метод Описание
EndSubscription ( string userStripeId, string subStripeId, bool cancelAtPeriodEnd = false ) : System.DateTime

Ends the subscription.

SubscribeUser ( SaasEcom.Core.Models.SaasEcomUser user, string planId, System.DateTime trialEnds, decimal taxPercent ) : string

Subscribes the user.

SubscribeUser ( SaasEcom.Core.Models.SaasEcomUser user, string planId, int trialInDays, decimal taxPercent ) : string

Subscribes the user.

SubscribeUserNaturalMonth ( SaasEcom.Core.Models.SaasEcomUser user, string planId, System.DateTime billingAnchorCycle, decimal taxPercent ) : object

Subscribes the user natural month.

SubscriptionProvider ( string apiKey ) : System

Initializes a new instance of the SubscriptionProvider class.

UpdateSubscription ( string customerId, string subStripeId, string newPlanId, bool proRate ) : bool

Updates the subscription. (Change subscription plan)

UpdateSubscriptionTax ( string customerId, string subStripeId, decimal taxPercent ) : bool

Updates the subscription tax.

UserSubscriptionsAsync ( string userId ) : Task>

Gets the User's subscriptions asynchronous.

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

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

Ends the subscription.
public EndSubscription ( string userStripeId, string subStripeId, bool cancelAtPeriodEnd = false ) : System.DateTime
userStripeId string The user stripe identifier.
subStripeId string The sub stripe identifier.
cancelAtPeriodEnd bool if set to true [cancel at period end].
Результат System.DateTime

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

Subscribes the user.
public SubscribeUser ( SaasEcom.Core.Models.SaasEcomUser user, string planId, System.DateTime trialEnds, decimal taxPercent ) : string
user SaasEcom.Core.Models.SaasEcomUser The user.
planId string The plan identifier.
trialEnds System.DateTime The trial ends.
taxPercent decimal The tax percent.
Результат string

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

Subscribes the user.
public SubscribeUser ( SaasEcom.Core.Models.SaasEcomUser user, string planId, int trialInDays, decimal taxPercent ) : string
user SaasEcom.Core.Models.SaasEcomUser The user.
planId string The plan identifier.
trialInDays int The trial in days.
taxPercent decimal The tax percent.
Результат string

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

Subscribes the user natural month.
public SubscribeUserNaturalMonth ( SaasEcom.Core.Models.SaasEcomUser user, string planId, System.DateTime billingAnchorCycle, decimal taxPercent ) : object
user SaasEcom.Core.Models.SaasEcomUser The user.
planId string The plan identifier.
billingAnchorCycle System.DateTime The billing anchor cycle.
taxPercent decimal The tax percent.
Результат object

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

Initializes a new instance of the SubscriptionProvider class.
public SubscriptionProvider ( string apiKey ) : System
apiKey string The API key.
Результат System

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

Updates the subscription. (Change subscription plan)
public UpdateSubscription ( string customerId, string subStripeId, string newPlanId, bool proRate ) : bool
customerId string The customer identifier.
subStripeId string The sub stripe identifier.
newPlanId string The new plan identifier.
proRate bool if set to true [pro rate].
Результат bool

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

Updates the subscription tax.
public UpdateSubscriptionTax ( string customerId, string subStripeId, decimal taxPercent ) : bool
customerId string The customer identifier.
subStripeId string The sub stripe identifier.
taxPercent decimal The tax percent.
Результат bool

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

Gets the User's subscriptions asynchronous.
public UserSubscriptionsAsync ( string userId ) : Task>
userId string The user identifier.
Результат Task>