module Recurly module Resources class Plan < Resource # @!attribute accounting_code # @return [String] Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code. define_attribute :accounting_code, String # @!attribute code # @return [String] Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports. define_attribute :code, String # @!attribute [r] created_at # @return [DateTime] Created at define_attribute :created_at, DateTime, {:read_only => true} # @!attribute currencies # @return [Array[String]] Pricing define_attribute :currencies, Array, {:item_type => String} # @!attribute [r] deleted_at # @return [DateTime] Deleted at define_attribute :deleted_at, DateTime, {:read_only => true} # @!attribute description # @return [String] Optional description, not displayed. define_attribute :description, String # @!attribute hosted_pages # @return [Hash] Hosted pages settings define_attribute :hosted_pages, Hash # @!attribute [r] id # @return [String] Plan ID define_attribute :id, String, {:read_only => true} # @!attribute interval_length # @return [Integer] Length of the plan's billing interval in `interval_unit`. define_attribute :interval_length, Integer # @!attribute interval_unit # @return [String] Unit for the plan's billing interval. define_attribute :interval_unit, String, {:enum => ["days", "months"]} # @!attribute name # @return [String] This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice. define_attribute :name, String # @!attribute [r] object # @return [String] Object type define_attribute :object, String, {:read_only => true} # @!attribute setup_fee_accounting_code # @return [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. define_attribute :setup_fee_accounting_code, String # @!attribute [r] state # @return [String] The current state of the plan. define_attribute :state, String, {:read_only => true, :enum => ["active", "inactive"]} # @!attribute tax_code # @return [String] Optional field for EU VAT merchants and Avalara AvaTax Pro merchants. If you are using Recurly's EU VAT feature, you can use values of 'unknown', 'physical', or 'digital'. If you have your own AvaTax account configured, you can use Avalara tax codes to assign custom tax rules. define_attribute :tax_code, String # @!attribute tax_exempt # @return [Boolean] `true` exempts tax on the plan, `false` applies tax on the plan. define_attribute :tax_exempt, :Boolean # @!attribute total_billing_cycles # @return [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. define_attribute :total_billing_cycles, Integer # @!attribute trial_length # @return [Integer] Length of plan's trial period in `trial_units`. `0` means `no trial`. define_attribute :trial_length, Integer # @!attribute trial_unit # @return [String] Units for the plan's trial period. define_attribute :trial_unit, String, {:enum => ["days", "months"]} # @!attribute [r] updated_at # @return [DateTime] Last updated at define_attribute :updated_at, DateTime, {:read_only => true} end end end