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
Overview
Direct Known Subclasses
Defined Under Namespace
Modules: Status
Instance Attribute Summary collapse
-
#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.
-
#id ⇒ String
Unique identifier of the grant.
-
#license_key ⇒ Dodopayments::Models::Entitlements::LicenseKeyGrant?
License-key delivery payload, present when the entitlement integration is ‘license_key`.
-
#metadata ⇒ Hash{Symbol=>String}
Arbitrary key-value metadata recorded on the grant.
-
#oauth_expires_at ⇒ Time?
Timestamp when ‘oauth_url` stops 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:, business_id:, created_at:, customer_id:, entitlement_id:, metadata:, status:, updated_at:, delivered_at: nil, digital_product_delivery: nil, error_code: nil, error_message: 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.
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:, entitlement_id:, metadata:, status:, updated_at:, delivered_at: nil, digital_product_delivery: nil, error_code: nil, error_message: 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 126
|
Instance Attribute Details
#business_id ⇒ String
Identifier of the business that owns the grant.
18 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 18 required :business_id, String |
#created_at ⇒ Time
Timestamp when the grant was created.
24 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 24 required :created_at, Time |
#customer_id ⇒ String
Identifier of the customer the grant was issued to.
30 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 30 required :customer_id, String |
#delivered_at ⇒ Time?
Timestamp when the grant transitioned to ‘delivered`, when applicable.
60 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 60 optional :delivered_at, Time, nil?: true |
#digital_product_delivery ⇒ Dodopayments::Models::DigitalProductDelivery?
Digital-product-delivery payload, present when the entitlement integration is ‘digital_files`.
67 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 67 optional :digital_product_delivery, -> { Dodopayments::DigitalProductDelivery }, nil?: true |
#entitlement_id ⇒ String
Identifier of the entitlement this grant was issued from.
36 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 36 required :entitlement_id, String |
#error_code ⇒ String?
Machine-readable code reported when delivery failed, when applicable.
73 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 73 optional :error_code, String, nil?: true |
#error_message ⇒ String?
Human-readable message reported when delivery failed, when applicable.
79 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 79 optional :error_message, String, nil?: true |
#id ⇒ String
Unique identifier of the grant.
12 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 12 required :id, String |
#license_key ⇒ Dodopayments::Models::Entitlements::LicenseKeyGrant?
License-key delivery payload, present when the entitlement integration is ‘license_key`.
86 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 86 optional :license_key, -> { Dodopayments::Entitlements::LicenseKeyGrant }, nil?: true |
#metadata ⇒ Hash{Symbol=>String}
Arbitrary key-value metadata recorded on the grant.
42 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 42 required :metadata, Dodopayments::Internal::Type::HashOf[String] |
#oauth_expires_at ⇒ Time?
Timestamp when ‘oauth_url` stops being valid, when applicable.
92 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 92 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.
100 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 100 optional :oauth_url, String, nil?: true |
#payment_id ⇒ String?
Identifier of the payment that triggered this grant, when applicable.
106 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 106 optional :payment_id, String, nil?: true |
#revocation_reason ⇒ String?
Reason recorded when the grant was revoked, when applicable.
112 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 112 optional :revocation_reason, String, nil?: true |
#revoked_at ⇒ Time?
Timestamp when the grant transitioned to ‘revoked`, when applicable.
118 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 118 optional :revoked_at, Time, nil?: true |
#status ⇒ Symbol, Dodopayments::Models::Entitlements::EntitlementGrant::Status
Lifecycle status of the grant.
48 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 48 required :status, enum: -> { Dodopayments::Entitlements::EntitlementGrant::Status } |
#subscription_id ⇒ String?
Identifier of the subscription that triggered this grant, when applicable.
124 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 124 optional :subscription_id, String, nil?: true |
#updated_at ⇒ Time
Timestamp when the grant was last modified.
54 |
# File 'lib/dodopayments/models/entitlements/entitlement_grant.rb', line 54 required :updated_at, Time |