Class: ModernTreasury::Models::Invoice
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ModernTreasury::Models::Invoice
- Defined in:
- lib/modern_treasury/models/invoice.rb
Overview
Defined Under Namespace
Modules: PaymentMethod, PaymentType, Status Classes: CounterpartyBillingAddress, CounterpartyShippingAddress, InvoicerAddress
Instance Attribute Summary collapse
-
#amount_paid ⇒ Integer
Amount paid on the invoice in specified currency’s smallest unit, e.g., $10 USD would be represented as 1000.
-
#amount_remaining ⇒ Integer
Amount remaining due on the invoice in specified currency’s smallest unit, e.g., $10 USD would be represented as 1000.
-
#contact_details ⇒ Array<ModernTreasury::Models::ContactDetail>
The invoicer’s contact details displayed at the top of the invoice.
-
#counterparty_billing_address ⇒ ModernTreasury::Models::Invoice::CounterpartyBillingAddress?
The counterparty’s billing address.
-
#counterparty_id ⇒ String
The ID of the counterparty receiving the invoice.
-
#counterparty_shipping_address ⇒ ModernTreasury::Models::Invoice::CounterpartyShippingAddress?
The counterparty’s shipping address where physical goods should be delivered.
- #created_at ⇒ Time
-
#currency ⇒ Symbol, ModernTreasury::Models::Currency
Currency that the invoice is denominated in.
-
#description ⇒ String
An optional free-form description of the invoice.
-
#due_date ⇒ Time
A future date by when the invoice needs to be paid.
-
#expected_payments ⇒ Array<ModernTreasury::Models::ExpectedPayment>
The expected payments created for an unpaid invoice.
-
#fallback_payment_method ⇒ String?
When payment_method is automatic, the fallback payment method to use when an automatic payment fails.
-
#hosted_url ⇒ String
The URL of the hosted web UI where the invoice can be viewed.
- #id ⇒ String
-
#invoicer_address ⇒ ModernTreasury::Models::Invoice::InvoicerAddress?
The invoice issuer’s business address.
-
#invoicer_name ⇒ String?
The name of the issuer for the invoice.
-
#ledger_account_settlement_id ⇒ String?
The ledger account settlement object linked to the invoice.
-
#live_mode ⇒ Boolean
This field will be true if this object exists in the live environment or false if it exists in the test environment.
-
#metadata ⇒ Hash{Symbol=>String}?
Additional data represented as key-value pairs.
-
#notification_email_addresses ⇒ Array<String>?
Emails in addition to the counterparty email to send invoice status notifications to.
-
#notifications_enabled ⇒ Boolean
If true, the invoice will send email notifications to the invoice recipients about invoice status changes.
-
#number ⇒ String
A unique record number assigned to each invoice that is issued.
- #object ⇒ String
-
#originating_account_id ⇒ String
The ID of the internal account the invoice should be paid to.
-
#payment_effective_date ⇒ Date?
Date transactions are to be posted to the participants’ account.
-
#payment_method ⇒ Symbol, ...
When opening an invoice, whether to show the embedded payment UI , automatically debit the recipient, or rely on manual payment from the recipient.
-
#payment_orders ⇒ Array<ModernTreasury::Models::PaymentOrder>
The payment orders created for paying the invoice through the invoice payment UI.
-
#payment_type ⇒ Symbol, ...
One of ‘ach` or `eft`.
-
#pdf_url ⇒ String?
The URL where the invoice PDF can be downloaded.
-
#receiving_account_id ⇒ String?
The receiving account ID.
-
#recipient_email ⇒ String?
The email of the recipient of the invoice.
-
#recipient_name ⇒ String?
The name of the recipient of the invoice.
-
#remind_after_overdue_days ⇒ Array<Integer>?
Number of days after due date when overdue reminder emails will be sent out to invoice recipients.
-
#status ⇒ Symbol, ModernTreasury::Models::Invoice::Status
The status of the invoice.
-
#total_amount ⇒ Integer
Total amount due in specified currency’s smallest unit, e.g., $10 USD would be represented as 1000.
-
#transaction_line_item_ids ⇒ Array<String>
IDs of transaction line items associated with an invoice.
- #updated_at ⇒ Time
-
#virtual_account_id ⇒ String?
The ID of the virtual account the invoice should be paid to.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(country: , line1: , locality: , postal_code: , region: , line2: nil) ⇒ Object
constructor
The invoice issuer’s business address.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(country: , line1: , locality: , postal_code: , region: , line2: nil) ⇒ Object
The invoice issuer’s business address.
|
|
# File 'lib/modern_treasury/models/invoice.rb', line 253
|
Instance Attribute Details
#amount_paid ⇒ Integer
Amount paid on the invoice in specified currency’s smallest unit, e.g., $10 USD would be represented as 1000.
17 |
# File 'lib/modern_treasury/models/invoice.rb', line 17 required :amount_paid, Integer |
#amount_remaining ⇒ Integer
Amount remaining due on the invoice in specified currency’s smallest unit, e.g., $10 USD would be represented as 1000.
24 |
# File 'lib/modern_treasury/models/invoice.rb', line 24 required :amount_remaining, Integer |
#contact_details ⇒ Array<ModernTreasury::Models::ContactDetail>
The invoicer’s contact details displayed at the top of the invoice.
30 |
# File 'lib/modern_treasury/models/invoice.rb', line 30 required :contact_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ContactDetail] } |
#counterparty_billing_address ⇒ ModernTreasury::Models::Invoice::CounterpartyBillingAddress?
The counterparty’s billing address.
36 37 38 |
# File 'lib/modern_treasury/models/invoice.rb', line 36 required :counterparty_billing_address, -> { ModernTreasury::Invoice::CounterpartyBillingAddress }, nil?: true |
#counterparty_id ⇒ String
The ID of the counterparty receiving the invoice.
44 |
# File 'lib/modern_treasury/models/invoice.rb', line 44 required :counterparty_id, String |
#counterparty_shipping_address ⇒ ModernTreasury::Models::Invoice::CounterpartyShippingAddress?
The counterparty’s shipping address where physical goods should be delivered.
50 51 52 |
# File 'lib/modern_treasury/models/invoice.rb', line 50 required :counterparty_shipping_address, -> { ModernTreasury::Invoice::CounterpartyShippingAddress }, nil?: true |
#created_at ⇒ Time
57 |
# File 'lib/modern_treasury/models/invoice.rb', line 57 required :created_at, Time |
#currency ⇒ Symbol, ModernTreasury::Models::Currency
Currency that the invoice is denominated in. Defaults to ‘USD` if not provided.
63 |
# File 'lib/modern_treasury/models/invoice.rb', line 63 required :currency, enum: -> { ModernTreasury::Currency } |
#description ⇒ String
An optional free-form description of the invoice.
69 |
# File 'lib/modern_treasury/models/invoice.rb', line 69 required :description, String |
#due_date ⇒ Time
A future date by when the invoice needs to be paid.
75 |
# File 'lib/modern_treasury/models/invoice.rb', line 75 required :due_date, Time |
#expected_payments ⇒ Array<ModernTreasury::Models::ExpectedPayment>
The expected payments created for an unpaid invoice.
81 82 |
# File 'lib/modern_treasury/models/invoice.rb', line 81 required :expected_payments, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ExpectedPayment] } |
#fallback_payment_method ⇒ String?
When payment_method is automatic, the fallback payment method to use when an automatic payment fails. One of ‘manual` or `ui`.
89 |
# File 'lib/modern_treasury/models/invoice.rb', line 89 required :fallback_payment_method, String, nil?: true |
#hosted_url ⇒ String
The URL of the hosted web UI where the invoice can be viewed.
95 |
# File 'lib/modern_treasury/models/invoice.rb', line 95 required :hosted_url, String |
#id ⇒ String
10 |
# File 'lib/modern_treasury/models/invoice.rb', line 10 required :id, String |
#invoicer_address ⇒ ModernTreasury::Models::Invoice::InvoicerAddress?
The invoice issuer’s business address.
101 |
# File 'lib/modern_treasury/models/invoice.rb', line 101 required :invoicer_address, -> { ModernTreasury::Invoice::InvoicerAddress }, nil?: true |
#invoicer_name ⇒ String?
The name of the issuer for the invoice. Defaults to the name of the Organization.
108 |
# File 'lib/modern_treasury/models/invoice.rb', line 108 required :invoicer_name, String, nil?: true |
#ledger_account_settlement_id ⇒ String?
The ledger account settlement object linked to the invoice.
114 |
# File 'lib/modern_treasury/models/invoice.rb', line 114 required :ledger_account_settlement_id, String, nil?: true |
#live_mode ⇒ Boolean
This field will be true if this object exists in the live environment or false if it exists in the test environment.
121 |
# File 'lib/modern_treasury/models/invoice.rb', line 121 required :live_mode, ModernTreasury::Internal::Type::Boolean |
#metadata ⇒ Hash{Symbol=>String}?
Additional data represented as key-value pairs. Both the key and value must be strings.
128 |
# File 'lib/modern_treasury/models/invoice.rb', line 128 required :metadata, ModernTreasury::Internal::Type::HashOf[String], nil?: true |
#notification_email_addresses ⇒ Array<String>?
Emails in addition to the counterparty email to send invoice status notifications to. At least one email is required if notifications are enabled and the counterparty doesn’t have an email.
136 |
# File 'lib/modern_treasury/models/invoice.rb', line 136 required :notification_email_addresses, ModernTreasury::Internal::Type::ArrayOf[String], nil?: true |
#notifications_enabled ⇒ Boolean
If true, the invoice will send email notifications to the invoice recipients about invoice status changes.
143 |
# File 'lib/modern_treasury/models/invoice.rb', line 143 required :notifications_enabled, ModernTreasury::Internal::Type::Boolean |
#number ⇒ String
A unique record number assigned to each invoice that is issued.
149 |
# File 'lib/modern_treasury/models/invoice.rb', line 149 required :number, String |
#object ⇒ String
154 |
# File 'lib/modern_treasury/models/invoice.rb', line 154 required :object, String |
#originating_account_id ⇒ String
The ID of the internal account the invoice should be paid to.
160 |
# File 'lib/modern_treasury/models/invoice.rb', line 160 required :originating_account_id, String |
#payment_effective_date ⇒ Date?
Date transactions are to be posted to the participants’ account. Defaults to the current business day or the next business day if the current day is a bank holiday or weekend. Format: yyyy-mm-dd.
168 |
# File 'lib/modern_treasury/models/invoice.rb', line 168 required :payment_effective_date, Date, nil?: true |
#payment_method ⇒ Symbol, ...
When opening an invoice, whether to show the embedded payment UI , automatically debit the recipient, or rely on manual payment from the recipient.
175 |
# File 'lib/modern_treasury/models/invoice.rb', line 175 required :payment_method, enum: -> { ModernTreasury::Invoice::PaymentMethod }, nil?: true |
#payment_orders ⇒ Array<ModernTreasury::Models::PaymentOrder>
The payment orders created for paying the invoice through the invoice payment UI.
182 |
# File 'lib/modern_treasury/models/invoice.rb', line 182 required :payment_orders, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::PaymentOrder] } |
#payment_type ⇒ Symbol, ...
One of ‘ach` or `eft`.
188 |
# File 'lib/modern_treasury/models/invoice.rb', line 188 required :payment_type, enum: -> { ModernTreasury::Invoice::PaymentType }, nil?: true |
#pdf_url ⇒ String?
The URL where the invoice PDF can be downloaded.
194 |
# File 'lib/modern_treasury/models/invoice.rb', line 194 required :pdf_url, String, nil?: true |
#receiving_account_id ⇒ String?
The receiving account ID. Can be an ‘internal_account`.
200 |
# File 'lib/modern_treasury/models/invoice.rb', line 200 required :receiving_account_id, String, nil?: true |
#recipient_email ⇒ String?
The email of the recipient of the invoice. Leaving this value as null will fallback to using the counterparty’s name.
207 |
# File 'lib/modern_treasury/models/invoice.rb', line 207 required :recipient_email, String, nil?: true |
#recipient_name ⇒ String?
The name of the recipient of the invoice. Leaving this value as null will fallback to using the counterparty’s name.
214 |
# File 'lib/modern_treasury/models/invoice.rb', line 214 required :recipient_name, String, nil?: true |
#remind_after_overdue_days ⇒ Array<Integer>?
Number of days after due date when overdue reminder emails will be sent out to invoice recipients.
221 |
# File 'lib/modern_treasury/models/invoice.rb', line 221 required :remind_after_overdue_days, ModernTreasury::Internal::Type::ArrayOf[Integer], nil?: true |
#status ⇒ Symbol, ModernTreasury::Models::Invoice::Status
The status of the invoice.
227 |
# File 'lib/modern_treasury/models/invoice.rb', line 227 required :status, enum: -> { ModernTreasury::Invoice::Status } |
#total_amount ⇒ Integer
Total amount due in specified currency’s smallest unit, e.g., $10 USD would be represented as 1000.
234 |
# File 'lib/modern_treasury/models/invoice.rb', line 234 required :total_amount, Integer |
#transaction_line_item_ids ⇒ Array<String>
IDs of transaction line items associated with an invoice.
240 |
# File 'lib/modern_treasury/models/invoice.rb', line 240 required :transaction_line_item_ids, ModernTreasury::Internal::Type::ArrayOf[String] |
#updated_at ⇒ Time
245 |
# File 'lib/modern_treasury/models/invoice.rb', line 245 required :updated_at, Time |
#virtual_account_id ⇒ String?
The ID of the virtual account the invoice should be paid to.
251 |
# File 'lib/modern_treasury/models/invoice.rb', line 251 required :virtual_account_id, String, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/modern_treasury/models/invoice.rb', line 500
|