Class: Dodopayments::Models::Entitlements::LicenseKeyGrant

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/dodopayments/models/entitlements/license_key_grant.rb

Instance Attribute 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(activations_used:, key:, activations_limit: nil, expires_at: nil) ⇒ Object

License-key delivery payload, present on grants for ‘license_key` entitlements. The grant’s top-level ‘status` is the source of truth for the grant’s lifecycle.

Parameters:

  • activations_used (Integer)

    Number of activations consumed so far.

  • key (String)

    Issued license key.

  • activations_limit (Integer, nil) (defaults to: nil)

    Maximum activations allowed by the entitlement, when set.

  • expires_at (Time, nil) (defaults to: nil)

    When the license key expires, when applicable.



# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 31

Instance Attribute Details

#activations_limitInteger?

Maximum activations allowed by the entitlement, when set.

Returns:

  • (Integer, nil)


23
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 23

optional :activations_limit, Integer, nil?: true

#activations_usedInteger

Number of activations consumed so far.

Returns:

  • (Integer)


11
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 11

required :activations_used, Integer

#expires_atTime?

When the license key expires, when applicable.

Returns:

  • (Time, nil)


29
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 29

optional :expires_at, Time, nil?: true

#keyString

Issued license key.

Returns:

  • (String)


17
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 17

required :key, String