Class: Recurly::Resources::Plan

Inherits:
Recurly::Resource show all
Defined in:
lib/recurly/resources/plan.rb

Instance Attribute Summary collapse

Attributes inherited from Recurly::Resource

#attributes

Method Summary

Methods inherited from Recurly::Resource

#==, #get_response, #inspect, #requires_client?, #to_json, #to_s

Methods included from Schema::SchemaFactory

#schema

Methods included from Schema::ResourceCaster

#cast

Methods included from Schema::SchemaValidator

#get_did_you_mean, #validate!, #validate_attribute!

Instance Attribute Details

#accounting_code ⇒ String

Returns Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code.

Returns:

  • (String) —

    Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code.



11
# File 'lib/recurly/resources/plan.rb', line 11

define_attribute :accounting_code, String

#allow_any_item_on_subscriptions ⇒ Boolean

Returns Used to determine whether items can be assigned as add-ons to individual subscriptions. If true, items can be assigned as add-ons to individual subscription add-ons. If false, only plan add-ons can be used.

Returns:

  • (Boolean) —

    Used to determine whether items can be assigned as add-ons to individual subscriptions. If true, items can be assigned as add-ons to individual subscription add-ons. If false, only plan add-ons can be used.



15
# File 'lib/recurly/resources/plan.rb', line 15

define_attribute :allow_any_item_on_subscriptions, :Boolean

#auto_renew ⇒ Boolean

Returns Subscriptions will automatically inherit this value once they are active. If auto_renew is true, then a subscription will automatically renew its term at renewal. If auto_renew is false, then a subscription will expire at the end of its term. auto_renew can be overridden on the subscription record itself.

Returns:

  • (Boolean) —

    Subscriptions will automatically inherit this value once they are active. If auto_renew is true, then a subscription will automatically renew its term at renewal. If auto_renew is false, then a subscription will expire at the end of its term. auto_renew can be overridden on the subscription record itself.



19
# File 'lib/recurly/resources/plan.rb', line 19

define_attribute :auto_renew, :Boolean

#avalara_service_type ⇒ Integer

Returns Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to the documentation for more available t/s types.

Returns:

  • (Integer) —

    Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to the documentation for more available t/s types.



23
# File 'lib/recurly/resources/plan.rb', line 23

define_attribute :avalara_service_type, Integer

#avalara_transaction_type ⇒ Integer

Returns Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to the documentation for more available t/s types.

Returns:

  • (Integer) —

    Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the plan is taxed. Refer to the documentation for more available t/s types.



27
# File 'lib/recurly/resources/plan.rb', line 27

define_attribute :avalara_transaction_type, Integer

#code ⇒ String

Returns Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.

Returns:

  • (String) —

    Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.



31
# File 'lib/recurly/resources/plan.rb', line 31

define_attribute :code, String

#created_at ⇒ DateTime

Returns Created at.

Returns:

  • (DateTime) —

    Created at



35
# File 'lib/recurly/resources/plan.rb', line 35

define_attribute :created_at, DateTime

#currencies ⇒ Array[PlanPricing]

Returns Present only when pricing_model is 'fixed'.

Returns:

  • (Array[PlanPricing]) —

    Present only when pricing_model is 'fixed'.



39
# File 'lib/recurly/resources/plan.rb', line 39

define_attribute :currencies, Array, { :item_type => :PlanPricing }

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

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.



43
# File 'lib/recurly/resources/plan.rb', line 43

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

#deleted_at ⇒ DateTime

Returns Deleted at.

Returns:

  • (DateTime) —

    Deleted at



47
# File 'lib/recurly/resources/plan.rb', line 47

define_attribute :deleted_at, DateTime

#description ⇒ String

Returns Optional description, not displayed.

Returns:

  • (String) —

    Optional description, not displayed.



51
# File 'lib/recurly/resources/plan.rb', line 51

define_attribute :description, String

#dunning_campaign_id ⇒ String

Returns Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.

Returns:

  • (String) —

    Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.



55
# File 'lib/recurly/resources/plan.rb', line 55

define_attribute :dunning_campaign_id, String

#harmonized_system_code ⇒ String

Returns The Harmonized System (HS) code is an internationally standardized system of names and numbers to classify traded products. The HS code, sometimes called Commodity Code, is used by customs authorities around the world to identify products when assessing duties and taxes. The HS code may also be referred to as the tariff code or customs code. Values should contain only digits and decimals.

Returns:

  • (String) —

    The Harmonized System (HS) code is an internationally standardized system of names and numbers to classify traded products. The HS code, sometimes called Commodity Code, is used by customs authorities around the world to identify products when assessing duties and taxes. The HS code may also be referred to as the tariff code or customs code. Values should contain only digits and decimals.



59
# File 'lib/recurly/resources/plan.rb', line 59

define_attribute :harmonized_system_code, String

#hosted_pages ⇒ PlanHostedPages

Returns Hosted pages settings.

Returns:



63
# File 'lib/recurly/resources/plan.rb', line 63

define_attribute :hosted_pages, :PlanHostedPages

#id ⇒ String

Returns Plan ID.

Returns:

  • (String) —

    Plan ID



67
# File 'lib/recurly/resources/plan.rb', line 67

define_attribute :id, String

#interval_length ⇒ Integer

Returns Length of the plan's billing interval in interval_unit.

Returns:

  • (Integer) —

    Length of the plan's billing interval in interval_unit.



71
# File 'lib/recurly/resources/plan.rb', line 71

define_attribute :interval_length, Integer

#interval_unit ⇒ String

Returns Unit for the plan's billing interval.

Returns:

  • (String) —

    Unit for the plan's billing interval.



75
# File 'lib/recurly/resources/plan.rb', line 75

define_attribute :interval_unit, String

