Class: Stigg::Models::V1::Credits::CreditGrantResponse::Data::LatestInvoice

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/credits/credit_grant_response.rb

Overview

See Also:

Defined Under Namespace

Modules: BillingReason, Status

Instance Attribute Summary collapse

Class Method 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(billing_id:, billing_reason:, created_at:, currency:, due_date:, error_message:, payment_url:, pdf_url:, requires_action:, status:, sub_total:, tax:, total:, updated_at:) ⇒ Object

The latest invoice details for this grant

Parameters:

  • billing_id (String)

    The billing provider invoice ID

  • billing_reason (Symbol, Stigg::Models::V1::Credits::CreditGrantResponse::Data::LatestInvoice::BillingReason, nil)

    The billing reason for the invoice

  • created_at (Time)

    The invoice creation date

  • currency (String, nil)

    The invoice currency

  • due_date (Time, nil)

    The invoice due date

  • error_message (String, nil)

    Error message if payment failed

  • payment_url (String, nil)

    The payment URL for settling the invoice

  • pdf_url (String, nil)

    The PDF URL of the invoice

  • requires_action (Boolean)

    Whether the invoice requires user action

  • status (Symbol, Stigg::Models::V1::Credits::CreditGrantResponse::Data::LatestInvoice::Status)

    The invoice status

  • sub_total (Float, nil)

    The subtotal amount before tax

  • tax (Float, nil)

    The tax amount

  • total (Float, nil)

    The total amount including tax

  • updated_at (Time)

    The invoice last update date



# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 339

Instance Attribute Details

#billing_idString

The billing provider invoice ID

Returns:

  • (String)


254
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 254

required :billing_id, String, api_name: :billingId

#billing_reasonSymbol, ...

The billing reason for the invoice



260
261
262
263
264
265
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 260

required :billing_reason,
enum: -> {
  Stigg::V1::Credits::CreditGrantResponse::Data::LatestInvoice::BillingReason
},
api_name: :billingReason,
nil?: true

#created_atTime

The invoice creation date

Returns:

  • (Time)


271
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 271

required :created_at, Time, api_name: :createdAt

#currencyString?

The invoice currency

Returns:

  • (String, nil)


277
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 277

required :currency, String, nil?: true

#due_dateTime?

The invoice due date

Returns:

  • (Time, nil)


283
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 283

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

#error_messageString?

Error message if payment failed

Returns:

  • (String, nil)


289
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 289

required :error_message, String, api_name: :errorMessage, nil?: true

#payment_urlString?

The payment URL for settling the invoice

Returns:

  • (String, nil)


295
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 295

required :payment_url, String, api_name: :paymentUrl, nil?: true

#pdf_urlString?

The PDF URL of the invoice

Returns:

  • (String, nil)


301
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 301

required :pdf_url, String, api_name: :pdfUrl, nil?: true

#requires_actionBoolean

Whether the invoice requires user action

Returns:

  • (Boolean)


307
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 307

required :requires_action, Stigg::Internal::Type::Boolean, api_name: :requiresAction

#statusSymbol, Stigg::Models::V1::Credits::CreditGrantResponse::Data::LatestInvoice::Status

The invoice status



313
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 313

required :status, enum: -> { Stigg::V1::Credits::CreditGrantResponse::Data::LatestInvoice::Status }

#sub_totalFloat?

The subtotal amount before tax

Returns:

  • (Float, nil)


319
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 319

required :sub_total, Float, api_name: :subTotal, nil?: true

#taxFloat?

The tax amount

Returns:

  • (Float, nil)


325
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 325

required :tax, Float, nil?: true

#totalFloat?

The total amount including tax

Returns:

  • (Float, nil)


331
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 331

required :total, Float, nil?: true

#updated_atTime

The invoice last update date

Returns:

  • (Time)


337
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 337

required :updated_at, Time, api_name: :updatedAt

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 379