lib/recurly/resources/line_item.rb in recurly-3.0.0.beta.4 vs lib/recurly/resources/line_item.rb in recurly-3.0.0.beta.5

- old
+ new

@@ -34,11 +34,11 @@ # @return [Float] The amount of credit from this line item that was applied to the invoice. define_attribute :credit_applied, Float # @!attribute credit_reason_code # @return [String] The reason the credit was given when line item is `type=credit`. - define_attribute :credit_reason_code, String, { :enum => ["general", "service", "promotional", "refund", "gift_card", "write_off"] } + define_attribute :credit_reason_code, String # @!attribute currency # @return [String] 3-letter ISO 4217 currency code. define_attribute :currency, String @@ -66,19 +66,19 @@ # @return [String] Once the line item has been invoiced this will be the invoice's number. If VAT taxation and the Country Invoice Sequencing feature are enabled, invoices will have country-specific invoice numbers for invoices billed to EU countries (ex: FR1001). Non-EU invoices will continue to use the site-level invoice number sequence. define_attribute :invoice_number, String # @!attribute legacy_category # @return [String] Category to describe the role of a line item on a legacy invoice: - "charges" refers to charges being billed for on this invoice. - "credits" refers to refund or proration credits. This portion of the invoice can be considered a credit memo. - "applied_credits" refers to previous credits applied to this invoice. See their original_line_item_id to determine where the credit first originated. - "carryforwards" can be ignored. They exist to consume any remaining credit balance. A new credit with the same amount will be created and placed back on the account. - define_attribute :legacy_category, String, { :enum => ["charge", "credit", "applied_credit", "carryforward"] } + define_attribute :legacy_category, String # @!attribute object # @return [String] Object type define_attribute :object, String # @!attribute origin # @return [String] A credit created from an original charge will have the value of the charge's origin. - define_attribute :origin, String, { :enum => ["plan", "plan_trial", "setup_fee", "add_on_trial", "add_on", "debit", "one_time", "credit", "coupon", "carryforward"] } + define_attribute :origin, String # @!attribute original_line_item_invoice_id # @return [String] The invoice where the credit originated. Will only have a value if the line item is a credit created from a previous credit, or if the credit was created from a charge refund. define_attribute :original_line_item_invoice_id, String @@ -122,11 +122,11 @@ # @return [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. define_attribute :start_date, DateTime # @!attribute state # @return [String] Pending line items are charges or credits on an account that have not been applied to an invoice yet. Invoiced line items will always have an `invoice_id` value. - define_attribute :state, String, { :enum => ["pending", "invoiced"] } + define_attribute :state, String # @!attribute subscription_id # @return [String] If the line item is a charge or credit for a subscription, this is its ID. define_attribute :subscription_id, String @@ -137,11 +137,11 @@ # @!attribute tax # @return [Float] The tax amount for the line item. define_attribute :tax, Float # @!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. + # @return [String] Used by Avalara, Vertex, and Recurly’s EU VAT tax feature. The tax code values are specific to each tax system. If you are using Recurly’s EU VAT feature `P0000000` is `physical`, `D0000000` is `digital`, and an empty string is `unknown`. define_attribute :tax_code, String # @!attribute tax_exempt # @return [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. define_attribute :tax_exempt, :Boolean @@ -154,10 +154,10 @@ # @return [Boolean] `true` if the line item is taxable, `false` if it is not. define_attribute :taxable, :Boolean # @!attribute type # @return [String] Charges are positive line items that debit the account. Credits are negative line items that credit the account. - define_attribute :type, String, { :enum => ["charge", "credit"] } + define_attribute :type, String # @!attribute unit_amount # @return [Float] Positive amount for a charge, negative amount for a credit. define_attribute :unit_amount, Float