#liability_gl_account_id ⇒ String

Returns The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

Returns:

  • (String) —

    The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.



79
# File 'lib/recurly/resources/plan.rb', line 79

define_attribute :liability_gl_account_id, String

#name ⇒ String

Returns This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.

Returns:

  • (String) —

    This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.



83
# File 'lib/recurly/resources/plan.rb', line 83

define_attribute :name, String

#object ⇒ String

Returns Object type.

Returns:

  • (String) —

    Object type



87
# File 'lib/recurly/resources/plan.rb', line 87

define_attribute :object, String

#performance_obligation_id ⇒ String

Returns The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

Returns:

  • (String) —

    The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.



91
# File 'lib/recurly/resources/plan.rb', line 91

define_attribute :performance_obligation_id, String

#pricing_model ⇒ String

Returns A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease.

Returns:

  • (String) —

    A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease.



95
# File 'lib/recurly/resources/plan.rb', line 95

define_attribute :pricing_model, String

#ramp_intervals ⇒ Array[PlanRampInterval]

Returns Ramp Intervals.

Returns:



99
# File 'lib/recurly/resources/plan.rb', line 99

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

#revenue_gl_account_id ⇒ String

Returns The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

Returns:

  • (String) —

    The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.



103
# File 'lib/recurly/resources/plan.rb', line 103

define_attribute :revenue_gl_account_id, String

#revenue_schedule_type ⇒ String

Returns Revenue schedule type.

Returns:

  • (String) —

    Revenue schedule type



107
# File 'lib/recurly/resources/plan.rb', line 107

define_attribute :revenue_schedule_type, String

#setup_fee_accounting_code ⇒ String

Returns Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code.

Returns:

  • (String) —

    Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code.



111
# File 'lib/recurly/resources/plan.rb', line 111

define_attribute :setup_fee_accounting_code, String

#setup_fee_liability_gl_account_id ⇒ String

Returns The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

Returns:

  • (String) —

    The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.



115
# File 'lib/recurly/resources/plan.rb', line 115

define_attribute :setup_fee_liability_gl_account_id, String

#setup_fee_performance_obligation_id ⇒ String

Returns The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

Returns:

  • (String) —

    The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.



119
# File 'lib/recurly/resources/plan.rb', line 119

define_attribute :setup_fee_performance_obligation_id, String

#setup_fee_revenue_gl_account_id ⇒ String

Returns The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

Returns:

  • (String) —

    The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.



123
# File 'lib/recurly/resources/plan.rb', line 123

define_attribute :setup_fee_revenue_gl_account_id, String

#setup_fee_revenue_schedule_type ⇒ String

Returns Setup fee revenue schedule type.

Returns:

  • (String) —

    Setup fee revenue schedule type



127
# File 'lib/recurly/resources/plan.rb', line 127

define_attribute :setup_fee_revenue_schedule_type, String

#setup_fees ⇒ Array[PlanSetupPricing]

Returns Setup Fees.

Returns:



131
# File 'lib/recurly/resources/plan.rb', line 131

define_attribute :setup_fees, Array, { :item_type => :PlanSetupPricing }

#state ⇒ String

Returns The current state of the plan.

Returns:

  • (String) —

    The current state of the plan.



135
# File 'lib/recurly/resources/plan.rb', line 135

define_attribute :state, String

#tax_code ⇒ String

Returns Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of unknown, physical, or digital tax codes.

Returns:

  • (String) —

    Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of unknown, physical, or digital tax codes.



139
# File 'lib/recurly/resources/plan.rb', line 139

define_attribute :tax_code, String

#tax_exempt ⇒ Boolean

Returns true exempts tax on the plan, false applies tax on the plan.

Returns:

  • (Boolean) —

    true exempts tax on the plan, false applies tax on the plan.



143
# File 'lib/recurly/resources/plan.rb', line 143

define_attribute :tax_exempt, :Boolean

#total_billing_cycles ⇒ Integer

Returns Automatically terminate subscriptions after a defined number of billing cycles. Number of billing cycles before the plan automatically stops renewing, defaults to null for continuous, automatic renewal.

Returns:

  • (Integer) —

    Automatically terminate subscriptions after a defined number of billing cycles. Number of billing cycles before the plan automatically stops renewing, defaults to null for continuous, automatic renewal.



147
# File 'lib/recurly/resources/plan.rb', line 147

define_attribute :total_billing_cycles, Integer

#trial_length ⇒ Integer

Returns Length of plan's trial period in trial_units. 0 means no trial.

Returns:

  • (Integer) —

    Length of plan's trial period in trial_units. 0 means no trial.



151
# File 'lib/recurly/resources/plan.rb', line 151

define_attribute :trial_length, Integer

#trial_requires_billing_info ⇒ Boolean

Returns Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee.

Returns:

  • (Boolean) —

    Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee.



155
# File 'lib/recurly/resources/plan.rb', line 155

define_attribute :trial_requires_billing_info, :Boolean

#trial_unit ⇒ String

Returns Units for the plan's trial period.

Returns:

  • (String) —

    Units for the plan's trial period.



159
# File 'lib/recurly/resources/plan.rb', line 159

define_attribute :trial_unit, String

#updated_at ⇒ DateTime

Returns Last updated at.

Returns:

  • (DateTime) —

    Last updated at



163
# File 'lib/recurly/resources/plan.rb', line 163

define_attribute :updated_at, DateTime

#vertex_transaction_type ⇒ String

Returns Used by Vertex for tax calculations. Possible values are sale, rental, lease.

Returns:

  • (String) —

    Used by Vertex for tax calculations. Possible values are sale, rental, lease.



167
# File 'lib/recurly/resources/plan.rb', line 167

define_attribute :vertex_transaction_type, String