Class: Orb::Models::InvoiceCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::InvoiceCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/orb/models/invoice_create_params.rb,
sig/orb/models/invoice_create_params.rbs
Overview
Defined Under Namespace
Modules: DueDate Classes: LineItem
Instance Attribute Summary collapse
-
#auto_collection ⇒ Boolean?
Determines whether this invoice will automatically attempt to charge a saved payment method, if any.
-
#currency ⇒ String
An ISO 4217 currency string.
-
#customer_id ⇒ String?
The id of the
Customerto create this invoice for. -
#discount ⇒ Orb::Models::PercentageDiscount, ...
An optional discount to attach to the invoice.
-
#due_date ⇒ Date, ...
An optional custom due date for the invoice.
-
#external_customer_id ⇒ String?
The
external_customer_idof theCustomerto create this invoice for. -
#invoice_date ⇒ Time
An ISO 8601 date or timestamp, interpreted in the customer's timezone.
- #line_items ⇒ Array<Orb::Models::InvoiceCreateParams::LineItem>
-
#memo ⇒ String?
An optional memo to attach to the invoice.
-
#metadata ⇒ Hash{Symbol=>String, nil}?
User-specified key/value pairs for the resource.
-
#net_terms ⇒ Integer?
The net terms determines the due date of the invoice.
-
#will_auto_issue ⇒ Boolean?
When true, auto-issues the invoice on the invoice date.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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 ⇒ Object
50 |
# File 'sig/orb/models/invoice_create_params.rbs', line 50
def initialize: (
|
Instance Attribute Details
#auto_collection ⇒ Boolean?
Determines whether this invoice will automatically attempt to charge a saved payment method, if any. If not specified, the invoice inherits the customer's auto_collection setting.
37 |
# File 'lib/orb/models/invoice_create_params.rb', line 37 optional :auto_collection, Orb::Internal::Type::Boolean, nil?: true |
#currency ⇒ String
An ISO 4217 currency string. Must be the same as the customer's currency if it is set.
15 |
# File 'lib/orb/models/invoice_create_params.rb', line 15 required :currency, String |
#customer_id ⇒ String?
The id of the Customer to create this invoice for. One of customer_id and
external_customer_id are required.
44 |
# File 'lib/orb/models/invoice_create_params.rb', line 44 optional :customer_id, String, nil?: true |
#discount ⇒ Orb::Models::PercentageDiscount, ...
An optional discount to attach to the invoice.
50 |
# File 'lib/orb/models/invoice_create_params.rb', line 50 optional :discount, union: -> { Orb::Discount }, nil?: true |
#due_date ⇒ Date, ...
An optional custom due date for the invoice. If not set, the due date will be
calculated based on the net_terms value.
57 |
# File 'lib/orb/models/invoice_create_params.rb', line 57 optional :due_date, union: -> { Orb::InvoiceCreateParams::DueDate }, nil?: true |
#external_customer_id ⇒ String?
The external_customer_id of the Customer to create this invoice for. One of
customer_id and external_customer_id are required.
64 |
# File 'lib/orb/models/invoice_create_params.rb', line 64 optional :external_customer_id, String, nil?: true |
#invoice_date ⇒ Time
An ISO 8601 date or timestamp, interpreted in the customer's timezone. If a date
is set without a time, invoice_date is set to midnight on the chosen date in
the customer's timezone. invoice_date cannot be more than one year in the
future.
24 |
# File 'lib/orb/models/invoice_create_params.rb', line 24 required :invoice_date, Time |
#line_items ⇒ Array<Orb::Models::InvoiceCreateParams::LineItem>
29 |
# File 'lib/orb/models/invoice_create_params.rb', line 29 required :line_items, -> { Orb::Internal::Type::ArrayOf[Orb::InvoiceCreateParams::LineItem] } |
#memo ⇒ String?
An optional memo to attach to the invoice. If no memo is provided, we will attach the default memo
71 |
# File 'lib/orb/models/invoice_create_params.rb', line 71 optional :memo, String, nil?: true |
#metadata ⇒ Hash{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.
79 |
# File 'lib/orb/models/invoice_create_params.rb', line 79 optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true |
#net_terms ⇒ Integer?
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.
89 |
# File 'lib/orb/models/invoice_create_params.rb', line 89 optional :net_terms, Integer, nil?: true |
#will_auto_issue ⇒ Boolean?
When true, auto-issues the invoice on the invoice date. If the invoice date is today's date or earlier, the invoice will be issued upon creation. When false, the resulting invoice will require manual review to issue. Defaults to false.
97 |
# File 'lib/orb/models/invoice_create_params.rb', line 97 optional :will_auto_issue, Orb::Internal::Type::Boolean |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/orb/models/invoice_create_params.rb', line 191
|
Instance Method Details
#to_hash ⇒ {
66 |
# File 'sig/orb/models/invoice_create_params.rbs', line 66
def to_hash: -> {
|