Class: Stigg::Models::V1::CustomerListInvoicesResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/customer_list_invoices_response.rb,
sig/stigg/models/v1/customer_list_invoices_response.rbs

Overview

See Also:

  • Stigg::Resources::V1::Customers#list_invoices

Defined Under Namespace

Modules: State Classes: LineItem

Instance Attribute Summary collapse

Instance Method Summary collapse

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(amount:, description:, product_external_id:, quantity:, unit_price:) ⇒ Object

A single line item on an invoice.

Parameters:

  • amount (Float, nil)

    Total amount for this line (unit price × quantity)

  • description (String, nil)

    Human-readable description of the line item

  • product_external_id (String, nil)

    External ID of the product this line item relates to, when one is mapped

  • quantity (Float, nil)

    Quantity billed on this line

  • unit_price (Float, nil)

    Price per unit for this line



# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 170

Instance Attribute Details

#contract_external_idString?

External ID of the contract the invoice belongs to: your contract ref when mapped, otherwise the Received contract ID

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


13
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 13

required :contract_external_id, String, api_name: :contractExternalId, nil?: true

#currencyString?

The ISO-4217 currency code of the invoice

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


19
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 19

required :currency, String, nil?: true

#customer_external_idString?

External ID of the customer the invoice belongs to: your customer ref when mapped, otherwise the Received customer ID

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


26
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 26

required :customer_external_id, String, api_name: :customerExternalId, nil?: true

#discountFloat?

The total discount amount

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


32
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 32

required :discount, Float, nil?: true

#due_dateTime?

The date payment is due

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


38
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 38

required :due_date, Time, api_name: :dueDate, nil?: true

#invoice_external_idString?

External ID for the invoice: the mapped external ID when one exists, otherwise the invoice ID

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


45
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 45

required :invoice_external_id, String, api_name: :invoiceExternalId, nil?: true

#invoice_idString

The billing provider (Received) invoice ID

Parameters:

  • value (String)

Returns:

  • (String)


51
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 51

required :invoice_id, String, api_name: :invoiceId

#invoice_numberString?

The invoice document number (or draft number while the invoice is unissued)

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


57
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 57

required :invoice_number, String, api_name: :invoiceNumber, nil?: true

#issue_dateTime?

The date the invoice was issued

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


63
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 63

required :issue_date, Time, api_name: :issueDate, nil?: true

#line_itemsArray<Stigg::Models::V1::CustomerListInvoicesResponse::LineItem>

The invoice line items



69
70
71
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 69

required :line_items,
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::CustomerListInvoicesResponse::LineItem] },
api_name: :lineItems

The date the invoice was reconciled as paid; present once reconciled

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


77
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 77

required :paid_date, Time, api_name: :paidDate, nil?: true

#stateSymbol, Stigg::Models::V1::CustomerListInvoicesResponse::State

The invoice status (open, paid, or canceled)

Parameters:

  • value (Stigg::Models::V1::CustomerListInvoicesResponse::state)

Returns:



83
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 83

required :state, enum: -> { Stigg::Models::V1::CustomerListInvoicesResponse::State }

#subtotalFloat?

The pre-tax subtotal

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


89
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 89

required :subtotal, Float, nil?: true

#taxFloat?

The total tax amount

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


95
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 95

required :tax, Float, nil?: true

#totalFloat?

The total amount due

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


101
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 101

required :total, Float, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


72
# File 'sig/stigg/models/v1/customer_list_invoices_response.rbs', line 72

def to_hash: -> {