Class: Recurly::Requests::SubscriptionCreate

Inherits:
Recurly::Request show all
Defined in:
lib/recurly/requests/subscription_create.rb

Instance Attribute Summary collapse

Attributes inherited from Recurly::Request

#attributes

Method Summary

Methods inherited from Recurly::Request

#==, #to_s

Methods included from Schema::SchemaFactory

#schema

Methods included from Schema::RequestCaster

#cast_request

Methods included from Schema::ResourceCaster

#cast

Methods included from Schema::SchemaValidator

#get_did_you_mean, #validate!, #validate_attribute!

Instance Attribute Details

#accountAccountCreate

Returns:



11
# File 'lib/recurly/requests/subscription_create.rb', line 11

define_attribute :account, :AccountCreate

#add_onsArray[SubscriptionAddOnCreate]

Returns Add-ons.

Returns:



15
# File 'lib/recurly/requests/subscription_create.rb', line 15

define_attribute :add_ons, Array, { :item_type => :SubscriptionAddOnCreate }

#auto_renewBoolean

Returns Whether the subscription renews at the end of its term.

Returns:

  • (Boolean)

    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

#collection_methodString

Returns Collection method.

Returns:

  • (String)

    Collection method



23
# File 'lib/recurly/requests/subscription_create.rb', line 23

define_attribute :collection_method, String

#coupon_codeString

Returns Optional coupon code to redeem on the account and discount the subscription. Please note, the subscription request will fail if the coupon is invalid.

Returns:

  • (String)

    Optional coupon code to redeem on the account and discount the subscription. Please note, the subscription request will fail if the coupon is invalid.



27
# File 'lib/recurly/requests/subscription_create.rb', line 27

define_attribute :coupon_code, String

#credit_customer_notesString

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.

Returns:

  • (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.



31
# File 'lib/recurly/requests/subscription_create.rb', line 31

define_attribute :credit_customer_notes, String

#currencyString

Returns 3-letter ISO 4217 currency code.

Returns:

  • (String)

    3-letter ISO 4217 currency code.



35
# File 'lib/recurly/requests/subscription_create.rb', line 35

define_attribute :currency, String

#custom_fieldsArray[CustomField]

Returns:



39
# File 'lib/recurly/requests/subscription_create.rb', line 39

define_attribute :custom_fields, Array, { :item_type => :CustomField }

#customer_notesString

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.

Returns:

  • (String)

    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.



43
# File 'lib/recurly/requests/subscription_create.rb', line 43

define_attribute :customer_notes, String

#net_termsInteger

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.

Returns:

  • (Integer)

    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.



47
# File 'lib/recurly/requests/subscription_create.rb', line 47

define_attribute :net_terms, Integer

#next_bill_dateDateTime

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.

Returns:

  • (DateTime)

    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.



51
# File 'lib/recurly/requests/subscription_create.rb', line 51

define_attribute :next_bill_date, DateTime

#plan_codeString

Returns You must provide either a plan_code or plan_id. If both are provided the plan_id will be used.

Returns:

  • (String)

    You must provide either a plan_code or plan_id. If both are provided the plan_id will be used.



55
# File 'lib/recurly/requests/subscription_create.rb', line 55

define_attribute :plan_code, String

#plan_idString

Returns You must provide either a plan_code or plan_id. If both are provided the plan_id will be used.

Returns:

  • (String)

    You must provide either a plan_code or plan_id. If both are provided the plan_id will be used.



59
# File 'lib/recurly/requests/subscription_create.rb', line 59

define_attribute :plan_id, String

#po_numberString

Returns For manual invoicing, this identifies the PO number associated with the subscription.

Returns:

  • (String)

    For manual invoicing, this identifies the PO number associated with the subscription.



63
# File 'lib/recurly/requests/subscription_create.rb', line 63

define_attribute :po_number, String

#quantityInteger

Returns Optionally override the default quantity of 1.

Returns:

  • (Integer)

    Optionally override the default quantity of 1.



67
# File 'lib/recurly/requests/subscription_create.rb', line 67

define_attribute :quantity, Integer

#renewal_billing_cyclesInteger

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.

Returns:

  • (Integer)

    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.



71
# File 'lib/recurly/requests/subscription_create.rb', line 71

define_attribute :renewal_billing_cycles, Integer

#shippingSubscriptionShippingCreate

Returns Create a shipping address on the account and assign it to the subscription.

Returns:



75
# File 'lib/recurly/requests/subscription_create.rb', line 75

define_attribute :shipping, :SubscriptionShippingCreate

#starts_atDateTime

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.

Returns:

  • (DateTime)

    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.



79
# File 'lib/recurly/requests/subscription_create.rb', line 79

define_attribute :starts_at, DateTime

#terms_and_conditionsString

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.

Returns:

  • (String)

    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.



83
# File 'lib/recurly/requests/subscription_create.rb', line 83

define_attribute :terms_and_conditions, String

#total_billing_cyclesInteger

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.

Returns:

  • (Integer)

    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.



87
# File 'lib/recurly/requests/subscription_create.rb', line 87

define_attribute :total_billing_cycles, Integer

#transaction_typeString

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.

Returns:

  • (String)

    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.



91
# File 'lib/recurly/requests/subscription_create.rb', line 91

define_attribute :transaction_type, String

#trial_ends_atDateTime

Returns If set, overrides the default trial behavior for the subscription. The date must be in the future.

Returns:

  • (DateTime)

    If set, overrides the default trial behavior for the subscription. The date must be in the future.



95
# File 'lib/recurly/requests/subscription_create.rb', line 95

define_attribute :trial_ends_at, DateTime

#unit_amountFloat

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.

Returns:

  • (Float)

    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.



99
# File 'lib/recurly/requests/subscription_create.rb', line 99

define_attribute :unit_amount, Float