Class: Recurly::Requests::SubscriptionPurchase
- Inherits:
-
Recurly::Request
- Object
- Recurly::Request
- Recurly::Requests::SubscriptionPurchase
- Defined in:
- lib/recurly/requests/subscription_purchase.rb
Instance Attribute Summary collapse
-
#add_ons ⇒ Array[SubscriptionAddOnCreate]
Add-ons.
-
#auto_renew ⇒ Boolean
Whether the subscription renews at the end of its term.
- #custom_fields ⇒ Array[CustomField]
-
#next_bill_date ⇒ DateTime
If present, this sets the date the subscription’s next billing period will start (
current_period_ends_at). -
#plan_code ⇒ String
Plan code.
-
#plan_id ⇒ String
Plan ID.
-
#quantity ⇒ Integer
Optionally override the default quantity of 1.
-
#renewal_billing_cycles ⇒ Integer
If ‘auto_renew=true`, when a term completes,
total_billing_cyclestakes this value as the length of subsequent terms. -
#shipping ⇒ SubscriptionShippingPurchase
Create a shipping address on the account and assign it to the subscription.
-
#total_billing_cycles ⇒ Integer
The number of cycles/billing periods in a term.
-
#trial_ends_at ⇒ DateTime
If set, overrides the default trial behavior for the subscription.
-
#unit_amount ⇒ Float
Override the unit amount of the subscription plan by setting this value in cents.
Attributes inherited from Recurly::Request
Method Summary
Methods inherited from Recurly::Request
Methods included from Schema::SchemaFactory
Methods included from Schema::RequestCaster
Methods included from Schema::ResourceCaster
Methods included from Schema::SchemaValidator
#get_did_you_mean, #validate!, #validate_attribute!
Instance Attribute Details
#add_ons ⇒ Array[SubscriptionAddOnCreate]
Returns Add-ons.
11 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 11 define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnCreate } |
#auto_renew ⇒ Boolean
Returns Whether the subscription renews at the end of its term.
15 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 15 define_attribute :auto_renew, :Boolean |
#custom_fields ⇒ Array[CustomField]
19 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 19 define_attribute :custom_fields, Array, { :item_type => :CustomField } |
#next_bill_date ⇒ DateTime
Returns If present, this sets the date the subscription’s next billing period will start (current_period_ends_at). This can be used to align the subscription’s billing to a specific day of the month. The initial invoice will be prorated for the period between the subscription’s activation date and the billing period end date. Subsequent periods will be based off the plan interval. For a subscription with a trial period, this will change when the trial expires.
23 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 23 define_attribute :next_bill_date, DateTime |
#plan_code ⇒ String
Returns Plan code.
27 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 27 define_attribute :plan_code, String |
#plan_id ⇒ String
Returns Plan ID.
31 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 31 define_attribute :plan_id, String |
#quantity ⇒ Integer
Returns Optionally override the default quantity of 1.
35 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 35 define_attribute :quantity, 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.
39 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 39 define_attribute :renewal_billing_cycles, Integer |
#shipping ⇒ SubscriptionShippingPurchase
Returns Create a shipping address on the account and assign it to the subscription.
43 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 43 define_attribute :shipping, :SubscriptionShippingPurchase |
#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.
47 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 47 define_attribute :total_billing_cycles, Integer |
#trial_ends_at ⇒ DateTime
Returns If set, overrides the default trial behavior for the subscription. The date must be in the future.
51 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 51 define_attribute :trial_ends_at, DateTime |
#unit_amount ⇒ Float
Returns Override the unit amount of the subscription plan by setting this value in cents. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.
55 |
# File 'lib/recurly/requests/subscription_purchase.rb', line 55 define_attribute :unit_amount, Float |