Class: Recurly::Requests::LineItemCreate

Inherits:
Recurly::Request show all
Defined in:
lib/recurly/requests/line_item_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 the LineItem. If item_code/item_id is part of the request then accounting_code must be absent.

Returns:

  • (String)

    Accounting Code for the LineItem. If item_code/item_id is part of the request then accounting_code must be absent.



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

define_attribute :accounting_code, String

#avalara_service_typeInteger

Returns Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the line item 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 LineItem, then the avalara_service_type must be absent.

Returns:



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

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 line item 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 LineItem, then the avalara_transaction_type must be absent.

Returns:



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

define_attribute :avalara_transaction_type, Integer

#credit_reason_codeString

Returns The reason the credit was given when line item is ‘type=credit`. When the Credit Invoices feature is enabled, the value can be set and will default to general. When the Credit Invoices feature is not enabled, the value will always be null.

Returns:

  • (String)

    The reason the credit was given when line item is ‘type=credit`. When the Credit Invoices feature is enabled, the value can be set and will default to general. When the Credit Invoices feature is not enabled, the value will always be null.



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

define_attribute :credit_reason_code, String

#currencyString

Returns 3-letter ISO 4217 currency code. If item_code/item_id is part of the request then currency is optional, if the site has a single default currency. currency is required if item_code/item_id is present, and there are multiple currencies defined on the site. If item_code/item_id is not present currency is required.

Returns:

  • (String)

    3-letter ISO 4217 currency code. If item_code/item_id is part of the request then currency is optional, if the site has a single default currency. currency is required if item_code/item_id is present, and there are multiple currencies defined on the site. If item_code/item_id is not present currency is required.



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

define_attribute :currency, 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.



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

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

#descriptionString

Returns Description that appears on the invoice. If item_code/item_id is part of the request then description must be absent.

Returns:

  • (String)

    Description that appears on the invoice. If item_code/item_id is part of the request then description must be absent.



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

define_attribute :description, String

#destination_tax_address_sourceString

Returns The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of “destination” refers to the “Customer tax address”. A value of “origin” refers to the “Business entity tax address”.

Returns:

  • (String)

    The source of the address that will be used as the destinaion in determining taxes. Available only when the site is on an Elite plan. A value of “destination” refers to the “Customer tax address”. A value of “origin” refers to the “Business entity tax address”.



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

define_attribute :destination_tax_address_source, String

#end_dateDateTime

Returns If this date is provided, it indicates the end of a time range.

Returns:

  • (DateTime)

    If this date is provided, it indicates the end of a time range.



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

define_attribute :end_date, DateTime

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

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



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

define_attribute :harmonized_system_code, String

#item_codeString

Returns Unique code to identify an item. Available when the Credit Invoices feature is enabled.

Returns:

  • (String)

    Unique code to identify an item. Available when the Credit Invoices feature is enabled.



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

define_attribute :item_code, String

#item_idString

Returns System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.

Returns:

  • (String)

    System-generated unique identifier for an item. Available when the Credit Invoices feature is enabled.



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

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.



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

define_attribute :liability_gl_account_id, String

#originString

Returns Origin external_gift_card is allowed if the Gift Cards feature is enabled on your site, type is credit and tax_exempt is true if you are using taxes. Set this value in order to track gift card credits from external gift cards (like InComm). It also skips billing information requirements. Origin prepayment is only allowed if type is charge and tax_exempt is left blank or set to true. This origin creates a charge and opposite credit on the account to be used for future invoices.

Returns:

  • (String)

    Origin external_gift_card is allowed if the Gift Cards feature is enabled on your site, type is credit and tax_exempt is true if you are using taxes. Set this value in order to track gift card credits from external gift cards (like InComm). It also skips billing information requirements. Origin prepayment is only allowed if type is charge and tax_exempt is left blank or set to true. This origin creates a charge and opposite credit on the account to be used for future invoices.



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

define_attribute :origin, String

#origin_tax_address_sourceString

Returns The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of “origin” refers to the “Business entity tax address”. A value of “destination” refers to the “Customer tax address”.

Returns:

  • (String)

    The source of the address that will be used as the origin in determining taxes. Available only when the site is on an Elite plan. A value of “origin” refers to the “Business entity tax address”. A value of “destination” refers to the “Customer tax address”.



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

define_attribute :origin_tax_address_source, String

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



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

define_attribute :performance_obligation_id, String

#product_codeString

Returns Optional field to track a product code or SKU for the line item. This can be used to later reporting on product purchases. For Vertex tax calculations, this field will be used as the Vertex product field. If item_code/item_id is part of the request then product_code must be absent.

Returns:

  • (String)

    Optional field to track a product code or SKU for the line item. This can be used to later reporting on product purchases. For Vertex tax calculations, this field will be used as the Vertex product field. If item_code/item_id is part of the request then product_code must be absent.



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

define_attribute :product_code, String

#quantityInteger

Returns This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.

Returns:

  • (Integer)

    This number will be multiplied by the unit amount to compute the subtotal before any discounts or taxes.



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

define_attribute :quantity, Integer

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



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

define_attribute :revenue_gl_account_id, String

#revenue_schedule_typeString

Returns Revenue schedule type.

Returns:

  • (String)

    Revenue schedule type



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

define_attribute :revenue_schedule_type, String

#start_dateDateTime

Returns If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date. Defaults to the current date-time.

Returns:

  • (DateTime)

    If an end date is present, this is value indicates the beginning of a billing time range. If no end date is present it indicates billing for a specific date. Defaults to the current date-time.



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

define_attribute :start_date, DateTime

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

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.



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

define_attribute :tax_code, String

#tax_exemptBoolean

Returns true exempts tax on charges, false applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.

Returns:

  • (Boolean)

    true exempts tax on charges, false applies tax on charges. If not defined, then defaults to the Plan and Site settings. This attribute does not work for credits (negative line items). Credits are always applied post-tax. Pre-tax discounts should use the Coupons feature.



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

define_attribute :tax_exempt, :Boolean

#tax_inclusiveBoolean

Returns Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.

Returns:

  • (Boolean)

    Determines whether or not tax is included in the unit amount. The Tax Inclusive Pricing feature (separate from the Mixed Tax Pricing feature) must be enabled to use this flag.



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

define_attribute :tax_inclusive, :Boolean

#typeString

Returns Line item type. If item_code/item_id is present then type should not be present. If item_code/item_id is not present then type is required.

Returns:

  • (String)

    Line item type. If item_code/item_id is present then type should not be present. If item_code/item_id is not present then type is required.



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

define_attribute :type, String

#unit_amountFloat

Returns A positive or negative amount with ‘type=charge` will result in a positive unit_amount. A positive or negative amount with `type=credit` will result in a negative unit_amount. If item_code/item_id is present, unit_amount can be passed in, to override the Item’s unit_amount. If item_code/item_id is not present then unit_amount is required.

Returns:

  • (Float)

    A positive or negative amount with ‘type=charge` will result in a positive unit_amount. A positive or negative amount with `type=credit` will result in a negative unit_amount. If item_code/item_id is present, unit_amount can be passed in, to override the Item’s unit_amount. If item_code/item_id is not present then unit_amount is required.



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

define_attribute :unit_amount, Float

#vertex_transaction_typeString

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.



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

define_attribute :vertex_transaction_type, String