Class: Stigg::Models::V1::Events::Beta::Customers::EntitlementCheckResponse::Data::Credit

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/events/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/events/beta/customers/entitlement_check_response.rb', line 381

Instance Attribute Details

#access_denied_reasonSymbol, ...



313
314
315
316
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 313

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

#chainsArray<Array<Stigg::Models::V1::Events::Beta::Customers::EntitlementCheckResponse::Data::Credit::Chain>>?

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



356
357
358
359
360
361
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 356

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

#currencyStigg::Models::V1::Events::Beta::Customers::EntitlementCheckResponse::Data::Credit::Currency

The currency associated with a credit entitlement.



322
323
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 322

required :currency,
-> { Stigg::Models::V1::Events::Beta::Customers::EntitlementCheckResponse::Data::Credit::Currency }

#current_usageFloat

Returns:

  • (Float)


328
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 328

required :current_usage, Float, api_name: :currentUsage

#entitlement_updated_atTime?

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

Returns:

  • (Time, nil)


367
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 367

optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt

#is_grantedBoolean

Returns:

  • (Boolean)


333
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 333

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

#typeSymbol, :CREDIT

Returns:

  • (Symbol, :CREDIT)


338
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 338

required :type, const: :CREDIT

#usage_limitFloat

Returns:

  • (Float)


343
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 343

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)


373
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 373

optional :usage_period_end, Time, api_name: :usagePeriodEnd

#usage_updated_atTime

Timestamp of the last update to the credit usage.

Returns:

  • (Time)


349
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 349

required :usage_updated_at, Time, api_name: :usageUpdatedAt

#valid_untilTime?

The next time the entitlement should be recalculated

Returns:

  • (Time, nil)


379
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 379

optional :valid_until, Time, api_name: :validUntil

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 429