C# Class Recurly.Subscription

Represents subscriptions for accounts
Inheritance: Recurly.RecurlyEntity
Afficher le fichier Open project: recurly/recurly-client-net Class Usage Examples

Private Properties

Свойство Type Description
ReadPlanXml void
ReadPreviewXml void
ReadXml void
Subscription System
Subscription System
WriteSubscriptionNotesXml Client.WriteXmlDelegate
WriteXml void

Méthodes publiques

Méthode Description
Cancel ( ) : void

Cancel an active subscription. The subscription will not renew, but will continue to be active through the remainder of the current term.

ChangeSubscription ( ) : void
ChangeSubscription ( ChangeTimeframe timeframe ) : void

Request that an update to a subscription take place

Create ( ) : void

Creates a new subscription on Recurly

Equals ( Subscription subscription ) : bool
Equals ( object obj ) : bool
GetHashCode ( ) : int
GetRedemptions ( ) : RecurlyList
Postpone ( System.DateTime nextRenewalDate, bool bulk = false ) : void

For an active subscription, this will pause the subscription until the specified date.

Preview ( ) : void
Preview ( ChangeTimeframe timeframe ) : void

Transforms this object into a preview Subscription applied to the account.

PreviewChange ( ) : Subscription
PreviewChange ( ChangeTimeframe timeframe ) : Subscription

Preview the changes associated with the current subscription

Reactivate ( ) : void

Reactivate a canceled subscription. The subscription will renew at the end of its current term.

Subscription ( Account account, Plan plan, string currency ) : System

Creates a new subscription object

Subscription ( Account account, Plan plan, string currency, string couponCode ) : System

Creates a new subscription object, with coupon

Terminate ( RefundType refund ) : void

Terminates the subscription immediately.

ToString ( ) : string
UpdateNotes ( string>.Dictionary notes ) : bool

Méthodes protégées

Méthode Description
ReadPendingSubscription ( XmlTextReader reader ) : void
WriteChangeSubscriptionAtRenewalXml ( XmlTextWriter xmlWriter ) : void
WriteChangeSubscriptionNowXml ( XmlTextWriter xmlWriter ) : void
WriteChangeSubscriptionXml ( XmlTextWriter xmlWriter, ChangeTimeframe timeframe ) : void
WriteSubscriptionXml ( XmlTextWriter xmlWriter ) : void

Private Methods

Méthode Description
ReadPlanXml ( XmlTextReader reader ) : void
ReadPreviewXml ( XmlTextReader reader ) : void
ReadXml ( XmlTextReader reader ) : void
Subscription ( ) : System
Subscription ( XmlTextReader reader ) : System
WriteSubscriptionNotesXml ( string>.Dictionary notes ) : Client.WriteXmlDelegate
WriteXml ( XmlTextWriter writer ) : void

Method Details

Cancel() public méthode

Cancel an active subscription. The subscription will not renew, but will continue to be active through the remainder of the current term.
public Cancel ( ) : void
Résultat void

ChangeSubscription() public méthode

public ChangeSubscription ( ) : void
Résultat void

ChangeSubscription() public méthode

Request that an update to a subscription take place
public ChangeSubscription ( ChangeTimeframe timeframe ) : void
timeframe ChangeTimeframe when the update should occur: now (default) or at renewal
Résultat void

Create() public méthode

Creates a new subscription on Recurly
public Create ( ) : void
Résultat void

Equals() public méthode

public Equals ( Subscription subscription ) : bool
subscription Subscription
Résultat bool

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

GetRedemptions() public méthode

public GetRedemptions ( ) : RecurlyList
Résultat RecurlyList

Postpone() public méthode

For an active subscription, this will pause the subscription until the specified date.
public Postpone ( System.DateTime nextRenewalDate, bool bulk = false ) : void
nextRenewalDate System.DateTime The specified time the subscription will be postponed
bulk bool bulk = false (default) or true to bypass the 60 second wait while postponing
Résultat void

Preview() public méthode

public Preview ( ) : void
Résultat void

Preview() public méthode

Transforms this object into a preview Subscription applied to the account.
public Preview ( ChangeTimeframe timeframe ) : void
timeframe ChangeTimeframe ChangeTimeframe.Now (default) or at Renewal
Résultat void

PreviewChange() public méthode

public PreviewChange ( ) : Subscription
Résultat Subscription

PreviewChange() public méthode

Preview the changes associated with the current subscription
public PreviewChange ( ChangeTimeframe timeframe ) : Subscription
timeframe ChangeTimeframe ChangeTimeframe.Now (default) or at Renewal
Résultat Subscription

Reactivate() public méthode

Reactivate a canceled subscription. The subscription will renew at the end of its current term.
public Reactivate ( ) : void
Résultat void

ReadPendingSubscription() protected méthode

protected ReadPendingSubscription ( XmlTextReader reader ) : void
reader System.Xml.XmlTextReader
Résultat void

Subscription() public méthode

Creates a new subscription object
public Subscription ( Account account, Plan plan, string currency ) : System
account Account
plan Plan
currency string
Résultat System

Subscription() public méthode

Creates a new subscription object, with coupon
public Subscription ( Account account, Plan plan, string currency, string couponCode ) : System
account Account
plan Plan
currency string
couponCode string
Résultat System

Terminate() public méthode

Terminates the subscription immediately.
public Terminate ( RefundType refund ) : void
refund RefundType
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

UpdateNotes() public méthode

public UpdateNotes ( string>.Dictionary notes ) : bool
notes string>.Dictionary
Résultat bool

WriteChangeSubscriptionAtRenewalXml() protected méthode

protected WriteChangeSubscriptionAtRenewalXml ( XmlTextWriter xmlWriter ) : void
xmlWriter XmlTextWriter
Résultat void

WriteChangeSubscriptionNowXml() protected méthode

protected WriteChangeSubscriptionNowXml ( XmlTextWriter xmlWriter ) : void
xmlWriter XmlTextWriter
Résultat void

WriteChangeSubscriptionXml() protected méthode

protected WriteChangeSubscriptionXml ( XmlTextWriter xmlWriter, ChangeTimeframe timeframe ) : void
xmlWriter XmlTextWriter
timeframe ChangeTimeframe
Résultat void

WriteSubscriptionXml() protected méthode

protected WriteSubscriptionXml ( XmlTextWriter xmlWriter ) : void
xmlWriter XmlTextWriter
Résultat void