Class: Dodopayments::Models::LicenseKey

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

Overview

Direct Known Subclasses

WebhookPayload::Data::LicenseKey

Defined Under Namespace

Modules: Source

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(id:, business_id:, created_at:, customer_id:, instances_count:, key:, product_id:, source:, status:, activations_limit: nil, expires_at: nil, payment_id: nil, subscription_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Dodopayments::Models::LicenseKey for more details.

Parameters:

  • id (String)

    The unique identifier of the license key.

  • business_id (String)

    The unique identifier of the business associated with the license key.

  • created_at (Time)

    The timestamp indicating when the license key was created, in UTC.

  • customer_id (String)

    The unique identifier of the customer associated with the license key.

  • instances_count (Integer)

    The current number of instances activated for this license key.

  • key (String)

    The license key string.

  • product_id (String)

    The unique identifier of the product associated with the license key.

  • source (Symbol, Dodopayments::Models::LicenseKey::Source)

    The source of the license key - ‘auto’ for keys generated by payment/subscriptio

  • status (Symbol, Dodopayments::Models::LicenseKeyStatus)

    The current status of the license key (e.g., active, inactive, expired).

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

    The maximum number of activations allowed for this license key.

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

    The timestamp indicating when the license key expires, in UTC.

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

    The unique identifier of the payment associated with the license key, if any.

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

    The unique identifier of the subscription associated with the license key, if an



# File 'lib/dodopayments/models/license_key.rb', line 87

Instance Attribute Details

#activations_limitInteger?

The maximum number of activations allowed for this license key.

Returns:

  • (Integer, nil)


66
# File 'lib/dodopayments/models/license_key.rb', line 66

optional :activations_limit, Integer, nil?: true

#business_idString

The unique identifier of the business associated with the license key.

Returns:

  • (String)


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

required :business_id, String

#created_atTime

The timestamp indicating when the license key was created, in UTC.

Returns:

  • (Time)


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

required :created_at, Time

#customer_idString

The unique identifier of the customer associated with the license key.

Returns:

  • (String)


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

required :customer_id, String

#expires_atTime?

The timestamp indicating when the license key expires, in UTC.

Returns:

  • (Time, nil)


72
# File 'lib/dodopayments/models/license_key.rb', line 72

optional :expires_at, Time, nil?: true

#idString

The unique identifier of the license key.

Returns:

  • (String)


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

required :id, String

#instances_countInteger

The current number of instances activated for this license key.

Returns:

  • (Integer)


35
# File 'lib/dodopayments/models/license_key.rb', line 35

required :instances_count, Integer

#keyString

The license key string.

Returns:

  • (String)


41
# File 'lib/dodopayments/models/license_key.rb', line 41

required :key, String

#payment_idString?

The unique identifier of the payment associated with the license key, if any.

Returns:

  • (String, nil)


78
# File 'lib/dodopayments/models/license_key.rb', line 78

optional :payment_id, String, nil?: true

#product_idString

The unique identifier of the product associated with the license key.

Returns:

  • (String)


47
# File 'lib/dodopayments/models/license_key.rb', line 47

required :product_id, String

#sourceSymbol, Dodopayments::Models::LicenseKey::Source

The source of the license key - ‘auto’ for keys generated by payment/subscription flows, ‘import’ for merchant-imported keys.



54
# File 'lib/dodopayments/models/license_key.rb', line 54

required :source, enum: -> { Dodopayments::LicenseKey::Source }

#statusSymbol, Dodopayments::Models::LicenseKeyStatus

The current status of the license key (e.g., active, inactive, expired).



60
# File 'lib/dodopayments/models/license_key.rb', line 60

required :status, enum: -> { Dodopayments::LicenseKeyStatus }

#subscription_idString?

The unique identifier of the subscription associated with the license key, if any.

Returns:

  • (String, nil)


85
# File 'lib/dodopayments/models/license_key.rb', line 85

optional :subscription_id, String, nil?: true