Class: Recurly::Requests::AddOnCreate

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

#accounting_codeString

Returns Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on’s code. If item_code/item_id is part of the request then accounting_code must be absent.

Returns:

  • (String)

    Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on’s code. If item_code/item_id is part of the request then accounting_code must be absent.



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

define_attribute :accounting_code, String

#add_on_typeString

Returns Whether the add-on type is fixed, or usage-based.

Returns:

  • (String)

    Whether the add-on type is fixed, or usage-based.



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

define_attribute :add_on_type, String

#avalara_service_typeInteger

Returns Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an Item is associated to the AddOn, then the avalara_service_type must be absent.

Returns:



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

define_attribute :avalara_service_type, Integer

#avalara_transaction_typeInteger

Returns Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to [the documentation](help.avalara.com/AvaTax_for_Communications/Tax_Calculation/AvaTax_for_Communications_Tax_Engine/Mapping_Resources/TM_00115_AFC_Modules_Corresponding_Transaction_Types) for more available t/s types. If an Item is associated to the AddOn, then the avalara_transaction_type must be absent.

Returns:



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

define_attribute :avalara_transaction_type, Integer

#codeString

Returns The unique identifier for the add-on within its plan. If item_code/item_id is part of the request then code must be absent. If item_code/item_id is not present code is required.

Returns:

  • (String)

    The unique identifier for the add-on within its plan. If item_code/item_id is part of the request then code must be absent. If item_code/item_id is not present code is required.



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

define_attribute :code, String

#currenciesArray[AddOnPricing]

Returns * If item_code/item_id is part of the request and the item has a default currency, then currencies is optional. If the item does not have a default currency, then currencies is required. If item_code/item_id is not present currencies is required. * If the add-on’s tier_type is tiered, volume, or stairstep, then currencies must be absent. * Must be absent if add_on_type is usage and usage_type is percentage.

Returns:

  • (Array[AddOnPricing])
    • If item_code/item_id is part of the request and the item has a default currency, then currencies is optional. If the item does not have a default currency, then currencies is required. If item_code/item_id is not present currencies is required. * If the add-on’s tier_type is tiered, volume, or stairstep, then currencies must be absent. * Must be absent if add_on_type is usage and usage_type is percentage.



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

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

#default_quantityInteger

Returns Default quantity for the hosted pages.

Returns:

  • (Integer)

    Default quantity for the hosted pages.



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

define_attribute :default_quantity, Integer

#display_quantityBoolean

Returns Determines if the quantity field is displayed on the hosted pages for the add-on.

Returns:

  • (Boolean)

    Determines if the quantity field is displayed on the hosted pages for the add-on.



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

define_attribute :display_quantity, :Boolean

#harmonized_system_codeString

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.



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

define_attribute :harmonized_system_code, String

#item_codeString

Returns Unique code to identify an item. Available when the ‘Credit Invoices` feature is enabled. If item_id and item_code are both present, item_id will be used.

Returns:

  • (String)

    Unique code to identify an item. Available when the ‘Credit Invoices` feature is enabled. If item_id and item_code are both present, item_id will be used.



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

define_attribute :item_code, String

#item_idString

Returns System-generated unique identifier for an item. Available when the ‘Credit Invoices` feature is enabled. If item_id and item_code are both present, item_id will be used.

Returns:

  • (String)

    System-generated unique identifier for an item. Available when the ‘Credit Invoices` feature is enabled. If item_id and item_code are both present, item_id will be used.



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

define_attribute :item_id, String

#liability_gl_account_idString

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.



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

define_attribute :liability_gl_account_id, String

#measured_unit_idString

Returns System-generated unique identifier for a measured unit to be associated with the add-on. Either measured_unit_id or measured_unit_name are required when add_on_type is usage. If measured_unit_id and measured_unit_name are both present, measured_unit_id will be used.

Returns:

  • (String)

    System-generated unique identifier for a measured unit to be associated with the add-on. Either measured_unit_id or measured_unit_name are required when add_on_type is usage. If measured_unit_id and measured_unit_name are both present, measured_unit_id will be used.



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

define_attribute :measured_unit_id, String

#measured_unit_nameString

