Class: Recurly::Resources::Invoice
- Inherits:
-
Recurly::Resource
- Object
- Recurly::Resource
- Recurly::Resources::Invoice
- Defined in:
- lib/recurly/resources/invoice.rb
Instance Attribute Summary collapse
-
#account ⇒ AccountMini
Account mini details.
- #address ⇒ InvoiceAddress
-
#balance ⇒ Float
The outstanding balance remaining on this invoice.
-
#billing_info_id ⇒ String
The `billing_info_id` is the value that represents a specific billing info for an end customer.
-
#business_entity_id ⇒ String
Unique ID to identify the business entity assigned to the invoice.
-
#closed_at ⇒ DateTime
Date invoice was marked paid or failed.
-
#collection_method ⇒ String
An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created.
-
#created_at ⇒ DateTime
Created at.
-
#credit_payments ⇒ Array[CreditPayment]
Credit payments.
-
#currency ⇒ String
3-letter ISO 4217 currency code.
-
#customer_notes ⇒ String
This will default to the Customer Notes text specified on the Invoice Settings.
-
#discount ⇒ Float
Total discounts applied to this invoice.
-
#due_at ⇒ DateTime
Date invoice is due.
-
#dunning_campaign_id ⇒ String
Unique ID to identify the dunning campaign used when dunning the invoice.
-
#dunning_events_sent ⇒ Integer
Number of times the event was sent.
-
#final_dunning_event ⇒ Boolean
Last communication attempt.
-
#has_more_line_items ⇒ Boolean
Identifies if the invoice has more line items than are returned in `line_items`.
-
#id ⇒ String
Invoice ID.
-
#line_items ⇒ Array[LineItem]
Line Items.
-
#net_terms ⇒ Integer
Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due.
-
#net_terms_type ⇒ String
Optionally supplied string that may be either `net` or `eom` (end-of-month).
-
#number ⇒ String
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).
-
#object ⇒ String
Object type.
-
#origin ⇒ String
The event that created the invoice.
-
#paid ⇒ Float
The total amount of successful payments transaction on this invoice.
-
#po_number ⇒ String
For manual invoicing, this identifies the PO number associated with the subscription.
-
#previous_invoice_id ⇒ String
On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from.
-
#refundable_amount ⇒ Float
The refundable amount on a charge invoice.
- #shipping_address ⇒ ShippingAddress
-
#state ⇒ String
Invoice state.
-
#subscription_ids ⇒ Array[String]
If the invoice is charging or refunding for one or more subscriptions, these are their IDs.
-
#subtotal ⇒ Float
The summation of charges and credits, before discounts and taxes.
-
#tax ⇒ Float
The total tax on this invoice.
-
#tax_info ⇒ TaxInfo
Only for merchants using Recurly's In-The-Box taxes.
-
#terms_and_conditions ⇒ String
This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin.
-
#total ⇒ Float
The final total on this invoice.
-
#transactions ⇒ Array[Transaction]
Transactions.
-
#type ⇒ String
Invoices are either charge, credit, or legacy invoices.
-
#updated_at ⇒ DateTime
Last updated at.
-
#used_tax_service ⇒ Boolean
Will be `true` when the invoice had a successful response from the tax service and `false` when the invoice was not sent to tax service due to a lack of address or enabled jurisdiction or was processed without tax due to a non-blocking error returned from the tax service.
-
#uuid ⇒ String
Invoice UUID.
-
#vat_number ⇒ String
VAT registration number for the customer on this invoice.
-
#vat_reverse_charge_notes ⇒ String
VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own.
Attributes inherited from Recurly::Resource
Method Summary
Methods inherited from Recurly::Resource
#==, #get_response, #inspect, #requires_client?, #to_json, #to_s
Methods included from Schema::SchemaFactory
Methods included from Schema::ResourceCaster
Methods included from Schema::SchemaValidator
#get_did_you_mean, #validate!, #validate_attribute!
Instance Attribute Details
#account ⇒ AccountMini
Returns Account mini details.
11 |
# File 'lib/recurly/resources/invoice.rb', line 11 define_attribute :account, :AccountMini |
#address ⇒ InvoiceAddress
15 |
# File 'lib/recurly/resources/invoice.rb', line 15 define_attribute :address, :InvoiceAddress |
#balance ⇒ Float
Returns The outstanding balance remaining on this invoice.
19 |
# File 'lib/recurly/resources/invoice.rb', line 19 define_attribute :balance, Float |
#billing_info_id ⇒ String
Returns The `billing_info_id` is the value that represents a specific billing info for an end customer. When `billing_info_id` is used to assign billing info to the subscription, all future billing events for the subscription will bill to the specified billing info. `billing_info_id` can ONLY be used for sites utilizing the Wallet feature.
23 |
# File 'lib/recurly/resources/invoice.rb', line 23 define_attribute :billing_info_id, String |
#business_entity_id ⇒ String
Returns Unique ID to identify the business entity assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled.
27 |
# File 'lib/recurly/resources/invoice.rb', line 27 define_attribute :business_entity_id, String |
#closed_at ⇒ DateTime
Returns Date invoice was marked paid or failed.
31 |
# File 'lib/recurly/resources/invoice.rb', line 31 define_attribute :closed_at, DateTime |
#collection_method ⇒ String
Returns An automatic invoice means a corresponding transaction is run using the account's billing information at the same time the invoice is created. Manual invoices are created without a corresponding transaction. The merchant must enter a manual payment transaction or have the customer pay the invoice with an automatic method, like credit card, PayPal, Amazon, or ACH bank payment.
35 |
# File 'lib/recurly/resources/invoice.rb', line 35 define_attribute :collection_method, String |
#created_at ⇒ DateTime
Returns Created at.
39 |
# File 'lib/recurly/resources/invoice.rb', line 39 define_attribute :created_at, DateTime |
#credit_payments ⇒ Array[CreditPayment]
Returns Credit payments.
43 |
# File 'lib/recurly/resources/invoice.rb', line 43 define_attribute :credit_payments, Array, { :item_type => :CreditPayment } |
#currency ⇒ String
Returns 3-letter ISO 4217 currency code.
47 |
# File 'lib/recurly/resources/invoice.rb', line 47 define_attribute :currency, String |
#customer_notes ⇒ String
Returns This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes.
51 |
# File 'lib/recurly/resources/invoice.rb', line 51 define_attribute :customer_notes, String |
#discount ⇒ Float
Returns Total discounts applied to this invoice.
55 |
# File 'lib/recurly/resources/invoice.rb', line 55 define_attribute :discount, Float |
#due_at ⇒ DateTime
Returns Date invoice is due. This is the date the net terms are reached.
59 |
# File 'lib/recurly/resources/invoice.rb', line 59 define_attribute :due_at, DateTime |
#dunning_campaign_id ⇒ String
Returns Unique ID to identify the dunning campaign used when dunning the invoice. For sites without multiple dunning campaigns enabled, this will always be the default dunning campaign.
63 |
# File 'lib/recurly/resources/invoice.rb', line 63 define_attribute :dunning_campaign_id, String |
#dunning_events_sent ⇒ Integer
Returns Number of times the event was sent.
67 |
# File 'lib/recurly/resources/invoice.rb', line 67 define_attribute :dunning_events_sent, Integer |
#final_dunning_event ⇒ Boolean
Returns Last communication attempt.
71 |
# File 'lib/recurly/resources/invoice.rb', line 71 define_attribute :final_dunning_event, :Boolean |
#has_more_line_items ⇒ Boolean
Returns Identifies if the invoice has more line items than are returned in `line_items`. If `has_more_line_items` is `true`, then a request needs to be made to the `list_invoice_line_items` endpoint.
75 |
# File 'lib/recurly/resources/invoice.rb', line 75 define_attribute :has_more_line_items, :Boolean |
#id ⇒ String
Returns Invoice ID.
79 |
# File 'lib/recurly/resources/invoice.rb', line 79 define_attribute :id, String |
#line_items ⇒ Array[LineItem]
Returns Line Items.
83 |
# File 'lib/recurly/resources/invoice.rb', line 83 define_attribute :line_items, Array, { :item_type => :LineItem } |
#net_terms ⇒ Integer
Returns Integer paired with `Net Terms Type` and representing the number of days past the current date (for `net` Net Terms Type) or days after the last day of the current month (for `eom` Net Terms Type) that the invoice will become past due. For `manual` collection method, an additional 24 hours is added to ensure the customer has the entire last day to make payment before becoming past due. For example: If an invoice is due `net 0`, it is due 'On Receipt' and will become past due 24 hours after it's created. If an invoice is due `net 30`, it will become past due at 31 days exactly. If an invoice is due `eom 30`, it will become past due 31 days from the last day of the current month. For `automatic` collection method, the additional 24 hours is not added. For example, On-Receipt is due immediately, and `net 30` will become due exactly 30 days from invoice generation, at which point Recurly will attempt collection. When `eom` Net Terms Type is passed, the value for `Net Terms` is restricted to `0, 15, 30, 45, 60, or 90`. For more information on how net terms work with `manual` collection visit our docs page (docs.recurly.com/docs/manual-payments#section-collection-terms) or visit (docs.recurly.com/docs/automatic-invoicing-terms#section-collection-terms) for information about net terms using `automatic` collection.
87 |
# File 'lib/recurly/resources/invoice.rb', line 87 define_attribute :net_terms, Integer |
#net_terms_type ⇒ String
Returns Optionally supplied string that may be either `net` or `eom` (end-of-month). When `net`, an invoice becomes past due the specified number of `Net Terms` days from the current date. When `eom` an invoice becomes past due the specified number of `Net Terms` days from the last day of the current month.
91 |
# File 'lib/recurly/resources/invoice.rb', line 91 define_attribute :net_terms_type, String |
#number ⇒ String
Returns 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.
95 |
# File 'lib/recurly/resources/invoice.rb', line 95 define_attribute :number, String |
#object ⇒ String
Returns Object type.
99 |
# File 'lib/recurly/resources/invoice.rb', line 99 define_attribute :object, String |
#origin ⇒ String
Returns The event that created the invoice.
103 |
# File 'lib/recurly/resources/invoice.rb', line 103 define_attribute :origin, String |
#paid ⇒ Float
Returns The total amount of successful payments transaction on this invoice.
107 |
# File 'lib/recurly/resources/invoice.rb', line 107 define_attribute :paid, Float |
#po_number ⇒ String
Returns For manual invoicing, this identifies the PO number associated with the subscription.
111 |
# File 'lib/recurly/resources/invoice.rb', line 111 define_attribute :po_number, String |
#previous_invoice_id ⇒ String
Returns On refund invoices, this value will exist and show the invoice ID of the purchase invoice the refund was created from. This field is only populated for sites without the [Only Bill What Changed](docs.recurly.com/docs/only-bill-what-changed) feature enabled. Sites with Only Bill What Changed enabled should use the [related_invoices endpoint](recurly.com/developers/api/v2021-02-25/index.html#operation/list_related_invoices) to see purchase invoices refunded by this invoice.
115 |
# File 'lib/recurly/resources/invoice.rb', line 115 define_attribute :previous_invoice_id, String |
#refundable_amount ⇒ Float
Returns The refundable amount on a charge invoice. It will be null for all other invoices.
119 |
# File 'lib/recurly/resources/invoice.rb', line 119 define_attribute :refundable_amount, Float |
#shipping_address ⇒ ShippingAddress
123 |
# File 'lib/recurly/resources/invoice.rb', line 123 define_attribute :shipping_address, :ShippingAddress |
#state ⇒ String
Returns Invoice state.
127 |
# File 'lib/recurly/resources/invoice.rb', line 127 define_attribute :state, String |
#subscription_ids ⇒ Array[String]
Returns If the invoice is charging or refunding for one or more subscriptions, these are their IDs.
131 |
# File 'lib/recurly/resources/invoice.rb', line 131 define_attribute :subscription_ids, Array, { :item_type => String } |
#subtotal ⇒ Float
Returns The summation of charges and credits, before discounts and taxes.
135 |
# File 'lib/recurly/resources/invoice.rb', line 135 define_attribute :subtotal, Float |
#tax ⇒ Float
Returns The total tax on this invoice.
139 |
# File 'lib/recurly/resources/invoice.rb', line 139 define_attribute :tax, Float |
#tax_info ⇒ TaxInfo
Returns Only for merchants using Recurly's In-The-Box taxes.
143 |
# File 'lib/recurly/resources/invoice.rb', line 143 define_attribute :tax_info, :TaxInfo |
#terms_and_conditions ⇒ String
Returns This will default to the Terms and Conditions text specified on the Invoice Settings page in your Recurly admin. Specify custom notes to add or override Terms and Conditions.
147 |
# File 'lib/recurly/resources/invoice.rb', line 147 define_attribute :terms_and_conditions, String |
#total ⇒ Float
Returns The final total on this invoice. The summation of invoice charges, discounts, credits, and tax.
151 |
# File 'lib/recurly/resources/invoice.rb', line 151 define_attribute :total, Float |
#transactions ⇒ Array[Transaction]
Returns Transactions.
155 |
# File 'lib/recurly/resources/invoice.rb', line 155 define_attribute :transactions, Array, { :item_type => :Transaction } |
#type ⇒ String
Returns Invoices are either charge, credit, or legacy invoices.
159 |
# File 'lib/recurly/resources/invoice.rb', line 159 define_attribute :type, String |
#updated_at ⇒ DateTime
Returns Last updated at.
163 |
# File 'lib/recurly/resources/invoice.rb', line 163 define_attribute :updated_at, DateTime |
#used_tax_service ⇒ Boolean
Returns Will be `true` when the invoice had a successful response from the tax service and `false` when the invoice was not sent to tax service due to a lack of address or enabled jurisdiction or was processed without tax due to a non-blocking error returned from the tax service.
167 |
# File 'lib/recurly/resources/invoice.rb', line 167 define_attribute :used_tax_service, :Boolean |
#uuid ⇒ String
Returns Invoice UUID.
171 |
# File 'lib/recurly/resources/invoice.rb', line 171 define_attribute :uuid, String |
#vat_number ⇒ String
Returns VAT registration number for the customer on this invoice. This will come from the VAT Number field in the Billing Info or the Account Info depending on your tax settings and the invoice collection method.
175 |
# File 'lib/recurly/resources/invoice.rb', line 175 define_attribute :vat_number, String |
#vat_reverse_charge_notes ⇒ String
Returns VAT Reverse Charge Notes only appear if you have EU VAT enabled or are using your own Avalara AvaTax account and the customer is in the EU, has a VAT number, and is in a different country than your own. This will default to the VAT Reverse Charge Notes text specified on the Tax Settings page in your Recurly admin, unless custom notes were created with the original subscription.
179 |
# File 'lib/recurly/resources/invoice.rb', line 179 define_attribute :vat_reverse_charge_notes, String |