Class: Orb::Models::InvoiceCreateParams

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

Overview

Defined Under Namespace

Classes: LineItem

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Method Summary

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, #initialize, 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

This class inherits a constructor from Orb::Internal::Type::BaseModel

Instance Attribute Details

#currencyString

An ISO 4217 currency string. Must be the same as the customer’s currency if it is set.

Returns:

  • (String)


15
# File 'lib/orb/models/invoice_create_params.rb', line 15

required :currency, String

#customer_idString?

The id of the ‘Customer` to create this invoice for. One of `customer_id` and `external_customer_id` are required.

Returns:

  • (String, nil)


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

optional :customer_id, String, nil?: true

#discountOrb::Models::PercentageDiscount, ...

An optional discount to attach to the invoice.



40
# File 'lib/orb/models/invoice_create_params.rb', line 40

optional :discount, union: -> { Orb::Discount }, nil?: true

#external_customer_idString?

The ‘external_customer_id` of the `Customer` to create this invoice for. One of `customer_id` and `external_customer_id` are required.

Returns:

  • (String, nil)


47
# File 'lib/orb/models/invoice_create_params.rb', line 47

optional :external_customer_id, String, nil?: true

#invoice_dateTime

Optional invoice date to set. Must be in the past, if not set, ‘invoice_date` is set to the current time in the customer’s timezone.

Returns:

  • (Time)


22
# File 'lib/orb/models/invoice_create_params.rb', line 22

required :invoice_date, Time

#line_itemsArray<Orb::Models::InvoiceCreateParams::LineItem>



27
# File 'lib/orb/models/invoice_create_params.rb', line 27

required :line_items, -> { Orb::Internal::Type::ArrayOf[Orb::InvoiceCreateParams::LineItem] }

#memoString?

An optional memo to attach to the invoice.

Returns:

  • (String, nil)


53
# File 'lib/orb/models/invoice_create_params.rb', line 53

optional :memo, String, nil?: true

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

Returns:

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


61
# File 'lib/orb/models/invoice_create_params.rb', line 61

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

#net_termsInteger?

Determines the difference between the invoice issue date for subscription invoices as the date that they are due. 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.

Returns:

  • (Integer, nil)


70
# File 'lib/orb/models/invoice_create_params.rb', line 70

optional :net_terms, Integer, nil?: true

#will_auto_issueBoolean?

When true, this invoice will be submitted for issuance upon creation. When false, the resulting invoice will require manual review to issue. Defaulted to false.

Returns:

  • (Boolean, nil)


78
# File 'lib/orb/models/invoice_create_params.rb', line 78

optional :will_auto_issue, Orb::Internal::Type::Boolean