C# 클래스 SaasEcom.Core.Infrastructure.PaymentProcessor.Stripe.SubscriptionProvider

Implementation for subscription management with Stripe
상속: ISubscriptionProvider
파일 보기 프로젝트 열기: pedropaf/saas-ecom

공개 메소드들

메소드 설명
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>