Class: ModernTreasury::Models::InvoiceUpdateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/modern_treasury/models/invoice_update_params.rb,
sig/modern_treasury/models/invoice_update_params.rbs

Overview

See Also:

  • ModernTreasury::Resources::Invoices#update

Defined Under Namespace

Modules: PaymentMethod Classes: CounterpartyBillingAddress, CounterpartyShippingAddress, InvoiceLineItem, InvoicerAddress

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::ModernTreasury

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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.

Parameters:

  • country (String)

    Country code conforms to [ISO 3166-1 alpha-2]

  • line1 (String)
  • locality (String)

    Locality or City.

  • postal_code (String)

    The postal code of the address.

  • region (String)

    Region or State.

  • line2 (String) (defaults to: nil)


# File 'lib/modern_treasury/models/invoice_update_params.rb', line 279

Instance Attribute Details

#contact_detailsArray<ModernTreasury::Models::ContactDetail>?

The invoicer's contact details displayed at the top of the invoice.

Returns:



19
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 19

optional :contact_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ContactDetail] }

#counterparty_billing_addressModernTreasury::Models::InvoiceUpdateParams::CounterpartyBillingAddress?

The counterparty's billing address.

Parameters:

  • value (ModernTreasury::InvoiceUpdateParams::CounterpartyBillingAddress, nil)

Returns:



25
26
27
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 25

optional :counterparty_billing_address,
-> { ModernTreasury::InvoiceUpdateParams::CounterpartyBillingAddress },
nil?: true

#counterparty_idString?

The ID of the counterparty receiving the invoice.

Parameters:

  • (String)

Returns:

  • (String, nil)


33
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 33

optional :counterparty_id, String

#counterparty_shipping_addressModernTreasury::Models::InvoiceUpdateParams::CounterpartyShippingAddress?

The counterparty's shipping address where physical goods should be delivered.

Parameters:

  • value (ModernTreasury::InvoiceUpdateParams::CounterpartyShippingAddress, nil)

Returns:



39
40
41
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 39

optional :counterparty_shipping_address,
-> { ModernTreasury::InvoiceUpdateParams::CounterpartyShippingAddress },
nil?: true

#currencySymbol, ...

Currency that the invoice is denominated in. Defaults to USD if not provided.

Returns:



47
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 47

optional :currency, enum: -> { ModernTreasury::Currency }

#descriptionString?

A free-form description of the invoice.

Parameters:

  • (String)

Returns:

  • (String, nil)


53
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 53

optional :description, String

#due_dateTime?

A future date by when the invoice needs to be paid.

Parameters:

  • (Time)

Returns:

  • (Time, nil)


59
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 59

optional :due_date, Time

#fallback_payment_methodString?

When payment_method is automatic, the fallback payment method to use when an automatic payment fails. One of manual or ui.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


66
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 66

optional :fallback_payment_method, String, nil?: true

#idString

Parameters:

  • value (String)

Returns:

  • (String)


13
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 13

required :id, String

#invoice_line_itemsArray<ModernTreasury::Models::InvoiceUpdateParams::InvoiceLineItem>?

An array of invoice line items. The API supports a maximum of 50 invoice line items per invoice. If a greater number of invoice line items is required, please contact support.

Parameters:

  • value (::Array[ModernTreasury::InvoiceUpdateParams::InvoiceLineItem], nil)

Returns:



74
75
76
77
78
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 74

optional :invoice_line_items,
-> {
  ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::InvoiceUpdateParams::InvoiceLineItem]
},
nil?: true

#invoicer_addressModernTreasury::Models::InvoiceUpdateParams::InvoicerAddress?

The invoice issuer's business address.

Parameters:

  • value (ModernTreasury::InvoiceUpdateParams::InvoicerAddress, nil)

Returns:



84
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 84

optional :invoicer_address, -> { ModernTreasury::InvoiceUpdateParams::InvoicerAddress }, nil?: true

#invoicer_nameString?

The name of the issuer for the invoice. Defaults to the name of the Organization.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


91
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 91

optional :invoicer_name, String, nil?: true

#metadataHash{Symbol=>String}?

Additional data represented as key-value pairs. Both the key and value must be strings.

Parameters:

  • value (::Hash[Symbol, String], nil)

Returns:

  • (Hash{Symbol=>String}, nil)


98
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 98

optional :metadata, ModernTreasury::Internal::Type::HashOf[String], nil?: true

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

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


106
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 106

optional :notification_email_addresses, ModernTreasury::Internal::Type::ArrayOf[String], nil?: true

#notifications_enabledBoolean?

If true, the invoice will send email notifications to the invoice recipients about invoice status changes.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


113
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 113

optional :notifications_enabled, ModernTreasury::Internal::Type::Boolean

#originating_account_idString?

The ID of the internal account the invoice should be paid to.

Parameters:

  • (String)

Returns:

  • (String, nil)


119
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 119

optional :originating_account_id, String

#payment_effective_dateDate?

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.

Parameters:

  • (Date)

Returns:

  • (Date, nil)


127
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 127

optional :payment_effective_date, Date

#payment_methodSymbol, ...

The method by which the invoice can be paid. ui will show the embedded payment collection flow. automatic will automatically initiate payment based upon the account details of the receiving_account id.\nIf the invoice amount is positive, the automatically initiated payment order's direction will be debit. If the invoice amount is negative, the automatically initiated payment order's direction will be credit. One of manual, ui, or automatic.



138
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 138

optional :payment_method, enum: -> { ModernTreasury::InvoiceUpdateParams::PaymentMethod }

#payment_typeSymbol, ...

One of ach, se_bankgirot, eft, wire, check, book, rtp, sepa, bacs, au_becs, neft, nics, nz_national_clearing_code, sic, zengin.



145
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 145

optional :payment_type, enum: -> { ModernTreasury::PaymentOrderType }

#receiving_account_idString?

The receiving account ID. Can be an external_account.

Parameters:

  • (String)

Returns:

  • (String, nil)


151
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 151

optional :receiving_account_id, String

#recipient_emailString?

The email of the recipient of the invoice. Leaving this value as null will fallback to using the counterparty's name.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


158
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 158

optional :recipient_email, String, nil?: true

#recipient_nameString?

The name of the recipient of the invoice. Leaving this value as null will fallback to using the counterparty's name.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


165
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 165

optional :recipient_name, String, nil?: true

#remind_after_overdue_daysArray<Integer>?

Number of days after due date when overdue reminder emails will be sent out to invoice recipients.

Parameters:

  • value (::Array[Integer], nil)

Returns:

  • (Array<Integer>, nil)


172
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 172

optional :remind_after_overdue_days, ModernTreasury::Internal::Type::ArrayOf[Integer], nil?: true

#statusString?

Invoice status must be updated in a PATCH request that does not modify any other invoice attributes. Valid state transitions are draft to unpaid, draft or unpaid to voided, and draft or unpaid to paid.

Parameters:

  • (String)

Returns:

  • (String, nil)


180
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 180

optional :status, String

#virtual_account_idString?

The ID of the virtual account the invoice should be paid to.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


186
# File 'lib/modern_treasury/models/invoice_update_params.rb', line 186

optional :virtual_account_id, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


148
# File 'sig/modern_treasury/models/invoice_update_params.rbs', line 148

def to_hash: -> {