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

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

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(contract_external_id:, currency:, customer_external_id:, discount:, due_date:, invoice_external_id:, invoice_id:, invoice_number:, issue_date:, line_items:, paid_date:, state:, subtotal:, tax:, total:) ⇒ Object

Some parameter documentations has been truncated, see Stigg::Models::V1::CustomerListInvoicesResponse for more details.

A customer invoice as reported by the connected billing provider.

Parameters:

  • contract_external_id (String, nil)

    External ID of the contract the invoice belongs to: your contract ref when mappe

  • currency (String, nil)

    The ISO-4217 currency code of the invoice

  • customer_external_id (String, nil)

    External ID of the customer the invoice belongs to: your customer ref when mappe

  • discount (Float, nil)

    The total discount amount

  • due_date (Time, nil)

    The date payment is due

  • invoice_external_id (String, nil)

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

  • invoice_id (String)

    The billing provider (Received) invoice ID

  • invoice_number (String, nil)

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

  • issue_date (Time, nil)

    The date the invoice was issued

  • line_items (Array<Stigg::Models::V1::CustomerListInvoicesResponse::LineItem>)

    The invoice line items

  • paid_date (Time, nil)

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

  • state (Symbol, Stigg::Models::V1::CustomerListInvoicesResponse::State)

    The invoice status (open, paid, or canceled)

  • subtotal (Float, nil)

    The pre-tax subtotal

  • tax (Float, nil)

    The total tax amount

  • total (Float, nil)

    The total amount due



139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/stigg/models/v1/customer_list_invoices_response.rb', line 139

class LineItem < Stigg::Internal::Type::BaseModel
  # @!attribute amount
  #   Total amount for this line (unit price × quantity)
  #
  #   @return [Float, nil]
  required :amount, Float, nil?: true

  # @!attribute description
  #   Human-readable description of the line item
  #
  #   @return [String, nil]
  required :description, String, nil?: true

  # @!attribute product_external_id
  #   External ID of the product this line item relates to, when one is mapped
  #
  #   @return [String, nil]
  required :product_external_id, String, api_name: :productExternalId, nil?: true

  # @!attribute quantity
  #   Quantity billed on this line
  #
  #   @return [Float, nil]
  required :quantity, Float, nil?: true

  # @!attribute unit_price
  #   Price per unit for this line
  #
  #   @return [Float, nil]
  required :unit_price, Float, api_name: :unitPrice, nil?: true

  # @!method initialize(amount:, description:, product_external_id:, quantity:, unit_price:)
  #   A single line item on an invoice.
  #
  #   @param amount [Float, nil] Total amount for this line (unit price × quantity)
  #
  #   @param description [String, nil] Human-readable description of the line item
  #
  #   @param product_external_id [String, nil] External ID of the product this line item relates to, when one is mapped
  #
  #   @param quantity [Float, nil] Quantity billed on this line
  #
  #   @param unit_price [Float, nil] Price per unit for this line
end

Instance Attribute Details

#amountFloat?

Total amount for this line (unit price × quantity)

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :amount, Float, nil?: true

#descriptionString?

Human-readable description of the line item

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :description, String, nil?: true

#product_external_idString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :product_external_id, String, api_name: :productExternalId, nil?: true

#quantityFloat?

Quantity billed on this line

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :quantity, Float, nil?: true

#unit_priceFloat?

Price per unit for this line

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


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

required :unit_price, Float, api_name: :unitPrice, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {