Class: Recurly::Resources::Invoice

Inherits:
Recurly::Resource show all
Defined in:
lib/recurly/resources/invoice.rb

Instance Attribute Summary collapse

Attributes inherited from Recurly::Resource

#attributes

Method Summary

Methods inherited from Recurly::Resource

#==, #get_response, #inspect, #requires_client?, #to_json, #to_s

Methods included from Schema::SchemaFactory

#schema

Methods included from Schema::ResourceCaster

#cast

Methods included from Schema::SchemaValidator

#get_did_you_mean, #validate!, #validate_attribute!

Instance Attribute Details

#accountAccountMini

Returns Account mini details.

Returns:



11
# File 'lib/recurly/resources/invoice.rb', line 11

define_attribute :account, :AccountMini

#addressInvoiceAddress

Returns:



15
# File 'lib/recurly/resources/invoice.rb', line 15

define_attribute :address, :InvoiceAddress

#balanceFloat

Returns The outstanding balance remaining on this invoice.

Returns:

  • (Float)

    The outstanding balance remaining on this invoice.



19
# File 'lib/recurly/resources/invoice.rb', line 19

define_attribute :balance, Float

#billing_info_idString

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.

Returns:

  • (String)

    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_idString

Returns Unique ID to identify the business entity assigned to the invoice. Available when the `Multiple Business Entities` feature is enabled.

Returns:

  • (String)

    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_atDateTime

Returns Date invoice was marked paid or failed.

Returns:

  • (DateTime)

    Date invoice was marked paid or failed.



31
# File 'lib/recurly/resources/invoice.rb', line 31

define_attribute :closed_at, DateTime

#collection_methodString

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.

Returns:

  • (String)

    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_atDateTime

Returns Created at.

Returns:

  • (DateTime)

    Created at



39
# File 'lib/recurly/resources/invoice.rb', line 39

define_attribute :created_at, DateTime

#credit_paymentsArray[CreditPayment]

Returns Credit payments.

Returns:



43
# File 'lib/recurly/resources/invoice.rb', line 43

define_attribute :credit_payments, Array, { :item_type => :CreditPayment }

#currencyString

Returns 3-letter ISO 4217 currency code.

Returns:

  • (String)

    3-letter ISO 4217 currency code.



47
# File 'lib/recurly/resources/invoice.rb', line 47

define_attribute :currency, String

#customer_notesString

Returns This will default to the Customer Notes text specified on the Invoice Settings. Specify custom notes to add or override Customer Notes.

Returns:

  • (String)

    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

#discountFloat

Returns Total discounts applied to this invoice.

Returns:

  • (Float)

    Total discounts applied to this invoice.



55
# File 'lib/recurly/resources/invoice.rb', line 55

define_attribute :discount, Float

#due_atDateTime

Returns Date invoice is due. This is the date the net terms are reached.

Returns:

  • (DateTime)

    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_idString

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.

Returns:

  • (String)

    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_sentInteger

Returns Number of times the event was sent.

Returns:

  • (Integer)

    Number of times the event was sent.



67
# File 'lib/recurly/resources/invoice.rb', line 67

define_attribute :dunning_events_sent, Integer

#final_dunning_eventBoolean

Returns Last communication attempt.

Returns:

  • (Boolean)

    Last communication attempt.



71
# File 'lib/recurly/resources/invoice.rb', line 71

define_attribute :final_dunning_event, :Boolean

#has_more_line_itemsBoolean

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.

Returns:

  • (Boolean)

    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

#idString

Returns Invoice ID.

Returns:

  • (String)

    Invoice ID



79
# File 'lib/recurly/resources/invoice.rb', line 79

define_attribute :id, String

#line_itemsArray[LineItem]

Returns Line Items.

Returns:



83
# File 'lib/recurly/resources/invoice.rb', line 83

define_attribute :line_items, Array, { :item_type => :LineItem }

#net_termsInteger

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.

Returns:

  • (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. 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_typeString

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.

Returns:

  • (String)

    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

#numberString

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.

Returns:

  • (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). 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

#objectString

Returns Object type.

Returns:

  • (String)

    Object type



99
# File 'lib/recurly/resources/invoice.rb', line 99

define_attribute :object, String

#originString

Returns The event that created the invoice.

Returns:

  • (String)

    The event that created the invoice.



103
# File 'lib/recurly/resources/invoice.rb', line 103

define_attribute :origin, String

Returns The total amount of successful payments transaction on this invoice.

Returns:

  • (Float)

    The total amount of successful payments transaction on this invoice.



107
# File 'lib/recurly/resources/invoice.rb', line 107

define_attribute :paid, Float

#po_numberString

Returns For manual invoicing, this identifies the PO number associated with the subscription.

Returns:

  • (String)

    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_idString

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.

Returns:



115
# File 'lib/recurly/resources/invoice.rb', line 115

define_attribute :previous_invoice_id, String

#refundable_amountFloat

Returns The refundable amount on a charge invoice. It will be null for all other invoices.

Returns:

  • (Float)

    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_addressShippingAddress

Returns:



123
# File 'lib/recurly/resources/invoice.rb', line 123

define_attribute :shipping_address, :ShippingAddress

#stateString

Returns Invoice state.

Returns:

  • (String)

    Invoice state



127
# File 'lib/recurly/resources/invoice.rb', line 127

define_attribute :state, String

#subscription_idsArray[String]

Returns If the invoice is charging or refunding for one or more subscriptions, these are their IDs.

Returns:

  • (Array[String])

    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 }

#subtotalFloat

Returns The summation of charges and credits, before discounts and taxes.

Returns:

  • (Float)

    The summation of charges and credits, before discounts and taxes.



135
# File 'lib/recurly/resources/invoice.rb', line 135

define_attribute :subtotal, Float

#taxFloat

Returns The total tax on this invoice.

Returns:

  • (Float)

    The total tax on this invoice.



139
# File 'lib/recurly/resources/invoice.rb', line 139

define_attribute :tax, Float

#tax_infoTaxInfo

Returns Only for merchants using Recurly's In-The-Box taxes.

Returns:

  • (TaxInfo)

    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_conditionsString

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.

Returns:

  • (String)

    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

#totalFloat

Returns The final total on this invoice. The summation of invoice charges, discounts, credits, and tax.

Returns:

  • (Float)

    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

#transactionsArray[Transaction]

Returns Transactions.

Returns:



155
# File 'lib/recurly/resources/invoice.rb', line 155

define_attribute :transactions, Array, { :item_type => :Transaction }

#typeString

Returns Invoices are either charge, credit, or legacy invoices.

Returns:

  • (String)

    Invoices are either charge, credit, or legacy invoices.



159
# File 'lib/recurly/resources/invoice.rb', line 159

define_attribute :type, String

#updated_atDateTime

Returns Last updated at.

Returns:

  • (DateTime)

    Last updated at



163
# File 'lib/recurly/resources/invoice.rb', line 163

define_attribute :updated_at, DateTime

#used_tax_serviceBoolean

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.

Returns:

  • (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.



167
# File 'lib/recurly/resources/invoice.rb', line 167

define_attribute :used_tax_service, :Boolean

#uuidString

Returns Invoice UUID.

Returns:

  • (String)

    Invoice UUID



171
# File 'lib/recurly/resources/invoice.rb', line 171

define_attribute :uuid, String

#vat_numberString

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.

Returns:

  • (String)

    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_notesString

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.

Returns:

  • (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. 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