Class: Orb::Models::InvoiceUpdateParams

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

Overview

See Also:

  • Orb::Resources::Invoices#update

Defined Under Namespace

Modules: DueDate, InvoiceDate

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

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(invoice_id:, auto_collection: nil, due_date: nil, invoice_date: nil, metadata: nil, net_terms: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::InvoiceUpdateParams for more details.

Parameters:

  • invoice_id (String)
  • auto_collection (Boolean, nil) (defaults to: nil)

    Determines whether this invoice will automatically attempt to charge a saved pay

  • due_date (Date, Time, nil) (defaults to: nil)

    An optional custom due date for the invoice. If not set, the due date will be ca

  • invoice_date (Date, Time, nil) (defaults to: nil)

    The date of the invoice. Can only be modified for one-off draft invoices.

  • metadata (Hash{Symbol=>String, nil}, nil) (defaults to: nil)

    User-specified key/value pairs for the resource. Individual keys can be removed

  • net_terms (Integer, nil) (defaults to: nil)

    The net terms determines the due date of the invoice. Due date is calculated bas

  • request_options (Orb::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/orb/models/invoice_update_params.rb', line 54

Instance Attribute Details

#auto_collectionBoolean?

Determines whether this invoice will automatically attempt to charge a saved payment method, if any. Can only be modified on draft invoices. If not specified, the invoice's existing setting is unchanged.

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


21
# File 'lib/orb/models/invoice_update_params.rb', line 21

optional :auto_collection, Orb::Internal::Type::Boolean, nil?: true

#due_dateDate, ...

An optional custom due date for the invoice. If not set, the due date will be calculated based on the net_terms value.

Parameters:

  • value (Orb::Models::InvoiceUpdateParams::due_date, nil)

Returns:

  • (Date, Time, nil)


28
# File 'lib/orb/models/invoice_update_params.rb', line 28

optional :due_date, union: -> { Orb::InvoiceUpdateParams::DueDate }, nil?: true

#invoice_dateDate, ...

The date of the invoice. Can only be modified for one-off draft invoices.

Parameters:

  • value (Orb::Models::InvoiceUpdateParams::invoice_date, nil)

Returns:

  • (Date, Time, nil)


34
# File 'lib/orb/models/invoice_update_params.rb', line 34

optional :invoice_date, union: -> { Orb::InvoiceUpdateParams::InvoiceDate }, nil?: true

#invoice_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :invoice_id, String

#metadataHash{Symbol=>String, nil}?

User-specified key/value pairs for the resource. Individual keys can be removed by setting the value to null, and the entire metadata mapping can be cleared by setting metadata to null.

Parameters:

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

Returns:

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


42
# File 'lib/orb/models/invoice_update_params.rb', line 42

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

#net_termsInteger?

The net terms determines the due date of the invoice. Due date is calculated based on the invoice or issuance date, depending on the account's configured due date calculation method. A value of '0' here represents that the invoice is due on issue, whereas a value of '30' represents that the customer has 30 days to pay the invoice. Do not set this field if you want to set a custom due date.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


52
# File 'lib/orb/models/invoice_update_params.rb', line 52

optional :net_terms, Integer, nil?: true

Class Method Details

.variantsArray(Date, Time)

Returns:

  • (Array(Date, Time))


# File 'lib/orb/models/invoice_update_params.rb', line 81

Instance Method Details

#to_hash{

Returns:

  • ({)


40
# File 'sig/orb/models/invoice_update_params.rbs', line 40

def to_hash: -> {