Class: Dodopayments::Models::Entitlements::LicenseKeyGrant
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Entitlements::LicenseKeyGrant
- Defined in:
- lib/dodopayments/models/entitlements/license_key_grant.rb,
sig/dodopayments/models/entitlements/license_key_grant.rbs
Instance Attribute Summary collapse
-
#activations_limit ⇒ Integer?
Maximum activations allowed by the entitlement, when set.
-
#activations_used ⇒ Integer
Number of instances currently active.
-
#expires_at ⇒ Time?
When the license key expires, when applicable.
-
#id ⇒ String
Identifier of the issued license key.
-
#key ⇒ String
Issued license key.
-
#status ⇒ Symbol, Dodopayments::Models::LicenseKeyStatus
Current status of the license key.
Instance Method Summary collapse
-
#initialize(id:, activations_used:, key:, status:, activations_limit: nil, expires_at: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see LicenseKeyGrant for more details.
- #to_hash ⇒ {
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(id:, activations_used:, key:, status:, activations_limit: nil, expires_at: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::Entitlements::LicenseKeyGrant for more details.
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.
|
|
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 45
|
Instance Attribute Details
#activations_limit ⇒ Integer?
Maximum activations allowed by the entitlement, when set.
37 |
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 37 optional :activations_limit, Integer, nil?: true |
#activations_used ⇒ Integer
Number of instances currently active. Activation increments it and deactivation decrements it, so it is a live count and not a total.
18 |
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 18 required :activations_used, Integer |
#expires_at ⇒ Time?
When the license key expires, when applicable.
43 |
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 43 optional :expires_at, Time, nil?: true |
#id ⇒ String
Identifier of the issued license key.
11 |
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 11 required :id, String |
#key ⇒ String
Issued license key.
24 |
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 24 required :key, String |
#status ⇒ Symbol, Dodopayments::Models::LicenseKeyStatus
Current status of the license key. Activation fails unless it is active, so a
client can warn before the customer tries.
31 |
# File 'lib/dodopayments/models/entitlements/license_key_grant.rb', line 31 required :status, enum: -> { Dodopayments::LicenseKeyStatus } |
Instance Method Details
#to_hash ⇒ {
36 |
# File 'sig/dodopayments/models/entitlements/license_key_grant.rbs', line 36
def to_hash: -> {
|