Class: Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1_beta/customers/entitlement_check_response.rb

Defined Under Namespace

Modules: AccessDeniedReason Classes: Chain, Currency

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(currency_id:, display_name:, description: nil, metadata: nil, unit_plural: nil, unit_singular: nil) ⇒ Object

The currency associated with a credit entitlement.

Parameters:

  • currency_id (String)

    The unique identifier of the custom currency.

  • display_name (String)

    The display name of the currency.

  • description (String, nil) (defaults to: nil)

    A description of the currency.

  • metadata (Hash{Symbol=>String}, nil) (defaults to: nil)

    Additional metadata associated with the currency.

  • unit_plural (String, nil) (defaults to: nil)

    The plural form of the currency unit.

  • unit_singular (String, nil) (defaults to: nil)

    The singular form of the currency unit.



# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 378

Instance Attribute Details

#access_denied_reasonSymbol, ...



310
311
312
313
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 310

required :access_denied_reason,
enum: -> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::AccessDeniedReason },
api_name: :accessDeniedReason,
nil?: true

#chainsArray<Array<Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Chain>>?

Per-entity rollups, one chain per resolved dimension. Omitted when dimensions was not provided.



353
354
355
356
357
358
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 353

optional :chains,
-> do
  Stigg::Internal::Type::ArrayOf[
    Stigg::Internal::Type::ArrayOf[Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Chain]
  ]
end

#currencyStigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Currency

The currency associated with a credit entitlement.



319
320
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 319

required :currency,
-> { Stigg::Models::V1Beta::Customers::EntitlementCheckResponse::Data::Credit::Currency }

#current_usageFloat

Returns:

  • (Float)


325
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 325

required :current_usage, Float, api_name: :currentUsage

#entitlement_updated_atTime?

Timestamp of the last update to the entitlement grant or configuration.

Returns:

  • (Time, nil)


364
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 364

optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt

#is_grantedBoolean

Returns:

  • (Boolean)


330
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 330

required :is_granted, Stigg::Internal::Type::Boolean, api_name: :isGranted

#typeSymbol, :CREDIT

Returns:

  • (Symbol, :CREDIT)


335
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 335

required :type, const: :CREDIT

#usage_limitFloat

Returns:

  • (Float)


340
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 340

required :usage_limit, Float, api_name: :usageLimit

#usage_period_endTime?

The end date of the current billing period for recurring credit grants.

Returns:

  • (Time, nil)


370
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 370

optional :usage_period_end, Time, api_name: :usagePeriodEnd

#usage_updated_atTime

Timestamp of the last update to the credit usage.

Returns:

  • (Time)


346
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 346

required :usage_updated_at, Time, api_name: :usageUpdatedAt

#valid_untilTime?

The next time the entitlement should be recalculated

Returns:

  • (Time, nil)


376
# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 376

optional :valid_until, Time, api_name: :validUntil

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stigg/models/v1_beta/customers/entitlement_check_response.rb', line 426