Class: Recurly::Resources::Subscription
- Inherits:
-
Recurly::Resource
- Object
- Recurly::Resource
- Recurly::Resources::Subscription
- Defined in:
- lib/recurly/resources/subscription.rb
Instance Attribute Summary collapse
-
#account ⇒ AccountMini
Account mini details.
-
#activated_at ⇒ DateTime
Activated at.
-
#active_invoice_id ⇒ String
The invoice ID of the latest invoice created for an active subscription.
-
#add_ons ⇒ Array[SubscriptionAddOn]
Add-ons.
-
#add_ons_total ⇒ Float
Total price of add-ons.
-
#auto_renew ⇒ Boolean
Whether the subscription renews at the end of its term.
-
#bank_account_authorized_at ⇒ DateTime
Recurring subscriptions paid with ACH will have this attribute set.
-
#billing_info_id ⇒ String
Billing Info ID.
-
#canceled_at ⇒ DateTime
Canceled at.
-
#collection_method ⇒ String
Collection method.
-
#coupon_redemptions ⇒ Array[CouponRedemptionMini]
Returns subscription level coupon redemptions that are tied to this subscription.
-
#created_at ⇒ DateTime
Created at.
-
#credit_application_policy ⇒ CreditApplicationPolicy
Controls whether credit invoices are automatically applied to new invoices.
-
#currency ⇒ String
3-letter ISO 4217 currency code.
-
#current_period_ends_at ⇒ DateTime
Current billing period ends at.
-
#current_period_started_at ⇒ DateTime
Current billing period started at.
-
#current_term_ends_at ⇒ DateTime
When the term ends.
-
#current_term_started_at ⇒ DateTime
The start date of the term when the first billing period starts.
-
#custom_fields ⇒ Array[CustomField]
The custom fields will only be altered when they are included in a request.
-
#customer_notes ⇒ String
Customer notes.
-
#expiration_reason ⇒ String
Expiration reason.
-
#expires_at ⇒ DateTime
Expires at.
-
#id ⇒ String
Subscription ID.
-
#net_terms ⇒ Integer
Integer representing the number of days after an invoice's creation that the invoice will become past due.
-
#object ⇒ String
Object type.
-
#paused_at ⇒ DateTime
Null unless subscription is paused or will pause at the end of the current billing period.
-
#pending_change ⇒ SubscriptionChange
Subscription Change.
-
#plan ⇒ PlanMini
Just the important parts.
-
#po_number ⇒ String
For manual invoicing, this identifies the PO number associated with the subscription.
-
#quantity ⇒ Integer
Subscription quantity.
-
#ramp_intervals ⇒ Array[SubscriptionRampIntervalResponse]
The ramp intervals representing the pricing schedule for the subscription.
-
#remaining_billing_cycles ⇒ Integer
The remaining billing cycles in the current term.
-
#remaining_pause_cycles ⇒ Integer
Null unless subscription is paused or will pause at the end of the current billing period.
-
#renewal_billing_cycles ⇒ Integer
If
auto_renew=true, when a term completes,total_billing_cyclestakes this value as the length of subsequent terms. -
#resume_at ⇒ DateTime
The date the subscription billing resumes following a pause.
-
#revenue_schedule_type ⇒ String
Revenue schedule type.
-
#shipping ⇒ SubscriptionShipping
Subscription shipping details.
-
#state ⇒ String
State.
-
#subtotal ⇒ Float
Estimated total, before tax.
-
#tax_inclusive ⇒ Boolean
Determines whether or not tax is included in the unit amount.
-
#terms_and_conditions ⇒ String
Terms and conditions.
-
#total_billing_cycles ⇒ Integer
The number of cycles/billing periods in a term.
-
#trial_ends_at ⇒ DateTime
Trial period ends at.
-
#trial_started_at ⇒ DateTime
Trial period started at.
-
#unit_amount ⇒ Float
Subscription unit price.
-
#updated_at ⇒ DateTime
Last updated at.
-
#uuid ⇒ String
The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
Attributes inherited from Recurly::Resource
Method Summary
Methods inherited from Recurly::Resource
#==, #get_response, #inspect, #requires_client?, #to_json, #to_s
Methods included from Schema::SchemaFactory
Methods included from Schema::ResourceCaster
Methods included from Schema::SchemaValidator
#get_did_you_mean, #validate!, #validate_attribute!
Instance Attribute Details
#account ⇒ AccountMini
Returns Account mini details.
11 |
# File 'lib/recurly/resources/subscription.rb', line 11 define_attribute :account, :AccountMini |
#activated_at ⇒ DateTime
Returns Activated at.
15 |
# File 'lib/recurly/resources/subscription.rb', line 15 define_attribute :activated_at, DateTime |
#active_invoice_id ⇒ String
Returns The invoice ID of the latest invoice created for an active subscription.
19 |
# File 'lib/recurly/resources/subscription.rb', line 19 define_attribute :active_invoice_id, String |
#add_ons ⇒ Array[SubscriptionAddOn]
Returns Add-ons.
23 |
# File 'lib/recurly/resources/subscription.rb', line 23 define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOn } |
#add_ons_total ⇒ Float
Returns Total price of add-ons.
27 |
# File 'lib/recurly/resources/subscription.rb', line 27 define_attribute :add_ons_total, Float |
#auto_renew ⇒ Boolean
Returns Whether the subscription renews at the end of its term.
31 |
# File 'lib/recurly/resources/subscription.rb', line 31 define_attribute :auto_renew, :Boolean |
#bank_account_authorized_at ⇒ DateTime
Returns Recurring subscriptions paid with ACH will have this attribute set. This timestamp is used for alerting customers to reauthorize in 3 years in accordance with NACHA rules. If a subscription becomes inactive or the billing info is no longer a bank account, this timestamp is cleared.
35 |
# File 'lib/recurly/resources/subscription.rb', line 35 define_attribute :bank_account_authorized_at, DateTime |
#billing_info_id ⇒ String
Returns Billing Info ID.
39 |
# File 'lib/recurly/resources/subscription.rb', line 39 define_attribute :billing_info_id, String |
#canceled_at ⇒ DateTime
Returns Canceled at.
43 |
# File 'lib/recurly/resources/subscription.rb', line 43 define_attribute :canceled_at, DateTime |
#collection_method ⇒ String
Returns Collection method.
47 |
# File 'lib/recurly/resources/subscription.rb', line 47 define_attribute :collection_method, String |
#coupon_redemptions ⇒ Array[CouponRedemptionMini]
Returns subscription level coupon redemptions that are tied to this subscription.
51 |
# File 'lib/recurly/resources/subscription.rb', line 51 define_attribute :coupon_redemptions, Array, { :item_type => :CouponRedemptionMini } |
#created_at ⇒ DateTime
Returns Created at.
55 |
# File 'lib/recurly/resources/subscription.rb', line 55 define_attribute :created_at, DateTime |
#credit_application_policy ⇒ CreditApplicationPolicy
Returns Controls whether credit invoices are automatically applied to new invoices. The mode field determines the application behavior. When mode is all, the optional allowed_origins array can restrict which credit invoice origins are applied. - all: All available credit invoices are applied (default) - none: No credit invoices are applied automatically.
59 |
# File 'lib/recurly/resources/subscription.rb', line 59 define_attribute :credit_application_policy, :CreditApplicationPolicy |
#currency ⇒ String
Returns 3-letter ISO 4217 currency code.
63 |
# File 'lib/recurly/resources/subscription.rb', line 63 define_attribute :currency, String |
#current_period_ends_at ⇒ DateTime
Returns Current billing period ends at.
67 |
# File 'lib/recurly/resources/subscription.rb', line 67 define_attribute :current_period_ends_at, DateTime |
#current_period_started_at ⇒ DateTime
Returns Current billing period started at.
71 |
# File 'lib/recurly/resources/subscription.rb', line 71 define_attribute :current_period_started_at, DateTime |
#current_term_ends_at ⇒ DateTime
Returns When the term ends. This is calculated by a plan's interval and total_billing_cycles in a term. Subscription changes with a timeframe=renewal will be applied on this date.
75 |
# File 'lib/recurly/resources/subscription.rb', line 75 define_attribute :current_term_ends_at, DateTime |
#current_term_started_at ⇒ DateTime
Returns The start date of the term when the first billing period starts. The subscription term is the length of time that a customer will be committed to a subscription. A term can span multiple billing periods.
79 |
# File 'lib/recurly/resources/subscription.rb', line 79 define_attribute :current_term_started_at, DateTime |
#custom_fields ⇒ Array[CustomField]
Returns The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.
83 |
# File 'lib/recurly/resources/subscription.rb', line 83 define_attribute :custom_fields, Array, { :item_type => :CustomField } |
#customer_notes ⇒ String
Returns Customer notes.
87 |
# File 'lib/recurly/resources/subscription.rb', line 87 define_attribute :customer_notes, String |
#expiration_reason ⇒ String
Returns Expiration reason.
91 |
# File 'lib/recurly/resources/subscription.rb', line 91 define_attribute :expiration_reason, String |
#expires_at ⇒ DateTime
Returns Expires at.
95 |
# File 'lib/recurly/resources/subscription.rb', line 95 define_attribute :expires_at, DateTime |
#id ⇒ String
Returns Subscription ID.
99 |
# File 'lib/recurly/resources/subscription.rb', line 99 define_attribute :id, String |
#net_terms ⇒ Integer
Returns Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '0', it is due 'On Receipt' and will become past due 24 hours after it’s created. If an invoice is due net 30, it will become past due at 31 days exactly.
103 |
# File 'lib/recurly/resources/subscription.rb', line 103 define_attribute :net_terms, Integer |
#object ⇒ String
Returns Object type.
107 |
# File 'lib/recurly/resources/subscription.rb', line 107 define_attribute :object, String |
#paused_at ⇒ DateTime
Returns Null unless subscription is paused or will pause at the end of the current billing period.
111 |
# File 'lib/recurly/resources/subscription.rb', line 111 define_attribute :paused_at, DateTime |
#pending_change ⇒ SubscriptionChange
Returns Subscription Change.
115 |
# File 'lib/recurly/resources/subscription.rb', line 115 define_attribute :pending_change, :SubscriptionChange |
#plan ⇒ PlanMini
Returns Just the important parts.
119 |
# File 'lib/recurly/resources/subscription.rb', line 119 define_attribute :plan, :PlanMini |
#po_number ⇒ String
Returns For manual invoicing, this identifies the PO number associated with the subscription.
123 |
# File 'lib/recurly/resources/subscription.rb', line 123 define_attribute :po_number, String |
#quantity ⇒ Integer
Returns Subscription quantity.
127 |
# File 'lib/recurly/resources/subscription.rb', line 127 define_attribute :quantity, Integer |
#ramp_intervals ⇒ Array[SubscriptionRampIntervalResponse]
Returns The ramp intervals representing the pricing schedule for the subscription.
131 |
# File 'lib/recurly/resources/subscription.rb', line 131 define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampIntervalResponse } |
#remaining_billing_cycles ⇒ Integer
Returns The remaining billing cycles in the current term.
135 |
# File 'lib/recurly/resources/subscription.rb', line 135 define_attribute :remaining_billing_cycles, Integer |
#remaining_pause_cycles ⇒ Integer
Returns Null unless subscription is paused or will pause at the end of the current billing period.
139 |
# File 'lib/recurly/resources/subscription.rb', line 139 define_attribute :remaining_pause_cycles, Integer |
#renewal_billing_cycles ⇒ Integer
Returns If auto_renew=true, when a term completes, total_billing_cycles takes this value as the length of subsequent terms. Defaults to the plan's total_billing_cycles.
143 |
# File 'lib/recurly/resources/subscription.rb', line 143 define_attribute :renewal_billing_cycles, Integer |
#resume_at ⇒ DateTime
Returns The date the subscription billing resumes following a pause. Null unless the subscription is paused or scheduled to be paused.
147 |
# File 'lib/recurly/resources/subscription.rb', line 147 define_attribute :resume_at, DateTime |
#revenue_schedule_type ⇒ String
Returns Revenue schedule type.
151 |
# File 'lib/recurly/resources/subscription.rb', line 151 define_attribute :revenue_schedule_type, String |
#shipping ⇒ SubscriptionShipping
Returns Subscription shipping details.
155 |
# File 'lib/recurly/resources/subscription.rb', line 155 define_attribute :shipping, :SubscriptionShipping |
#state ⇒ String
Returns State.
159 |
# File 'lib/recurly/resources/subscription.rb', line 159 define_attribute :state, String |
#subtotal ⇒ Float
Returns Estimated total, before tax.
163 |
# File 'lib/recurly/resources/subscription.rb', line 163 define_attribute :subtotal, Float |
#tax_inclusive ⇒ Boolean
Returns Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to utilize this flag.
167 |
# File 'lib/recurly/resources/subscription.rb', line 167 define_attribute :tax_inclusive, :Boolean |
#terms_and_conditions ⇒ String
Returns Terms and conditions.
171 |
# File 'lib/recurly/resources/subscription.rb', line 171 define_attribute :terms_and_conditions, String |
#total_billing_cycles ⇒ Integer
Returns The number of cycles/billing periods in a term. When remaining_billing_cycles=0, if auto_renew=true the subscription will renew and a new term will begin, otherwise the subscription will expire.
175 |
# File 'lib/recurly/resources/subscription.rb', line 175 define_attribute :total_billing_cycles, Integer |
#trial_ends_at ⇒ DateTime
Returns Trial period ends at.
179 |
# File 'lib/recurly/resources/subscription.rb', line 179 define_attribute :trial_ends_at, DateTime |
#trial_started_at ⇒ DateTime
Returns Trial period started at.
183 |
# File 'lib/recurly/resources/subscription.rb', line 183 define_attribute :trial_started_at, DateTime |
#unit_amount ⇒ Float
Returns Subscription unit price.
187 |
# File 'lib/recurly/resources/subscription.rb', line 187 define_attribute :unit_amount, Float |
#updated_at ⇒ DateTime
Returns Last updated at.
191 |
# File 'lib/recurly/resources/subscription.rb', line 191 define_attribute :updated_at, DateTime |
#uuid ⇒ String
Returns The UUID is useful for matching data with the CSV exports and building URLs into Recurly's UI.
195 |
# File 'lib/recurly/resources/subscription.rb', line 195 define_attribute :uuid, String |