Returns Name of a measured unit to be associated with the add-on. Either measured_unit_id or measured_unit_name are required when add_on_type is usage. If measured_unit_id and measured_unit_name are both present, measured_unit_id will be used.

Returns:

  • (String)

    Name of a measured unit to be associated with the add-on. Either measured_unit_id or measured_unit_name are required when add_on_type is usage. If measured_unit_id and measured_unit_name are both present, measured_unit_id will be used.



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

define_attribute :measured_unit_name, String

#nameString

Returns Describes your add-on and will appear in subscribers’ invoices. If item_code/item_id is part of the request then name must be absent. If item_code/item_id is not present name is required.

Returns:

  • (String)

    Describes your add-on and will appear in subscribers’ invoices. If item_code/item_id is part of the request then name must be absent. If item_code/item_id is not present name is required.



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

define_attribute :name, String

#optionalBoolean

Returns Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.

Returns:

  • (Boolean)

    Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.



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

define_attribute :optional, :Boolean

#percentage_tiersArray[PercentageTiersByCurrency]

Returns Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be volume or tiered, if not, it must be absent. There must be one tier without an ending_amount value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support.

Returns:

  • (Array[PercentageTiersByCurrency])

    Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be volume or tiered, if not, it must be absent. There must be one tier without an ending_amount value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support.



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

define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency }

#performance_obligation_idString

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.



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

define_attribute :performance_obligation_id, String

#plan_idString

Returns Plan ID.

Returns:

  • (String)

    Plan ID



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

define_attribute :plan_id, String

#revenue_gl_account_idString

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.



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

define_attribute :revenue_gl_account_id, String

#revenue_schedule_typeString

Returns When this add-on is invoiced, the line item will use this revenue schedule. If item_code/item_id is part of the request then revenue_schedule_type must be absent in the request as the value will be set from the item.

Returns:

  • (String)

    When this add-on is invoiced, the line item will use this revenue schedule. If item_code/item_id is part of the request then revenue_schedule_type must be absent in the request as the value will be set from the item.



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

define_attribute :revenue_schedule_type, String

#tax_codeString

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. If item_code/item_id is part of the request then tax_code must be absent.

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. If item_code/item_id is part of the request then tax_code must be absent.



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

define_attribute :tax_code, String

#tier_typeString

Returns The pricing model for the add-on. For more information, [click here](docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](recurly.com/developers/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.

Returns:



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

define_attribute :tier_type, String

#tiersArray[Tier]

Returns If the tier_type is flat, then tiers must be absent. The tiers object must include one to many tiers with ending_quantity and unit_amount for the desired currencies. There must be one tier without an ending_quantity value which represents the final tier.

Returns:

  • (Array[Tier])

    If the tier_type is flat, then tiers must be absent. The tiers object must include one to many tiers with ending_quantity and unit_amount for the desired currencies. There must be one tier without an ending_quantity value which represents the final tier.



103
# File 'lib/recurly/requests/add_on_create.rb', line 103

define_attribute :tiers, Array, { :item_type => :Tier }

#usage_calculation_typeString

Returns The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.

Returns:

  • (String)

    The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.



107
# File 'lib/recurly/requests/add_on_create.rb', line 107

define_attribute :usage_calculation_type, String

#usage_percentageFloat

Returns The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage, tier_type is flat and usage_type is percentage. Must be omitted otherwise.

Returns:

  • (Float)

    The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if add_on_type is usage, tier_type is flat and usage_type is percentage. Must be omitted otherwise.



111
# File 'lib/recurly/requests/add_on_create.rb', line 111

define_attribute :usage_percentage, Float

#usage_timeframeString

Returns The time at which usage totals are reset for billing purposes. Allows for tiered add-ons to accumulate usage over the course of multiple billing periods.

Returns:

  • (String)

    The time at which usage totals are reset for billing purposes. Allows for tiered add-ons to accumulate usage over the course of multiple billing periods.



115
# File 'lib/recurly/requests/add_on_create.rb', line 115

define_attribute :usage_timeframe, String

#usage_typeString

Returns Type of usage, required if add_on_type is usage. See our [Guide](recurly.com/developers/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons.

Returns:



119
# File 'lib/recurly/requests/add_on_create.rb', line 119

define_attribute :usage_type, String