C# Class Recurly.Subscription

Represents subscriptions for accounts
Inheritance: Recurly.RecurlyEntity
Mostrar archivo Open project: recurly/recurly-client-net Class Usage Examples

Private Properties

Property Type Description
ReadPlanXml void
ReadPreviewXml void
ReadXml void
Subscription System
Subscription System
WriteSubscriptionNotesXml Client.WriteXmlDelegate
WriteXml void

Public Methods

Method 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

Protected Methods

Method 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

Method 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 method

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
return void

ChangeSubscription() public method

public ChangeSubscription ( ) : void
return void

ChangeSubscription() public method

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
return void

Create() public method

Creates a new subscription on Recurly
public Create ( ) : void
return void

Equals() public method

public Equals ( Subscription subscription ) : bool
subscription Subscription
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetRedemptions() public method

public GetRedemptions ( ) : RecurlyList
return RecurlyList

Postpone() public method

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
return void

Preview() public method

public Preview ( ) : void
return void

Preview() public method

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

PreviewChange() public method

public PreviewChange ( ) : Subscription
return Subscription

PreviewChange() public method

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

Reactivate() public method

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

ReadPendingSubscription() protected method

protected ReadPendingSubscription ( XmlTextReader reader ) : void
reader System.Xml.XmlTextReader
return void

Subscription() public method

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

Subscription() public method

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
return System

Terminate() public method

Terminates the subscription immediately.
public Terminate ( RefundType refund ) : void
refund RefundType
return void

ToString() public method

public ToString ( ) : string
return string

UpdateNotes() public method

public UpdateNotes ( string>.Dictionary notes ) : bool
notes string>.Dictionary
return bool

WriteChangeSubscriptionAtRenewalXml() protected method

protected WriteChangeSubscriptionAtRenewalXml ( XmlTextWriter xmlWriter ) : void
xmlWriter XmlTextWriter
return void

WriteChangeSubscriptionNowXml() protected method

protected WriteChangeSubscriptionNowXml ( XmlTextWriter xmlWriter ) : void
xmlWriter XmlTextWriter
return void

WriteChangeSubscriptionXml() protected method

protected WriteChangeSubscriptionXml ( XmlTextWriter xmlWriter, ChangeTimeframe timeframe ) : void
xmlWriter XmlTextWriter
timeframe ChangeTimeframe
return void

WriteSubscriptionXml() protected method

protected WriteSubscriptionXml ( XmlTextWriter xmlWriter ) : void
xmlWriter XmlTextWriter
return void