Class: Dodopayments::Models::Entitlements::EntitlementGrant
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Dodopayments::Models::Entitlements::EntitlementGrant
- Defined in:
- lib/dodopayments/models/entitlements/entitlement_grant.rb,
sig/dodopayments/models/entitlements/entitlement_grant.rbs
Overview
Direct Known Subclasses
Defined Under Namespace
Modules: Status
Instance Attribute Summary collapse
-
#brand_id ⇒ String
Brand id this grant belongs to.
-
#business_id ⇒ String
Identifier of the business that owns the grant.
-
#created_at ⇒ Time
Timestamp when the grant was created.
-
#customer_id ⇒ String
Identifier of the customer the grant was issued to.
-
#delivered_at ⇒ Time?
Timestamp when the grant transitioned to
delivered, when applicable. -
#digital_product_delivery ⇒ Dodopayments::Models::DigitalProductDelivery?
Digital-product-delivery payload, present when the entitlement integration is
digital_files. -
#entitlement_id ⇒ String
Identifier of the entitlement this grant was issued from.
-
#error_code ⇒ String?
Machine-readable code reported when delivery failed, when applicable.
-
#error_message ⇒ String?
Human-readable message reported when delivery failed, when applicable.
-
#feature ⇒ Dodopayments::Models::Feature?
Typed feature payload, present only when the entitlement integration is
feature_flag;nullfor every other integration type. -
#id ⇒ String
Unique identifier of the grant.
-
#integration_type ⇒ Symbol, Dodopayments::Models::EntitlementIntegrationType
The integration type of the grant's entitlement (e.g.
license_key). -
#license_key ⇒ Dodopayments::Models::Entitlements::LicenseKeyGrant?
License-key delivery payload, present when the entitlement integration is
license_key. -
#metadata ⇒ Hash{Symbol=>String, Float, Boolean}
Arbitrary key-value metadata recorded on the grant.
-
#oauth_expires_at ⇒ Time?
Timestamp when
oauth_urlstops being valid, when applicable. -
#oauth_url ⇒ String?
Customer-facing OAuth URL for OAuth-style integrations.
-
#payment_id ⇒ String?
Identifier of the payment that triggered this grant, when applicable.
-
#revocation_reason ⇒ String?
Reason recorded when the grant was revoked, when applicable.
-
#revoked_at ⇒ Time?
Timestamp when the grant transitioned to
revoked, when applicable. -
#status ⇒ Symbol, Dodopayments::Models::Entitlements::EntitlementGrant::Status
Lifecycle status of the grant.
-
#subscription_id ⇒ String?
Identifier of the subscription that triggered this grant, when applicable.
-
#updated_at ⇒ Time
Timestamp when the grant was last modified.
Instance Method Summary collapse
-
#initialize(id:, brand_id:, business_id:, created_at:, customer_id:, entitlement_id:, integration_type:, metadata:, status:, updated_at:, delivered_at: nil, digital_product_delivery: nil, error_code: nil, error_message: nil, feature: nil, license_key: nil, oauth_expires_at: nil, oauth_url: nil, payment_id: nil, revocation_reason: nil, revoked_at: nil, subscription_id: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see EntitlementGrant 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:, brand_id:, business_id:, created_at:, customer_id:, entitlement_id:, integration_type:, metadata:, status:, updated_at:, delivered_at: nil, digital_product_delivery: nil, error_code: nil, error_message: nil, feature: nil, license_key: nil, oauth_expires_at: nil, oauth_url: nil, payment_id: nil, revocation_reason: nil, revoked_at: nil, subscription_id: nil) ⇒ Object
Some parameter documentations has been truncated, see Dodopayments::Models::Entitlements::EntitlementGrant for more details.
Detailed view of a single entitlement grant: who it's for, its lifecycle state, and any integration-specific delivery payload.
|
|
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 145
|
Instance Attribute Details
#brand_id ⇒ String
Brand id this grant belongs to.
18 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 18 required :brand_id, String |
#business_id ⇒ String
Identifier of the business that owns the grant.
24 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 24 required :business_id, String |
#created_at ⇒ Time
Timestamp when the grant was created.
30 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 30 required :created_at, Time |
#customer_id ⇒ String
Identifier of the customer the grant was issued to.
36 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 36 required :customer_id, String |
#delivered_at ⇒ Time?
Timestamp when the grant transitioned to delivered, when applicable.
72 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 72 optional :delivered_at, Time, nil?: true |
#digital_product_delivery ⇒ Dodopayments::Models::DigitalProductDelivery?
Digital-product-delivery payload, present when the entitlement integration is
digital_files.
79 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 79 optional :digital_product_delivery, -> { Dodopayments::DigitalProductDelivery }, nil?: true |
#entitlement_id ⇒ String
Identifier of the entitlement this grant was issued from.
42 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 42 required :entitlement_id, String |
#error_code ⇒ String?
Machine-readable code reported when delivery failed, when applicable.
85 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 85 optional :error_code, String, nil?: true |
#error_message ⇒ String?
Human-readable message reported when delivery failed, when applicable.
91 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 91 optional :error_message, String, nil?: true |
#feature ⇒ Dodopayments::Models::Feature?
Typed feature payload, present only when the entitlement integration is
feature_flag; null for every other integration type.
98 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 98 optional :feature, -> { Dodopayments::Feature }, nil?: true |
#id ⇒ String
Unique identifier of the grant.
12 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 12 required :id, String |
#integration_type ⇒ Symbol, Dodopayments::Models::EntitlementIntegrationType
The integration type of the grant's entitlement (e.g. license_key).
48 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 48 required :integration_type, enum: -> { Dodopayments::EntitlementIntegrationType } |
#license_key ⇒ Dodopayments::Models::Entitlements::LicenseKeyGrant?
License-key delivery payload, present when the entitlement integration is
license_key.
105 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 105 optional :license_key, -> { Dodopayments::Entitlements::LicenseKeyGrant }, nil?: true |
#metadata ⇒ Hash{Symbol=>String, Float, Boolean}
Arbitrary key-value metadata recorded on the grant.
54 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 54 required :metadata, -> { Dodopayments::Internal::Type::HashOf[union: Dodopayments::MetadataItem] } |
#oauth_expires_at ⇒ Time?
Timestamp when oauth_url stops being valid, when applicable.
111 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 111 optional :oauth_expires_at, Time, nil?: true |
#oauth_url ⇒ String?
Customer-facing OAuth URL for OAuth-style integrations. Populated during the
customer-portal accept flow; null until the customer completes that step, and
on grants for non-OAuth integrations.
119 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 119 optional :oauth_url, String, nil?: true |
#payment_id ⇒ String?
Identifier of the payment that triggered this grant, when applicable.
125 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 125 optional :payment_id, String, nil?: true |
#revocation_reason ⇒ String?
Reason recorded when the grant was revoked, when applicable.
131 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 131 optional :revocation_reason, String, nil?: true |
#revoked_at ⇒ Time?
Timestamp when the grant transitioned to revoked, when applicable.
137 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 137 optional :revoked_at, Time, nil?: true |
#status ⇒ Symbol, Dodopayments::Models::Entitlements::EntitlementGrant::Status
Lifecycle status of the grant.
60 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 60 required :status, enum: -> { Dodopayments::Entitlements::EntitlementGrant::Status } |
#subscription_id ⇒ String?
Identifier of the subscription that triggered this grant, when applicable.
143 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 143 optional :subscription_id, String, nil?: true |
#updated_at ⇒ Time
Timestamp when the grant was last modified.
66 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 66 required :updated_at, Time |
Instance Method Details
#to_hash ⇒ {
102 |
# File 'sig/dodopayments/models/entitlements/entitlement_grant.rbs', line 102
def to_hash: -> {
|