Class: Recurly::Requests::SubscriptionChangeCreate

Inherits:
Recurly::Request show all
Defined in:
lib/recurly/requests/subscription_change_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

#add_onsArray[SubscriptionAddOnUpdate]

Returns If you provide a value for this field it will replace any existing add-ons. So, when adding or modifying an add-on, you need to include the existing subscription add-ons. Unchanged add-ons can be included just using the subscription add-on”s ID: ‘“abc123”`. If this value is omitted your existing add-ons will be unaffected. To remove all existing add-ons, this value should be an empty array.’ If a subscription add-on’s code is supplied without the id, ‘“def456”`, the subscription add-on attributes will be set to the current values of the plan add-on unless provided in the request. - If an id is passed, any attributes not passed in will pull from the existing subscription add-on - If a code is passed, any attributes not passed in will pull from the current values of the plan add-on - Attributes passed in as part of the request will override either of the above scenarios.

Returns:

  • (Array[SubscriptionAddOnUpdate])

    If you provide a value for this field it will replace any existing add-ons. So, when adding or modifying an add-on, you need to include the existing subscription add-ons. Unchanged add-ons can be included just using the subscription add-on”s ID: ‘“abc123”`. If this value is omitted your existing add-ons will be unaffected. To remove all existing add-ons, this value should be an empty array.’ If a subscription add-on’s code is supplied without the id, ‘“def456”`, the subscription add-on attributes will be set to the current values of the plan add-on unless provided in the request. - If an id is passed, any attributes not passed in will pull from the existing subscription add-on - If a code is passed, any attributes not passed in will pull from the current values of the plan add-on - Attributes passed in as part of the request will override either of the above scenarios



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

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

#billing_infoSubscriptionChangeBillingInfoCreate



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

define_attribute :billing_info, :SubscriptionChangeBillingInfoCreate

#business_entity_codeString

Returns The business_entity_code is the value that represents a specific business entity for an end customer. When business_entity_code is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the ‘Multiple Business Entities` feature is enabled. If both business_entity_id and business_entity_code are present, business_entity_id will be used. Only allowed if the timeframe is not now.

Returns:

  • (String)

    The business_entity_code is the value that represents a specific business entity for an end customer. When business_entity_code is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the ‘Multiple Business Entities` feature is enabled. If both business_entity_id and business_entity_code are present, business_entity_id will be used. Only allowed if the timeframe is not now.



19
# File 'lib/recurly/requests/subscription_change_create.rb', line 19

define_attribute :business_entity_code, String

#business_entity_idString

Returns The business_entity_id is the value that represents a specific business entity for an end customer. When business_entity_id is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the ‘Multiple Business Entities` feature is enabled. If both business_entity_id and business_entity_code are present, business_entity_id will be used. Only allowed if the timeframe is not now.

Returns:

  • (String)

    The business_entity_id is the value that represents a specific business entity for an end customer. When business_entity_id is used to assign a business entity to the subscription, all future billing events for the subscription will bill to the specified business entity. Available when the ‘Multiple Business Entities` feature is enabled. If both business_entity_id and business_entity_code are present, business_entity_id will be used. Only allowed if the timeframe is not now.



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

define_attribute :business_entity_id, String

#collection_methodString

Returns Collection method.

Returns:

  • (String)

    Collection method



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

define_attribute :collection_method, String

#coupon_codesArray[String]

Returns A list of coupon_codes to be redeemed on the subscription during the change. Only allowed if timeframe is now and you change something about the subscription that creates an invoice.

Returns:

  • (Array[String])

    A list of coupon_codes to be redeemed on the subscription during the change. Only allowed if timeframe is now and you change something about the subscription that creates an invoice.



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

define_attribute :coupon_codes, Array, { :item_type => String }

#custom_fieldsArray[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.

Returns:

  • (Array[CustomField])

    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.



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

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

#net_termsInteger

Returns Integer normally 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. During a subscription change, it’s not necessary to provide both the ‘Net Terms Type` and `Net Terms` parameters. 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.

Returns:

  • (Integer)

    Integer normally 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. During a subscription change, it’s not necessary to provide both the ‘Net Terms Type` and `Net Terms` parameters. 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.



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

define_attribute :net_terms, Integer

#net_terms_typeString

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.

Returns:

  • (String)

    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.



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

define_attribute :net_terms_type, String

#next_bill_dateDateTime

Returns If present, this sets the date the subscription’s next billing period will start (current_period_ends_at). When combined with proration_settings, proration calculation should occur, only supported when timeframe is now.

Returns:

  • (DateTime)

    If present, this sets the date the subscription’s next billing period will start (current_period_ends_at). When combined with proration_settings, proration calculation should occur, only supported when timeframe is now.



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

define_attribute :next_bill_date, DateTime

#plan_codeString

Returns If you want to change to a new plan, you can provide the plan’s code or id. If both are provided the plan_id will be used.

Returns:

  • (String)

    If you want to change to a new plan, you can provide the plan’s code or id. If both are provided the plan_id will be used.



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

define_attribute :plan_code, String

#plan_idString

Returns If you want to change to a new plan, you can provide the plan’s code or id. If both are provided the plan_id will be used.

Returns:

  • (String)

    If you want to change to a new plan, you can provide the plan’s code or id. If both are provided the plan_id will be used.



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

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.



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

define_attribute :po_number, String

#price_segment_idString

Returns The price segment ID, e.g. e28zov4fw0v2.

Returns:

  • (String)

    The price segment ID, e.g. e28zov4fw0v2.



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

define_attribute :price_segment_id, String

#proration_settingsProrationSettings

Returns Allows you to control how any resulting charges and credits will be calculated and prorated.

Returns:

  • (ProrationSettings)

    Allows you to control how any resulting charges and credits will be calculated and prorated.



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

define_attribute :proration_settings, :ProrationSettings

#quantityInteger

Returns Optionally override the default quantity of 1.

Returns:

  • (Integer)

    Optionally override the default quantity of 1.



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

define_attribute :quantity, Integer

#ramp_intervalsArray[SubscriptionRampInterval]

Returns The new set of ramp intervals for the subscription.

Returns:



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

define_attribute :ramp_intervals, Array, { :item_type => :SubscriptionRampInterval }

#revenue_schedule_typeString

Returns Revenue schedule type.

Returns:

  • (String)

    Revenue schedule type



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

define_attribute :revenue_schedule_type, String

#shippingSubscriptionChangeShippingCreate

Returns Shipping addresses are tied to a customer’s account. Each account can have up to 20 different shipping addresses, and if you have enabled multiple subscriptions per account, you can associate different shipping addresses to each subscription.

Returns:

  • (SubscriptionChangeShippingCreate)

    Shipping addresses are tied to a customer’s account. Each account can have up to 20 different shipping addresses, and if you have enabled multiple subscriptions per account, you can associate different shipping addresses to each subscription.



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

define_attribute :shipping, :SubscriptionChangeShippingCreate

#tax_inclusiveBoolean

Returns This field is deprecated. Please do not use it.

Returns:

  • (Boolean)

    This field is deprecated. Please do not use it.



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

define_attribute :tax_inclusive, :Boolean

#timeframeString

Returns The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now, when the subscription is next billed, or when the subscription term ends. Generally, if you’re performing an upgrade, you will want the change to occur immediately (now). If you’re performing a downgrade, you should set the timeframe to term_end or bill_date so the change takes effect at a scheduled billing date. The renewal timeframe option is accepted as an alias for term_end.

Returns:

  • (String)

    The timeframe parameter controls when the upgrade or downgrade takes place. The subscription change can occur now, when the subscription is next billed, or when the subscription term ends. Generally, if you’re performing an upgrade, you will want the change to occur immediately (now). If you’re performing a downgrade, you should set the timeframe to term_end or bill_date so the change takes effect at a scheduled billing date. The renewal timeframe option is accepted as an alias for term_end.



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

define_attribute :timeframe, String

#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.



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

define_attribute :transaction_type, String

#unit_amountFloat

Returns Optionally, sets custom pricing for the subscription, overriding the plan’s default unit amount. The subscription’s current currency will be used.

Returns:

  • (Float)

    Optionally, sets custom pricing for the subscription, overriding the plan’s default unit amount. The subscription’s current currency will be used.



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

define_attribute :unit_amount, Float