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

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

Overview

See Also:

Defined Under Namespace

Modules: GrantType, PaymentCollection, SourceType, Status Classes: Cost, LatestInvoice

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(amount:, currency:) ⇒ Object

The monetary cost of the credit grant

Parameters:

  • amount (Float)

    The cost amount

  • currency (String)

    The currency code



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

Instance Attribute Details

#amountFloat

The total credits granted

Returns:

  • (Float)


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

required :amount, Float

#commentString?

An optional comment on the credit grant

Returns:

  • (String, nil)


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

required :comment, String, nil?: true

#consumed_amountFloat

The total credits consumed from this grant

Returns:

  • (Float)


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

required :consumed_amount, Float, api_name: :consumedAmount

#costStigg::Models::V1::Credits::CreditGrantResponse::Data::Cost

The monetary cost of the credit grant



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

required :cost, -> { Stigg::V1::Credits::CreditGrantResponse::Data::Cost }

#created_atTime

Timestamp of when the record was created

Returns:

  • (Time)


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

required :created_at, Time, api_name: :createdAt

#currency_idString

The currency identifier for this grant

Returns:

  • (String)


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

required :currency_id, String, api_name: :currencyId

#customer_idString

The customer ID this grant belongs to

Returns:

  • (String)


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

required :customer_id, String, api_name: :customerId

#display_nameString

The display name of the credit grant

Returns:

  • (String)


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

required :display_name, String, api_name: :displayName

#effective_atTime

The date when the credit grant becomes effective

Returns:

  • (Time)


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

required :effective_at, Time, api_name: :effectiveAt

#expire_atTime?

The date when the credit grant expires

Returns:

  • (Time, nil)


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

required :expire_at, Time, api_name: :expireAt, nil?: true

#grant_typeSymbol, Stigg::Models::V1::Credits::CreditGrantResponse::Data::GrantType

The type of credit grant (PAID, PROMOTIONAL, RECURRING)



92
93
94
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 92

required :grant_type,
enum: -> { Stigg::V1::Credits::CreditGrantResponse::Data::GrantType },
api_name: :grantType

#idString

The unique readable identifier of the credit grant

Returns:

  • (String)


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

required :id, String

#invoice_idString?

The billing invoice ID associated with this grant

Returns:

  • (String, nil)


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

required :invoice_id, String, api_name: :invoiceId, nil?: true

#latest_invoiceStigg::Models::V1::Credits::CreditGrantResponse::Data::LatestInvoice?

The latest invoice details for this grant



106
107
108
109
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 106

required :latest_invoice,
-> { Stigg::V1::Credits::CreditGrantResponse::Data::LatestInvoice },
api_name: :latestInvoice,
nil?: true

#metadataHash{Symbol=>String}

Metadata associated with the entity

Returns:

  • (Hash{Symbol=>String})


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

required :metadata, Stigg::Internal::Type::HashOf[String]

#payment_collectionSymbol, Stigg::Models::V1::Credits::CreditGrantResponse::Data::PaymentCollection

The payment collection status



121
122
123
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 121

required :payment_collection,
enum: -> { Stigg::V1::Credits::CreditGrantResponse::Data::PaymentCollection },
api_name: :paymentCollection

#priorityFloat

The priority of the credit grant (lower number = higher priority)

Returns:

  • (Float)


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

required :priority, Float

#resource_idString?

The resource ID this grant is scoped to

Returns:

  • (String, nil)


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

required :resource_id, String, api_name: :resourceId, nil?: true

#source_typeSymbol, ...

The source type of the grant (PRICE, PLAN_ENTITLEMENT, ADDON_ENTITLEMENT)



141
142
143
144
# File 'lib/stigg/models/v1/credits/credit_grant_response.rb', line 141

required :source_type,
enum: -> { Stigg::V1::Credits::CreditGrantResponse::Data::SourceType },
api_name: :sourceType,
nil?: true

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

The effective status of the credit grant



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

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

#updated_atTime

Timestamp of when the record was last updated

Returns:

  • (Time)


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

required :updated_at, Time, api_name: :updatedAt

#voided_atTime?

The date when the credit grant was voided

Returns:

  • (Time, nil)


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

required :voided_at, Time, api_name: :voidedAt, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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