Class: Recurly::Requests::SubscriptionCreate
- Inherits:
-
Recurly::Request
- Object
- Recurly::Request
- Recurly::Requests::SubscriptionCreate
- Defined in:
- lib/recurly/requests/subscription_create.rb
Instance Attribute Summary collapse
- #account ⇒ AccountCreate
-
#add_ons ⇒ Array[SubscriptionAddOnCreate]
Add-ons.
-
#auto_renew ⇒ Boolean
Whether the subscription renews at the end of its term.
-
#billing_info_id ⇒ String
The `billing_info_id` is the value that represents a specific billing info for an end customer.
-
#bulk ⇒ Boolean
Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions.
-
#collection_method ⇒ String
Collection method.
-
#coupon_codes ⇒ Array[String]
A list of coupon_codes to be redeemed on the subscription or account during the purchase.
-
#credit_customer_notes ⇒ String
If there are pending credits on the account that will be invoiced during the subscription creation, these will be used as the Customer Notes on the credit invoice.
-
#currency ⇒ String
3-letter ISO 4217 currency code.
-
#custom_fields ⇒ Array[CustomField]
The custom fields will only be altered when they are included in a request.
-
#customer_notes ⇒ String
This will default to the Customer Notes text specified on the Invoice Settings.
-
#gateway_code ⇒ String
If present, this subscription's transactions will use the payment gateway with this code.
-
#gift_card_redemption_code ⇒ String
A gift card redemption code to be redeemed on the purchase invoice.
-
#net_terms ⇒ Integer
Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due.
-
#net_terms_type ⇒ String
Optionally supplied string that may be either `net` or `eom` (end-of-month).
-
#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
You must provide either a `plan_code` or `plan_id`.
-
#plan_id ⇒ String
You must provide either a `plan_code` or `plan_id`.
-
#po_number ⇒ String
For manual invoicing, this identifies the PO number associated with the subscription.
-
#quantity ⇒ Integer
Optionally override the default quantity of 1.
-
#ramp_intervals ⇒ Array[SubscriptionRampInterval]
The new set of ramp intervals for the subscription.
-
#renewal_billing_cycles ⇒ Integer
If `auto_renew=true`, when a term completes, `total_billing_cycles` takes this value as the length of subsequent terms.
-
#revenue_schedule_type ⇒ String
Revenue schedule type.
-
#shipping ⇒ SubscriptionShippingCreate
Create a shipping address on the account and assign it to the subscription.
-
#starts_at ⇒ DateTime
If set, the subscription will begin in the future on this date.
-
#tax_inclusive ⇒ Boolean
Determines whether or not tax is included in the unit amount.
-
#terms_and_conditions ⇒ String
This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin.
-
#total_billing_cycles ⇒ Integer
The number of cycles/billing periods in a term.
-
#transaction_type ⇒ String
An optional type designation for the payment gateway transaction created by this request.
-
#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.
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
#account ⇒ AccountCreate
11 |
# File 'lib/recurly/requests/subscription_create.rb', line 11 define_attribute :account, :AccountCreate |
#add_ons ⇒ Array[SubscriptionAddOnCreate]
Returns Add-ons.
15 |
# File 'lib/recurly/requests/subscription_create.rb', line 15 define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnCreate } |
#auto_renew ⇒ Boolean
Returns Whether the subscription renews at the end of its term.
19 |
# File 'lib/recurly/requests/subscription_create.rb', line 19 define_attribute :auto_renew, :Boolean |
#billing_info_id ⇒ String
Returns The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
23 |
# File 'lib/recurly/requests/subscription_create.rb', line 23 define_attribute :billing_info_id, String |
#bulk ⇒ Boolean
Returns Optional field to be used only when needing to bypass the 60 second limit on creating subscriptions. Should only be used when creating subscriptions in bulk from the API.
27 |
# File 'lib/recurly/requests/subscription_create.rb', line 27 define_attribute :bulk, :Boolean |
#collection_method ⇒ String
Returns Collection method.
31 |
# File 'lib/recurly/requests/subscription_create.rb', line 31 define_attribute :collection_method, String |
#coupon_codes ⇒ Array[String]
Returns A list of coupon_codes to be redeemed on the subscription or account during the purchase.
35 |
# File 'lib/recurly/requests/subscription_create.rb', line 35 define_attribute :coupon_codes, Array, { :item_type => String } |
#credit_customer_notes ⇒ String
Returns If there are pending credits on the account that will be invoiced during the subscription creation, these will be used as the Customer Notes on the credit invoice.
39 |
# File 'lib/recurly/requests/subscription_create.rb', line 39 define_attribute :credit_customer_notes, String |
#currency ⇒ String
Returns 3-letter ISO 4217 currency code.
43 |
# File 'lib/recurly/requests/subscription_create.rb', line 43 define_attribute :currency, String |
#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.
47 |
# File 'lib/recurly/requests/subscription_create.rb', line 47 define_attribute :custom_fields, Array, { :item_type => :CustomField } |
#customer_notes ⇒ String
Returns This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes. Custom notes will stay with a subscription on all renewals.
51 |
# File 'lib/recurly/requests/subscription_create.rb', line 51 define_attribute :customer_notes, String |
#gateway_code ⇒ String
Returns If present, this subscription's transactions will use the payment gateway with this code.
55 |
# File 'lib/recurly/requests/subscription_create.rb', line 55 define_attribute :gateway_code, String |
#gift_card_redemption_code ⇒ String
Returns A gift card redemption code to be redeemed on the purchase invoice.
59 |
# File 'lib/recurly/requests/subscription_create.rb', line 59 define_attribute :gift_card_redemption_code, String |
#net_terms ⇒ Integer
Returns Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due. For `manual` collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due `net 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. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. For more information on how net terms work with `manual` collection visit our docs page (docs.recurly.com/docs/manual-payments#section-collection-terms) or visit (docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.
63 |
# File 'lib/recurly/requests/subscription_create.rb', line 63 define_attribute :net_terms, Integer |
#net_terms_type ⇒ String
Returns Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
67 |
# File 'lib/recurly/requests/subscription_create.rb', line 67 define_attribute :net_terms_type, String |
#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.
71 |
# File 'lib/recurly/requests/subscription_create.rb', line 71 define_attribute :next_bill_date, DateTime |
#plan_code ⇒ String
Returns You must provide either a `plan_code` or `plan_id`. If both are provided the `plan_id` will be used.
75 |
# File 'lib/recurly/requests/subscription_create.rb', line 75 define_attribute :plan_code, String |
#plan_id ⇒ String
Returns You must provide either a `plan_code` or `plan_id`. If both are provided the `plan_id` will be used.
79 |
# File 'lib/recurly/requests/subscription_create.rb', line 79 define_attribute :plan_id, String |
#po_number ⇒ String
Returns For manual invoicing, this identifies the PO number associated with the subscription.
83 |
# File 'lib/recurly/requests/subscription_create.rb', line 83 define_attribute :po_number, String |
#quantity ⇒ Integer
Returns Optionally override the default quantity of 1.
87 |
# File 'lib/recurly/requests/subscription_create.rb', line 87 define_attribute :quantity, Integer |
#ramp_intervals ⇒ Array[SubscriptionRampInterval]
Returns The new set of ramp intervals for the subscription.
91 |
# File 'lib/recurly/requests/subscription_create.rb', line 91 define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval } |
#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`.
95 |
# File 'lib/recurly/requests/subscription_create.rb', line 95 define_attribute :renewal_billing_cycles, Integer |
#revenue_schedule_type ⇒ String
Returns Revenue schedule type.
99 |
# File 'lib/recurly/requests/subscription_create.rb', line 99 define_attribute :revenue_schedule_type, String |
#shipping ⇒ SubscriptionShippingCreate
Returns Create a shipping address on the account and assign it to the subscription.
103 |
# File 'lib/recurly/requests/subscription_create.rb', line 103 define_attribute :shipping, :SubscriptionShippingCreate |
#starts_at ⇒ DateTime
Returns If set, the subscription will begin in the future on this date. The subscription will apply the setup fee and trial period, unless the plan has no trial.
107 |
# File 'lib/recurly/requests/subscription_create.rb', line 107 define_attribute :starts_at, DateTime |
#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 use this flag.
111 |
# File 'lib/recurly/requests/subscription_create.rb', line 111 define_attribute :tax_inclusive, :Boolean |
#terms_and_conditions ⇒ String
Returns This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions. Custom notes will stay with a subscription on all renewals.
115 |
# File 'lib/recurly/requests/subscription_create.rb', line 115 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.
119 |
# File 'lib/recurly/requests/subscription_create.rb', line 119 define_attribute :total_billing_cycles, Integer |
#transaction_type ⇒ String
Returns An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.
123 |
# File 'lib/recurly/requests/subscription_create.rb', line 123 define_attribute :transaction_type, String |
#trial_ends_at ⇒ DateTime
Returns If set, overrides the default trial behavior for the subscription. When the current date time or a past date time is provided the subscription will begin with no trial phase (overriding any plan default trial). When a future date time is provided the subscription will begin with a trial phase ending at the specified date time.
127 |
# File 'lib/recurly/requests/subscription_create.rb', line 127 define_attribute :trial_ends_at, DateTime |
#unit_amount ⇒ Float
Returns Override the unit amount of the subscription plan by setting this value. If not provided, the subscription will inherit the price from the subscription plan for the provided currency.
131 |
# File 'lib/recurly/requests/subscription_create.rb', line 131 define_attribute :unit_amount, Float |