dodopayments 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/dodopayments/models/digital_product_delivery.rb +14 -7
- data/lib/dodopayments/models/digital_product_delivery_file.rb +12 -5
- data/lib/dodopayments/models/entitlement.rb +31 -20
- data/lib/dodopayments/models/entitlement_create_params.rb +3 -3
- data/lib/dodopayments/models/entitlement_grant_created_webhook_event.rb +6 -1
- data/lib/dodopayments/models/entitlement_grant_delivered_webhook_event.rb +6 -1
- data/lib/dodopayments/models/entitlement_grant_failed_webhook_event.rb +6 -1
- data/lib/dodopayments/models/entitlement_grant_revoked_webhook_event.rb +6 -1
- data/lib/dodopayments/models/entitlement_update_params.rb +3 -3
- data/lib/dodopayments/models/entitlements/entitlement_grant.rb +50 -32
- data/lib/dodopayments/models/entitlements/file_upload_response.rb +3 -3
- data/lib/dodopayments/models/entitlements/license_key_grant.rb +14 -9
- data/lib/dodopayments/models/integration_config.rb +70 -27
- data/lib/dodopayments/models/integration_config_response.rb +88 -48
- data/lib/dodopayments/models/product.rb +3 -5
- data/lib/dodopayments/models/product_entitlement_summary.rb +5 -5
- data/lib/dodopayments/models/webhook_payload.rb +5 -0
- data/lib/dodopayments/resources/entitlements/files.rb +3 -10
- data/lib/dodopayments/resources/entitlements/grants.rb +2 -4
- data/lib/dodopayments/resources/entitlements.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/rbi/dodopayments/models/digital_product_delivery.rbi +15 -5
- data/rbi/dodopayments/models/digital_product_delivery_file.rbi +11 -0
- data/rbi/dodopayments/models/entitlement.rbi +35 -20
- data/rbi/dodopayments/models/entitlement_create_params.rbi +8 -5
- data/rbi/dodopayments/models/entitlement_grant_created_webhook_event.rbi +4 -0
- data/rbi/dodopayments/models/entitlement_grant_delivered_webhook_event.rbi +4 -0
- data/rbi/dodopayments/models/entitlement_grant_failed_webhook_event.rbi +4 -0
- data/rbi/dodopayments/models/entitlement_grant_revoked_webhook_event.rbi +4 -0
- data/rbi/dodopayments/models/entitlement_update_params.rbi +4 -4
- data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +54 -20
- data/rbi/dodopayments/models/entitlements/file_upload_response.rbi +4 -4
- data/rbi/dodopayments/models/entitlements/license_key_grant.rbi +10 -4
- data/rbi/dodopayments/models/integration_config.rbi +141 -26
- data/rbi/dodopayments/models/integration_config_response.rbi +153 -38
- data/rbi/dodopayments/models/product.rbi +4 -8
- data/rbi/dodopayments/models/product_entitlement_summary.rbi +8 -8
- data/rbi/dodopayments/models/webhook_payload.rbi +2 -0
- data/rbi/dodopayments/resources/entitlements/files.rbi +3 -10
- data/rbi/dodopayments/resources/entitlements/grants.rbi +2 -4
- data/rbi/dodopayments/resources/entitlements.rbi +4 -4
- data/sig/dodopayments/models/entitlement.rbs +8 -10
- data/sig/dodopayments/models/entitlement_create_params.rbs +6 -4
- data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +4 -11
- data/sig/dodopayments/models/integration_config.rbs +28 -4
- data/sig/dodopayments/models/integration_config_response.rbs +28 -9
- data/sig/dodopayments/resources/entitlements.rbs +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc0aa98fdabf63772954ef8a37fa9943640be90e8f5b63b6271d23d7679d347e
|
|
4
|
+
data.tar.gz: 8ad9b63374eed557b79b1ec9469f96f58b05b9f68c695fa413785474ab35e9fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff56943bda78725f9e454cfb3ab1d9ebe09fbb8c01ff0fc54b47edbcf6417d8fb036a0e0e7d01adf8bdbd733089c03198508c97f25897ec3a718f957f478bd43
|
|
7
|
+
data.tar.gz: ca67b58771ea486e6b99f1c0351555c3c527f0535ae5b30dc186ba65adfcb5506d3d8e1cb952158eb5290dde9c7dbab80b175ce392c4143f9b8c632810d3d6ac
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.9.1 (2026-05-04)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.9.0...v2.9.1](https://github.com/dodopayments/dodopayments-ruby/compare/v2.9.0...v2.9.1)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** update openapi spec ([70ea025](https://github.com/dodopayments/dodopayments-ruby/commit/70ea025d3eac9e8d76227be87d301d852d1a3518))
|
|
10
|
+
|
|
3
11
|
## 2.9.0 (2026-04-30)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v2.8.1...v2.9.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.8.1...v2.9.0)
|
data/README.md
CHANGED
|
@@ -4,29 +4,36 @@ module Dodopayments
|
|
|
4
4
|
module Models
|
|
5
5
|
class DigitalProductDelivery < Dodopayments::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute files
|
|
7
|
+
# One entry per attached file.
|
|
7
8
|
#
|
|
8
9
|
# @return [Array<Dodopayments::Models::DigitalProductDeliveryFile>]
|
|
9
10
|
required :files, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::DigitalProductDeliveryFile] }
|
|
10
11
|
|
|
11
12
|
# @!attribute external_url
|
|
13
|
+
# Optional external URL, passed through from the entitlement configuration.
|
|
12
14
|
#
|
|
13
15
|
# @return [String, nil]
|
|
14
16
|
optional :external_url, String, nil?: true
|
|
15
17
|
|
|
16
18
|
# @!attribute instructions
|
|
19
|
+
# Optional human-readable delivery instructions, passed through from the
|
|
20
|
+
# entitlement configuration.
|
|
17
21
|
#
|
|
18
22
|
# @return [String, nil]
|
|
19
23
|
optional :instructions, String, nil?: true
|
|
20
24
|
|
|
21
25
|
# @!method initialize(files:, external_url: nil, instructions: nil)
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
# download URLs; the source (EE service or legacy in-process S3 presigning) is
|
|
25
|
-
# opaque to the caller.
|
|
26
|
+
# Some parameter documentations has been truncated, see
|
|
27
|
+
# {Dodopayments::Models::DigitalProductDelivery} for more details.
|
|
26
28
|
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
#
|
|
29
|
+
# Digital-product-delivery payload, present on grants for `digital_files`
|
|
30
|
+
# entitlements. Each file carries a short-lived presigned download URL.
|
|
31
|
+
#
|
|
32
|
+
# @param files [Array<Dodopayments::Models::DigitalProductDeliveryFile>] One entry per attached file.
|
|
33
|
+
#
|
|
34
|
+
# @param external_url [String, nil] Optional external URL, passed through from the entitlement
|
|
35
|
+
#
|
|
36
|
+
# @param instructions [String, nil] Optional human-readable delivery instructions, passed through from
|
|
30
37
|
end
|
|
31
38
|
end
|
|
32
39
|
end
|
|
@@ -4,6 +4,7 @@ module Dodopayments
|
|
|
4
4
|
module Models
|
|
5
5
|
class DigitalProductDeliveryFile < Dodopayments::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute download_url
|
|
7
|
+
# Short-lived presigned URL for downloading the file.
|
|
7
8
|
#
|
|
8
9
|
# @return [String]
|
|
9
10
|
required :download_url, String
|
|
@@ -15,37 +16,43 @@ module Dodopayments
|
|
|
15
16
|
required :expires_in, Integer
|
|
16
17
|
|
|
17
18
|
# @!attribute file_id
|
|
19
|
+
# Identifier of the attached file.
|
|
18
20
|
#
|
|
19
21
|
# @return [String]
|
|
20
22
|
required :file_id, String
|
|
21
23
|
|
|
22
24
|
# @!attribute filename
|
|
25
|
+
# Original filename of the attached file.
|
|
23
26
|
#
|
|
24
27
|
# @return [String]
|
|
25
28
|
required :filename, String
|
|
26
29
|
|
|
27
30
|
# @!attribute content_type
|
|
31
|
+
# Optional content-type declared at upload.
|
|
28
32
|
#
|
|
29
33
|
# @return [String, nil]
|
|
30
34
|
optional :content_type, String, nil?: true
|
|
31
35
|
|
|
32
36
|
# @!attribute file_size
|
|
37
|
+
# Optional size of the file in bytes.
|
|
33
38
|
#
|
|
34
39
|
# @return [Integer, nil]
|
|
35
40
|
optional :file_size, Integer, nil?: true
|
|
36
41
|
|
|
37
42
|
# @!method initialize(download_url:, expires_in:, file_id:, filename:, content_type: nil, file_size: nil)
|
|
38
|
-
#
|
|
43
|
+
# One file in a digital-product delivery payload.
|
|
44
|
+
#
|
|
45
|
+
# @param download_url [String] Short-lived presigned URL for downloading the file.
|
|
39
46
|
#
|
|
40
47
|
# @param expires_in [Integer] Seconds until `download_url` expires.
|
|
41
48
|
#
|
|
42
|
-
# @param file_id [String]
|
|
49
|
+
# @param file_id [String] Identifier of the attached file.
|
|
43
50
|
#
|
|
44
|
-
# @param filename [String]
|
|
51
|
+
# @param filename [String] Original filename of the attached file.
|
|
45
52
|
#
|
|
46
|
-
# @param content_type [String, nil]
|
|
53
|
+
# @param content_type [String, nil] Optional content-type declared at upload.
|
|
47
54
|
#
|
|
48
|
-
# @param file_size [Integer, nil]
|
|
55
|
+
# @param file_size [Integer, nil] Optional size of the file in bytes.
|
|
49
56
|
end
|
|
50
57
|
end
|
|
51
58
|
end
|
|
@@ -5,82 +5,93 @@ module Dodopayments
|
|
|
5
5
|
# @see Dodopayments::Resources::Entitlements#create
|
|
6
6
|
class Entitlement < Dodopayments::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute id
|
|
8
|
+
# Unique identifier of the entitlement.
|
|
8
9
|
#
|
|
9
10
|
# @return [String]
|
|
10
11
|
required :id, String
|
|
11
12
|
|
|
12
13
|
# @!attribute business_id
|
|
14
|
+
# Identifier of the business that owns this entitlement.
|
|
13
15
|
#
|
|
14
16
|
# @return [String]
|
|
15
17
|
required :business_id, String
|
|
16
18
|
|
|
17
19
|
# @!attribute created_at
|
|
20
|
+
# Timestamp when the entitlement was created.
|
|
18
21
|
#
|
|
19
22
|
# @return [Time]
|
|
20
23
|
required :created_at, Time
|
|
21
24
|
|
|
22
25
|
# @!attribute integration_config
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
# `digital_files` object (resolved download URLs etc.). The persisted JSONB stays
|
|
26
|
-
# ID-only via [`IntegrationConfig`]; this enum is response-only.
|
|
26
|
+
# Integration-specific configuration. For `digital_files` entitlements this
|
|
27
|
+
# includes presigned download URLs for each attached file.
|
|
27
28
|
#
|
|
28
29
|
# @return [Dodopayments::Models::IntegrationConfigResponse::GitHubConfig, Dodopayments::Models::IntegrationConfigResponse::DiscordConfig, Dodopayments::Models::IntegrationConfigResponse::TelegramConfig, Dodopayments::Models::IntegrationConfigResponse::FigmaConfig, Dodopayments::Models::IntegrationConfigResponse::FramerConfig, Dodopayments::Models::IntegrationConfigResponse::NotionConfig, Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig]
|
|
29
30
|
required :integration_config, union: -> { Dodopayments::IntegrationConfigResponse }
|
|
30
31
|
|
|
31
32
|
# @!attribute integration_type
|
|
33
|
+
# Platform integration this entitlement uses.
|
|
32
34
|
#
|
|
33
35
|
# @return [Symbol, Dodopayments::Models::EntitlementIntegrationType]
|
|
34
36
|
required :integration_type, enum: -> { Dodopayments::EntitlementIntegrationType }
|
|
35
37
|
|
|
36
38
|
# @!attribute is_active
|
|
39
|
+
# Always `true` for entitlements returned by the public API; soft-deleted
|
|
40
|
+
# entitlements are not returned.
|
|
37
41
|
#
|
|
38
42
|
# @return [Boolean]
|
|
39
43
|
required :is_active, Dodopayments::Internal::Type::Boolean
|
|
40
44
|
|
|
45
|
+
# @!attribute metadata
|
|
46
|
+
# Arbitrary key-value metadata supplied at creation or via PATCH.
|
|
47
|
+
#
|
|
48
|
+
# @return [Hash{Symbol=>String}]
|
|
49
|
+
required :metadata, Dodopayments::Internal::Type::HashOf[String]
|
|
50
|
+
|
|
41
51
|
# @!attribute name
|
|
52
|
+
# Display name supplied at creation.
|
|
42
53
|
#
|
|
43
54
|
# @return [String]
|
|
44
55
|
required :name, String
|
|
45
56
|
|
|
46
57
|
# @!attribute updated_at
|
|
58
|
+
# Timestamp when the entitlement was last modified.
|
|
47
59
|
#
|
|
48
60
|
# @return [Time]
|
|
49
61
|
required :updated_at, Time
|
|
50
62
|
|
|
51
63
|
# @!attribute description
|
|
64
|
+
# Optional description supplied at creation.
|
|
52
65
|
#
|
|
53
66
|
# @return [String, nil]
|
|
54
67
|
optional :description, String, nil?: true
|
|
55
68
|
|
|
56
|
-
# @!
|
|
57
|
-
#
|
|
58
|
-
# @return [Object, nil]
|
|
59
|
-
optional :metadata, Dodopayments::Internal::Type::Unknown
|
|
60
|
-
|
|
61
|
-
# @!method initialize(id:, business_id:, created_at:, integration_config:, integration_type:, is_active:, name:, updated_at:, description: nil, metadata: nil)
|
|
69
|
+
# @!method initialize(id:, business_id:, created_at:, integration_config:, integration_type:, is_active:, metadata:, name:, updated_at:, description: nil)
|
|
62
70
|
# Some parameter documentations has been truncated, see
|
|
63
71
|
# {Dodopayments::Models::Entitlement} for more details.
|
|
64
72
|
#
|
|
65
|
-
#
|
|
73
|
+
# Detailed view of a single entitlement: identity, integration type,
|
|
74
|
+
# integration-specific configuration, and metadata.
|
|
75
|
+
#
|
|
76
|
+
# @param id [String] Unique identifier of the entitlement.
|
|
66
77
|
#
|
|
67
|
-
# @param business_id [String]
|
|
78
|
+
# @param business_id [String] Identifier of the business that owns this entitlement.
|
|
68
79
|
#
|
|
69
|
-
# @param created_at [Time]
|
|
80
|
+
# @param created_at [Time] Timestamp when the entitlement was created.
|
|
70
81
|
#
|
|
71
|
-
# @param integration_config [Dodopayments::Models::IntegrationConfigResponse::GitHubConfig, Dodopayments::Models::IntegrationConfigResponse::DiscordConfig, Dodopayments::Models::IntegrationConfigResponse::TelegramConfig, Dodopayments::Models::IntegrationConfigResponse::FigmaConfig, Dodopayments::Models::IntegrationConfigResponse::FramerConfig, Dodopayments::Models::IntegrationConfigResponse::NotionConfig, Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig]
|
|
82
|
+
# @param integration_config [Dodopayments::Models::IntegrationConfigResponse::GitHubConfig, Dodopayments::Models::IntegrationConfigResponse::DiscordConfig, Dodopayments::Models::IntegrationConfigResponse::TelegramConfig, Dodopayments::Models::IntegrationConfigResponse::FigmaConfig, Dodopayments::Models::IntegrationConfigResponse::FramerConfig, Dodopayments::Models::IntegrationConfigResponse::NotionConfig, Dodopayments::Models::IntegrationConfigResponse::DigitalFilesConfig, Dodopayments::Models::IntegrationConfigResponse::LicenseKeyConfig] Integration-specific configuration. For `digital_files` entitlements
|
|
72
83
|
#
|
|
73
|
-
# @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType]
|
|
84
|
+
# @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType] Platform integration this entitlement uses.
|
|
74
85
|
#
|
|
75
|
-
# @param is_active [Boolean]
|
|
86
|
+
# @param is_active [Boolean] Always `true` for entitlements returned by the public API;
|
|
76
87
|
#
|
|
77
|
-
# @param
|
|
88
|
+
# @param metadata [Hash{Symbol=>String}] Arbitrary key-value metadata supplied at creation or via PATCH.
|
|
78
89
|
#
|
|
79
|
-
# @param
|
|
90
|
+
# @param name [String] Display name supplied at creation.
|
|
80
91
|
#
|
|
81
|
-
# @param
|
|
92
|
+
# @param updated_at [Time] Timestamp when the entitlement was last modified.
|
|
82
93
|
#
|
|
83
|
-
# @param
|
|
94
|
+
# @param description [String, nil] Optional description supplied at creation.
|
|
84
95
|
end
|
|
85
96
|
end
|
|
86
97
|
end
|
|
@@ -32,10 +32,10 @@ module Dodopayments
|
|
|
32
32
|
optional :description, String, nil?: true
|
|
33
33
|
|
|
34
34
|
# @!attribute metadata
|
|
35
|
-
#
|
|
35
|
+
# Additional metadata for the entitlement
|
|
36
36
|
#
|
|
37
37
|
# @return [Hash{Symbol=>String}, nil]
|
|
38
|
-
optional :metadata, Dodopayments::Internal::Type::HashOf[String]
|
|
38
|
+
optional :metadata, Dodopayments::Internal::Type::HashOf[String]
|
|
39
39
|
|
|
40
40
|
# @!method initialize(integration_config:, integration_type:, name:, description: nil, metadata: nil, request_options: {})
|
|
41
41
|
# @param integration_config [Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig] Platform-specific configuration (validated per integration_type)
|
|
@@ -46,7 +46,7 @@ module Dodopayments
|
|
|
46
46
|
#
|
|
47
47
|
# @param description [String, nil] Optional description
|
|
48
48
|
#
|
|
49
|
-
# @param metadata [Hash{Symbol=>String}
|
|
49
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata for the entitlement
|
|
50
50
|
#
|
|
51
51
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
52
52
|
end
|
|
@@ -10,6 +10,8 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
+
# Detailed view of a single entitlement grant: who it's for, its lifecycle state,
|
|
14
|
+
# and any integration-specific delivery payload.
|
|
13
15
|
#
|
|
14
16
|
# @return [Dodopayments::Models::Entitlements::EntitlementGrant]
|
|
15
17
|
required :data, -> { Dodopayments::Entitlements::EntitlementGrant }
|
|
@@ -27,9 +29,12 @@ module Dodopayments
|
|
|
27
29
|
required :type, enum: -> { Dodopayments::EntitlementGrantCreatedWebhookEvent::Type }
|
|
28
30
|
|
|
29
31
|
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::EntitlementGrantCreatedWebhookEvent} for more details.
|
|
34
|
+
#
|
|
30
35
|
# @param business_id [String] The business identifier
|
|
31
36
|
#
|
|
32
|
-
# @param data [Dodopayments::Models::Entitlements::EntitlementGrant]
|
|
37
|
+
# @param data [Dodopayments::Models::Entitlements::EntitlementGrant] Detailed view of a single entitlement grant: who it's for, its
|
|
33
38
|
#
|
|
34
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
40
|
#
|
|
@@ -10,6 +10,8 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
+
# Detailed view of a single entitlement grant: who it's for, its lifecycle state,
|
|
14
|
+
# and any integration-specific delivery payload.
|
|
13
15
|
#
|
|
14
16
|
# @return [Dodopayments::Models::Entitlements::EntitlementGrant]
|
|
15
17
|
required :data, -> { Dodopayments::Entitlements::EntitlementGrant }
|
|
@@ -27,9 +29,12 @@ module Dodopayments
|
|
|
27
29
|
required :type, enum: -> { Dodopayments::EntitlementGrantDeliveredWebhookEvent::Type }
|
|
28
30
|
|
|
29
31
|
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent} for more details.
|
|
34
|
+
#
|
|
30
35
|
# @param business_id [String] The business identifier
|
|
31
36
|
#
|
|
32
|
-
# @param data [Dodopayments::Models::Entitlements::EntitlementGrant]
|
|
37
|
+
# @param data [Dodopayments::Models::Entitlements::EntitlementGrant] Detailed view of a single entitlement grant: who it's for, its
|
|
33
38
|
#
|
|
34
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
40
|
#
|
|
@@ -10,6 +10,8 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
+
# Detailed view of a single entitlement grant: who it's for, its lifecycle state,
|
|
14
|
+
# and any integration-specific delivery payload.
|
|
13
15
|
#
|
|
14
16
|
# @return [Dodopayments::Models::Entitlements::EntitlementGrant]
|
|
15
17
|
required :data, -> { Dodopayments::Entitlements::EntitlementGrant }
|
|
@@ -27,9 +29,12 @@ module Dodopayments
|
|
|
27
29
|
required :type, enum: -> { Dodopayments::EntitlementGrantFailedWebhookEvent::Type }
|
|
28
30
|
|
|
29
31
|
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::EntitlementGrantFailedWebhookEvent} for more details.
|
|
34
|
+
#
|
|
30
35
|
# @param business_id [String] The business identifier
|
|
31
36
|
#
|
|
32
|
-
# @param data [Dodopayments::Models::Entitlements::EntitlementGrant]
|
|
37
|
+
# @param data [Dodopayments::Models::Entitlements::EntitlementGrant] Detailed view of a single entitlement grant: who it's for, its
|
|
33
38
|
#
|
|
34
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
40
|
#
|
|
@@ -10,6 +10,8 @@ module Dodopayments
|
|
|
10
10
|
required :business_id, String
|
|
11
11
|
|
|
12
12
|
# @!attribute data
|
|
13
|
+
# Detailed view of a single entitlement grant: who it's for, its lifecycle state,
|
|
14
|
+
# and any integration-specific delivery payload.
|
|
13
15
|
#
|
|
14
16
|
# @return [Dodopayments::Models::Entitlements::EntitlementGrant]
|
|
15
17
|
required :data, -> { Dodopayments::Entitlements::EntitlementGrant }
|
|
@@ -27,9 +29,12 @@ module Dodopayments
|
|
|
27
29
|
required :type, enum: -> { Dodopayments::EntitlementGrantRevokedWebhookEvent::Type }
|
|
28
30
|
|
|
29
31
|
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Dodopayments::Models::EntitlementGrantRevokedWebhookEvent} for more details.
|
|
34
|
+
#
|
|
30
35
|
# @param business_id [String] The business identifier
|
|
31
36
|
#
|
|
32
|
-
# @param data [Dodopayments::Models::Entitlements::EntitlementGrant]
|
|
37
|
+
# @param data [Dodopayments::Models::Entitlements::EntitlementGrant] Detailed view of a single entitlement grant: who it's for, its
|
|
33
38
|
#
|
|
34
39
|
# @param timestamp [Time] The timestamp of when the event occurred
|
|
35
40
|
#
|
|
@@ -18,8 +18,8 @@ module Dodopayments
|
|
|
18
18
|
optional :description, String, nil?: true
|
|
19
19
|
|
|
20
20
|
# @!attribute integration_config
|
|
21
|
-
#
|
|
22
|
-
#
|
|
21
|
+
# Integration-specific configuration supplied when creating or updating an
|
|
22
|
+
# entitlement. The shape required matches the entitlement's `integration_type`.
|
|
23
23
|
#
|
|
24
24
|
# @return [Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig, nil]
|
|
25
25
|
optional :integration_config, union: -> { Dodopayments::IntegrationConfig }, nil?: true
|
|
@@ -42,7 +42,7 @@ module Dodopayments
|
|
|
42
42
|
#
|
|
43
43
|
# @param description [String, nil]
|
|
44
44
|
#
|
|
45
|
-
# @param integration_config [Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig, nil]
|
|
45
|
+
# @param integration_config [Dodopayments::Models::IntegrationConfig::GitHubConfig, Dodopayments::Models::IntegrationConfig::DiscordConfig, Dodopayments::Models::IntegrationConfig::TelegramConfig, Dodopayments::Models::IntegrationConfig::FigmaConfig, Dodopayments::Models::IntegrationConfig::FramerConfig, Dodopayments::Models::IntegrationConfig::NotionConfig, Dodopayments::Models::IntegrationConfig::DigitalFilesConfig, Dodopayments::Models::IntegrationConfig::LicenseKeyConfig, nil] Integration-specific configuration supplied when creating or updating
|
|
46
46
|
#
|
|
47
47
|
# @param metadata [Hash{Symbol=>String}, nil]
|
|
48
48
|
#
|
|
@@ -6,152 +6,170 @@ module Dodopayments
|
|
|
6
6
|
# @see Dodopayments::Resources::Entitlements::Grants#list
|
|
7
7
|
class EntitlementGrant < Dodopayments::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute id
|
|
9
|
+
# Unique identifier of the grant.
|
|
9
10
|
#
|
|
10
11
|
# @return [String]
|
|
11
12
|
required :id, String
|
|
12
13
|
|
|
13
14
|
# @!attribute business_id
|
|
15
|
+
# Identifier of the business that owns the grant.
|
|
14
16
|
#
|
|
15
17
|
# @return [String]
|
|
16
18
|
required :business_id, String
|
|
17
19
|
|
|
18
20
|
# @!attribute created_at
|
|
21
|
+
# Timestamp when the grant was created.
|
|
19
22
|
#
|
|
20
23
|
# @return [Time]
|
|
21
24
|
required :created_at, Time
|
|
22
25
|
|
|
23
26
|
# @!attribute customer_id
|
|
27
|
+
# Identifier of the customer the grant was issued to.
|
|
24
28
|
#
|
|
25
29
|
# @return [String]
|
|
26
30
|
required :customer_id, String
|
|
27
31
|
|
|
28
32
|
# @!attribute entitlement_id
|
|
33
|
+
# Identifier of the entitlement this grant was issued from.
|
|
29
34
|
#
|
|
30
35
|
# @return [String]
|
|
31
36
|
required :entitlement_id, String
|
|
32
37
|
|
|
33
|
-
# @!attribute
|
|
38
|
+
# @!attribute metadata
|
|
39
|
+
# Arbitrary key-value metadata recorded on the grant.
|
|
34
40
|
#
|
|
35
|
-
# @return [String]
|
|
36
|
-
required :
|
|
41
|
+
# @return [Hash{Symbol=>String}]
|
|
42
|
+
required :metadata, Dodopayments::Internal::Type::HashOf[String]
|
|
37
43
|
|
|
38
44
|
# @!attribute status
|
|
45
|
+
# Lifecycle status of the grant.
|
|
39
46
|
#
|
|
40
47
|
# @return [Symbol, Dodopayments::Models::Entitlements::EntitlementGrant::Status]
|
|
41
48
|
required :status, enum: -> { Dodopayments::Entitlements::EntitlementGrant::Status }
|
|
42
49
|
|
|
43
50
|
# @!attribute updated_at
|
|
51
|
+
# Timestamp when the grant was last modified.
|
|
44
52
|
#
|
|
45
53
|
# @return [Time]
|
|
46
54
|
required :updated_at, Time
|
|
47
55
|
|
|
48
56
|
# @!attribute delivered_at
|
|
57
|
+
# Timestamp when the grant transitioned to `delivered`, when applicable.
|
|
49
58
|
#
|
|
50
59
|
# @return [Time, nil]
|
|
51
60
|
optional :delivered_at, Time, nil?: true
|
|
52
61
|
|
|
53
62
|
# @!attribute digital_product_delivery
|
|
54
|
-
#
|
|
55
|
-
#
|
|
63
|
+
# Digital-product-delivery payload, present when the entitlement integration is
|
|
64
|
+
# `digital_files`.
|
|
56
65
|
#
|
|
57
66
|
# @return [Dodopayments::Models::DigitalProductDelivery, nil]
|
|
58
67
|
optional :digital_product_delivery, -> { Dodopayments::DigitalProductDelivery }, nil?: true
|
|
59
68
|
|
|
60
69
|
# @!attribute error_code
|
|
70
|
+
# Machine-readable code reported when delivery failed, when applicable.
|
|
61
71
|
#
|
|
62
72
|
# @return [String, nil]
|
|
63
73
|
optional :error_code, String, nil?: true
|
|
64
74
|
|
|
65
75
|
# @!attribute error_message
|
|
76
|
+
# Human-readable message reported when delivery failed, when applicable.
|
|
66
77
|
#
|
|
67
78
|
# @return [String, nil]
|
|
68
79
|
optional :error_message, String, nil?: true
|
|
69
80
|
|
|
70
81
|
# @!attribute license_key
|
|
71
|
-
#
|
|
82
|
+
# License-key delivery payload, present when the entitlement integration is
|
|
83
|
+
# `license_key`.
|
|
72
84
|
#
|
|
73
85
|
# @return [Dodopayments::Models::Entitlements::LicenseKeyGrant, nil]
|
|
74
86
|
optional :license_key, -> { Dodopayments::Entitlements::LicenseKeyGrant }, nil?: true
|
|
75
87
|
|
|
76
|
-
# @!attribute metadata
|
|
77
|
-
#
|
|
78
|
-
# @return [Object, nil]
|
|
79
|
-
optional :metadata, Dodopayments::Internal::Type::Unknown
|
|
80
|
-
|
|
81
88
|
# @!attribute oauth_expires_at
|
|
89
|
+
# Timestamp when `oauth_url` stops being valid, when applicable.
|
|
82
90
|
#
|
|
83
91
|
# @return [Time, nil]
|
|
84
92
|
optional :oauth_expires_at, Time, nil?: true
|
|
85
93
|
|
|
86
94
|
# @!attribute oauth_url
|
|
95
|
+
# Customer-facing OAuth URL for OAuth-style integrations. Populated during the
|
|
96
|
+
# customer-portal accept flow; `null` until the customer completes that step, and
|
|
97
|
+
# on grants for non-OAuth integrations.
|
|
87
98
|
#
|
|
88
99
|
# @return [String, nil]
|
|
89
100
|
optional :oauth_url, String, nil?: true
|
|
90
101
|
|
|
91
102
|
# @!attribute payment_id
|
|
103
|
+
# Identifier of the payment that triggered this grant, when applicable.
|
|
92
104
|
#
|
|
93
105
|
# @return [String, nil]
|
|
94
106
|
optional :payment_id, String, nil?: true
|
|
95
107
|
|
|
96
108
|
# @!attribute revocation_reason
|
|
109
|
+
# Reason recorded when the grant was revoked, when applicable.
|
|
97
110
|
#
|
|
98
111
|
# @return [String, nil]
|
|
99
112
|
optional :revocation_reason, String, nil?: true
|
|
100
113
|
|
|
101
114
|
# @!attribute revoked_at
|
|
115
|
+
# Timestamp when the grant transitioned to `revoked`, when applicable.
|
|
102
116
|
#
|
|
103
117
|
# @return [Time, nil]
|
|
104
118
|
optional :revoked_at, Time, nil?: true
|
|
105
119
|
|
|
106
120
|
# @!attribute subscription_id
|
|
121
|
+
# Identifier of the subscription that triggered this grant, when applicable.
|
|
107
122
|
#
|
|
108
123
|
# @return [String, nil]
|
|
109
124
|
optional :subscription_id, String, nil?: true
|
|
110
125
|
|
|
111
|
-
# @!method initialize(id:, business_id:, created_at:, customer_id:, entitlement_id:,
|
|
126
|
+
# @!method 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)
|
|
112
127
|
# Some parameter documentations has been truncated, see
|
|
113
128
|
# {Dodopayments::Models::Entitlements::EntitlementGrant} for more details.
|
|
114
129
|
#
|
|
115
|
-
#
|
|
130
|
+
# Detailed view of a single entitlement grant: who it's for, its lifecycle state,
|
|
131
|
+
# and any integration-specific delivery payload.
|
|
116
132
|
#
|
|
117
|
-
# @param
|
|
133
|
+
# @param id [String] Unique identifier of the grant.
|
|
118
134
|
#
|
|
119
|
-
# @param
|
|
135
|
+
# @param business_id [String] Identifier of the business that owns the grant.
|
|
120
136
|
#
|
|
121
|
-
# @param
|
|
137
|
+
# @param created_at [Time] Timestamp when the grant was created.
|
|
122
138
|
#
|
|
123
|
-
# @param
|
|
139
|
+
# @param customer_id [String] Identifier of the customer the grant was issued to.
|
|
124
140
|
#
|
|
125
|
-
# @param
|
|
141
|
+
# @param entitlement_id [String] Identifier of the entitlement this grant was issued from.
|
|
126
142
|
#
|
|
127
|
-
# @param
|
|
143
|
+
# @param metadata [Hash{Symbol=>String}] Arbitrary key-value metadata recorded on the grant.
|
|
128
144
|
#
|
|
129
|
-
# @param
|
|
145
|
+
# @param status [Symbol, Dodopayments::Models::Entitlements::EntitlementGrant::Status] Lifecycle status of the grant.
|
|
130
146
|
#
|
|
131
|
-
# @param
|
|
147
|
+
# @param updated_at [Time] Timestamp when the grant was last modified.
|
|
132
148
|
#
|
|
133
|
-
# @param
|
|
149
|
+
# @param delivered_at [Time, nil] Timestamp when the grant transitioned to `delivered`, when applicable.
|
|
134
150
|
#
|
|
135
|
-
# @param
|
|
151
|
+
# @param digital_product_delivery [Dodopayments::Models::DigitalProductDelivery, nil] Digital-product-delivery payload, present when the entitlement
|
|
136
152
|
#
|
|
137
|
-
# @param
|
|
153
|
+
# @param error_code [String, nil] Machine-readable code reported when delivery failed, when applicable.
|
|
138
154
|
#
|
|
139
|
-
# @param
|
|
155
|
+
# @param error_message [String, nil] Human-readable message reported when delivery failed, when applicable.
|
|
140
156
|
#
|
|
141
|
-
# @param
|
|
157
|
+
# @param license_key [Dodopayments::Models::Entitlements::LicenseKeyGrant, nil] License-key delivery payload, present when the entitlement integration
|
|
142
158
|
#
|
|
143
|
-
# @param oauth_expires_at [Time, nil]
|
|
159
|
+
# @param oauth_expires_at [Time, nil] Timestamp when `oauth_url` stops being valid, when applicable.
|
|
144
160
|
#
|
|
145
|
-
# @param oauth_url [String, nil]
|
|
161
|
+
# @param oauth_url [String, nil] Customer-facing OAuth URL for OAuth-style integrations. Populated
|
|
146
162
|
#
|
|
147
|
-
# @param payment_id [String, nil]
|
|
163
|
+
# @param payment_id [String, nil] Identifier of the payment that triggered this grant, when applicable.
|
|
148
164
|
#
|
|
149
|
-
# @param revocation_reason [String, nil]
|
|
165
|
+
# @param revocation_reason [String, nil] Reason recorded when the grant was revoked, when applicable.
|
|
150
166
|
#
|
|
151
|
-
# @param revoked_at [Time, nil]
|
|
167
|
+
# @param revoked_at [Time, nil] Timestamp when the grant transitioned to `revoked`, when applicable.
|
|
152
168
|
#
|
|
153
|
-
# @param subscription_id [String, nil]
|
|
169
|
+
# @param subscription_id [String, nil] Identifier of the subscription that triggered this grant, when applicable.
|
|
154
170
|
|
|
171
|
+
# Lifecycle status of the grant.
|
|
172
|
+
#
|
|
155
173
|
# @see Dodopayments::Models::Entitlements::EntitlementGrant#status
|
|
156
174
|
module Status
|
|
157
175
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -6,8 +6,8 @@ module Dodopayments
|
|
|
6
6
|
# @see Dodopayments::Resources::Entitlements::Files#upload
|
|
7
7
|
class FileUploadResponse < Dodopayments::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute file_id
|
|
9
|
-
#
|
|
10
|
-
# `entitlements.
|
|
9
|
+
# Identifier of the attached file. Pass it to
|
|
10
|
+
# `DELETE /entitlements/{id}/files/{file_id}` to detach the file later.
|
|
11
11
|
#
|
|
12
12
|
# @return [String]
|
|
13
13
|
required :file_id, String
|
|
@@ -16,7 +16,7 @@ module Dodopayments
|
|
|
16
16
|
# Some parameter documentations has been truncated, see
|
|
17
17
|
# {Dodopayments::Models::Entitlements::FileUploadResponse} for more details.
|
|
18
18
|
#
|
|
19
|
-
# @param file_id [String]
|
|
19
|
+
# @param file_id [String] Identifier of the attached file. Pass it to
|
|
20
20
|
end
|
|
21
21
|
end
|
|
22
22
|
end
|