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

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

Defined Under Namespace

Modules: AccessDeniedReason, ResetPeriod Classes: Chain, Feature

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(current_usage:, entity_id:, is_granted:, usage_limit:) ⇒ Object

Per-entity governance node — limit and current usage for a single resolved entity.

Parameters:

  • current_usage (Float)

    Amount consumed by this entity in the current cadence period.

  • entity_id (String)

    External id of the entity within the customer.

  • is_granted (Boolean)

    Whether this node alone permits the requested usage.

  • usage_limit (Float, nil)

    Hard usage limit for this node; null when no assignment is configured.



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

Instance Attribute Details

#access_denied_reasonSymbol, ...



41
42
43
44
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 41

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

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

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



61
62
63
64
65
66
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 61

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

#current_usageFloat?

Returns:

  • (Float, nil)


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

optional :current_usage, Float, api_name: :currentUsage

#entitlement_updated_atTime?

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

Returns:

  • (Time, nil)


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

optional :entitlement_updated_at, Time, api_name: :entitlementUpdatedAt

#featureStigg::Models::V1::Events::Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature?



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

optional :feature,
-> { Stigg::Models::V1::Events::Beta::Customers::EntitlementCheckResponse::Data::Feature::Feature }

#has_unlimited_usageBoolean?

Returns:

  • (Boolean, nil)


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

optional :has_unlimited_usage, Stigg::Internal::Type::Boolean, api_name: :hasUnlimitedUsage

#is_grantedBoolean

Returns:

  • (Boolean)


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

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

#reset_periodSymbol, ...



93
94
95
96
# File 'lib/stigg/models/v1/events/beta/customers/entitlement_check_response.rb', line 93

optional :reset_period,
enum: -> { Stigg::Models::V1::Events::Beta::Customers::EntitlementCheckResponse::Data::Feature::ResetPeriod },
api_name: :resetPeriod,
nil?: true

#typeSymbol, :FEATURE

Returns:

  • (Symbol, :FEATURE)


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

required :type, const: :FEATURE

#usage_limitFloat?

Returns:

  • (Float, nil)


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

optional :usage_limit, Float, api_name: :usageLimit, nil?: true

#usage_period_anchorTime?

The anchor for calculating the usage period for metered entitlements with a reset period configured

Returns:

  • (Time, nil)


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

optional :usage_period_anchor, Time, api_name: :usagePeriodAnchor

#usage_period_endTime?

The end date of the usage period for metered entitlements with a reset period configured

Returns:

  • (Time, nil)


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

optional :usage_period_end, Time, api_name: :usagePeriodEnd

#usage_period_startTime?

The start date of the usage period for metered entitlements with a reset period configured

Returns:

  • (Time, nil)


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

optional :usage_period_start, Time, api_name: :usagePeriodStart

#valid_untilTime?

The next time the entitlement should be recalculated

Returns:

  • (Time, nil)


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

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 184