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

#account ⇒ AccountMini

Returns Account mini details.

Returns:



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

define_attribute :account, :AccountMini

#address ⇒ InvoiceAddress

Returns:



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

define_attribute :address, :InvoiceAddress

#balance ⇒ Float

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

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

#closed_at ⇒ DateTime

Returns Date invoice was marked paid or failed.

Returns:

  • (DateTime) —

    Date invoice was marked paid or failed.



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

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.

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.



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

define_attribute :collection_method, String

#created_at ⇒ DateTime

Returns Created at.

Returns:

  • (DateTime) —

    Created at



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

define_attribute :created_at, DateTime

#credit_payments ⇒ Array[CreditPayment]

Returns Credit payments.

Returns:



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

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

#currency ⇒ String

Returns 3-letter ISO 4217 currency code.

Returns:

  • (String) —

    3-letter ISO 4217 currency code.



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

define_attribute :currency, String

#custom_fields ⇒ Array[CustomField]

Returns A list of custom fields that were on the account at the time of invoice creation and were marked to be displayed on invoices. Read-only; cannot be set directly on the invoice.

Returns:

  • (Array[CustomField]) —

    A list of custom fields that were on the account at the time of invoice creation and were marked to be displayed on invoices. Read-only; cannot be set directly on the invoice.



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

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

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

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

#discount ⇒ Float

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_at ⇒ DateTime

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

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

#id ⇒ String

Returns Invoice ID.

Returns:

  • (String) —

    Invoice ID



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

define_attribute :id, String

#line_items ⇒ LineItemList

Returns:



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

define_attribute :line_items, :LineItemList

#net_terms ⇒ Integer

Returns Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '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.

Returns:

  • (Integer) —

    Integer representing the number of days after an invoice's creation that the invoice will become past due. If an invoice's net terms are set to '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.



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

define_attribute :net_terms, Integer

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

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.



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

define_attribute :number, String

#object ⇒ String

Returns Object type.

Returns:

  • (String) —

    Object type



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

define_attribute :object, String

#origin ⇒ String

Returns The event that created the invoice.

Returns:

  • (String) —

    The event that created the invoice.



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

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.



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

define_attribute :paid, Float

#po_number ⇒ String

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.



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

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 feature enabled. Sites with Only Bill What Changed enabled should use the related_invoices endpoint to see purchase invoices refunded by this invoice.

Returns:

  • (String) —

    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 feature enabled. Sites with Only Bill What Changed enabled should use the related_invoices endpoint to see purchase invoices refunded by this invoice.



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

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.

Returns:

  • (Float) —

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



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

define_attribute :refundable_amount, Float

#shipping_address ⇒ ShippingAddress

Returns:



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

define_attribute :shipping_address, :ShippingAddress

#state ⇒ String

Returns Invoice state.

Returns:

  • (String) —

    Invoice state



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

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.

Returns:

  • (Array[String]) —

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



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

define_attribute :subscription_ids, Array, { :item_type => String }

#subtotal ⇒ Float

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

Returns:

  • (Float) —

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



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

define_attribute :subtotal, Float

#subtotal_after_discount ⇒ Float

Returns The summation of charges and credits, after discounts applied.

Returns:

  • (Float) —

    The summation of charges and credits, after discounts applied.



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

define_attribute :subtotal_after_discount, Float

#tax ⇒ Float

Returns The total tax on this invoice.

Returns:

  • (Float) —

    The total tax on this invoice.



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

define_attribute :tax, Float

#tax_info ⇒ TaxInfo

Returns Tax info.

Returns:



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

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.

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.



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

define_attribute :terms_and_conditions, String

#total ⇒ Float

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.



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

define_attribute :total, Float

#transactions ⇒ Array[Transaction]

Returns Transactions.

Returns:



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

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

#type ⇒ String

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

Returns:

  • (String) —

    Invoices are either charge, credit, or legacy invoices.



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

define_attribute :type, String

#updated_at ⇒ DateTime

Returns Last updated at.

Returns:

  • (DateTime) —

    Last updated at



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

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.

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.



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

define_attribute :used_tax_service, :Boolean

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

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.



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

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.

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.



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

define_attribute :vat_reverse_charge_notes, String