dodopayments 2.5.0 → 2.7.0
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 +21 -0
- data/README.md +1 -1
- data/lib/dodopayments/internal/util.rb +3 -1
- data/lib/dodopayments/models/discount.rb +8 -1
- data/lib/dodopayments/models/discount_create_params.rb +9 -1
- data/lib/dodopayments/models/discount_update_params.rb +9 -1
- data/lib/dodopayments/models/license_key.rb +33 -10
- data/lib/dodopayments/models/license_key_create_params.rb +54 -0
- data/lib/dodopayments/models/license_key_list_params.rb +20 -1
- data/lib/dodopayments/models/product.rb +228 -1
- data/lib/dodopayments/models/product_create_params.rb +15 -1
- data/lib/dodopayments/models/product_list_response.rb +225 -1
- data/lib/dodopayments/models/product_update_params.rb +16 -1
- data/lib/dodopayments/models/webhook_event_type.rb +4 -0
- data/lib/dodopayments/models/webhook_payload.rb +176 -3
- data/lib/dodopayments/models.rb +2 -0
- data/lib/dodopayments/resources/discounts.rb +6 -2
- data/lib/dodopayments/resources/license_keys.rb +37 -1
- data/lib/dodopayments/resources/products.rb +6 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +1 -0
- data/rbi/dodopayments/models/discount.rbi +6 -0
- data/rbi/dodopayments/models/discount_create_params.rbi +11 -0
- data/rbi/dodopayments/models/discount_update_params.rbi +8 -0
- data/rbi/dodopayments/models/license_key.rbi +39 -8
- data/rbi/dodopayments/models/license_key_create_params.rbi +78 -0
- data/rbi/dodopayments/models/license_key_list_params.rbi +44 -0
- data/rbi/dodopayments/models/product.rbi +425 -0
- data/rbi/dodopayments/models/product_create_params.rbi +8 -0
- data/rbi/dodopayments/models/product_list_response.rbi +436 -0
- data/rbi/dodopayments/models/product_update_params.rbi +10 -0
- data/rbi/dodopayments/models/webhook_event_type.rbi +20 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +267 -4
- data/rbi/dodopayments/models.rbi +2 -0
- data/rbi/dodopayments/resources/discounts.rbi +6 -0
- data/rbi/dodopayments/resources/license_keys.rbi +28 -0
- data/rbi/dodopayments/resources/products.rbi +7 -0
- data/sig/dodopayments/models/discount.rbs +5 -0
- data/sig/dodopayments/models/discount_create_params.rbs +7 -0
- data/sig/dodopayments/models/discount_update_params.rbs +5 -0
- data/sig/dodopayments/models/license_key.rbs +21 -5
- data/sig/dodopayments/models/license_key_create_params.rbs +46 -0
- data/sig/dodopayments/models/license_key_list_params.rbs +20 -0
- data/sig/dodopayments/models/product.rbs +206 -0
- data/sig/dodopayments/models/product_create_params.rbs +5 -0
- data/sig/dodopayments/models/product_list_response.rbs +206 -0
- data/sig/dodopayments/models/product_update_params.rbs +5 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +8 -0
- data/sig/dodopayments/models/webhook_payload.rbs +158 -0
- data/sig/dodopayments/models.rbs +2 -0
- data/sig/dodopayments/resources/discounts.rbs +2 -0
- data/sig/dodopayments/resources/license_keys.rbs +10 -0
- data/sig/dodopayments/resources/products.rbs +2 -0
- metadata +5 -2
|
@@ -8,6 +8,7 @@ module Dodopayments
|
|
|
8
8
|
page_number: Integer,
|
|
9
9
|
page_size: Integer,
|
|
10
10
|
product_id: String,
|
|
11
|
+
source: Dodopayments::Models::LicenseKeyListParams::source,
|
|
11
12
|
status: Dodopayments::Models::LicenseKeyListParams::status
|
|
12
13
|
}
|
|
13
14
|
& Dodopayments::Internal::Type::request_parameters
|
|
@@ -40,6 +41,12 @@ module Dodopayments
|
|
|
40
41
|
|
|
41
42
|
def product_id=: (String) -> String
|
|
42
43
|
|
|
44
|
+
attr_reader source: Dodopayments::Models::LicenseKeyListParams::source?
|
|
45
|
+
|
|
46
|
+
def source=: (
|
|
47
|
+
Dodopayments::Models::LicenseKeyListParams::source
|
|
48
|
+
) -> Dodopayments::Models::LicenseKeyListParams::source
|
|
49
|
+
|
|
43
50
|
attr_reader status: Dodopayments::Models::LicenseKeyListParams::status?
|
|
44
51
|
|
|
45
52
|
def status=: (
|
|
@@ -53,6 +60,7 @@ module Dodopayments
|
|
|
53
60
|
?page_number: Integer,
|
|
54
61
|
?page_size: Integer,
|
|
55
62
|
?product_id: String,
|
|
63
|
+
?source: Dodopayments::Models::LicenseKeyListParams::source,
|
|
56
64
|
?status: Dodopayments::Models::LicenseKeyListParams::status,
|
|
57
65
|
?request_options: Dodopayments::request_opts
|
|
58
66
|
) -> void
|
|
@@ -64,10 +72,22 @@ module Dodopayments
|
|
|
64
72
|
page_number: Integer,
|
|
65
73
|
page_size: Integer,
|
|
66
74
|
product_id: String,
|
|
75
|
+
source: Dodopayments::Models::LicenseKeyListParams::source,
|
|
67
76
|
status: Dodopayments::Models::LicenseKeyListParams::status,
|
|
68
77
|
request_options: Dodopayments::RequestOptions
|
|
69
78
|
}
|
|
70
79
|
|
|
80
|
+
type source = :auto | :import
|
|
81
|
+
|
|
82
|
+
module Source
|
|
83
|
+
extend Dodopayments::Internal::Type::Enum
|
|
84
|
+
|
|
85
|
+
AUTO: :auto
|
|
86
|
+
IMPORT: :import
|
|
87
|
+
|
|
88
|
+
def self?.values: -> ::Array[Dodopayments::Models::LicenseKeyListParams::source]
|
|
89
|
+
end
|
|
90
|
+
|
|
71
91
|
type status = :active | :expired | :disabled
|
|
72
92
|
|
|
73
93
|
module Status
|
|
@@ -6,6 +6,7 @@ module Dodopayments
|
|
|
6
6
|
business_id: String,
|
|
7
7
|
created_at: Time,
|
|
8
8
|
credit_entitlements: ::Array[Dodopayments::CreditEntitlementMappingResponse],
|
|
9
|
+
entitlements: ::Array[Dodopayments::Product::Entitlement],
|
|
9
10
|
is_recurring: bool,
|
|
10
11
|
license_key_enabled: bool,
|
|
11
12
|
metadata: ::Hash[Symbol, String],
|
|
@@ -33,6 +34,8 @@ module Dodopayments
|
|
|
33
34
|
|
|
34
35
|
attr_accessor credit_entitlements: ::Array[Dodopayments::CreditEntitlementMappingResponse]
|
|
35
36
|
|
|
37
|
+
attr_accessor entitlements: ::Array[Dodopayments::Product::Entitlement]
|
|
38
|
+
|
|
36
39
|
attr_accessor is_recurring: bool
|
|
37
40
|
|
|
38
41
|
attr_accessor license_key_enabled: bool
|
|
@@ -70,6 +73,7 @@ module Dodopayments
|
|
|
70
73
|
business_id: String,
|
|
71
74
|
created_at: Time,
|
|
72
75
|
credit_entitlements: ::Array[Dodopayments::CreditEntitlementMappingResponse],
|
|
76
|
+
entitlements: ::Array[Dodopayments::Product::Entitlement],
|
|
73
77
|
is_recurring: bool,
|
|
74
78
|
license_key_enabled: bool,
|
|
75
79
|
metadata: ::Hash[Symbol, String],
|
|
@@ -93,6 +97,7 @@ module Dodopayments
|
|
|
93
97
|
business_id: String,
|
|
94
98
|
created_at: Time,
|
|
95
99
|
credit_entitlements: ::Array[Dodopayments::CreditEntitlementMappingResponse],
|
|
100
|
+
entitlements: ::Array[Dodopayments::Product::Entitlement],
|
|
96
101
|
is_recurring: bool,
|
|
97
102
|
license_key_enabled: bool,
|
|
98
103
|
metadata: ::Hash[Symbol, String],
|
|
@@ -110,6 +115,207 @@ module Dodopayments
|
|
|
110
115
|
name: String?,
|
|
111
116
|
product_collection_id: String?
|
|
112
117
|
}
|
|
118
|
+
|
|
119
|
+
type entitlement =
|
|
120
|
+
{
|
|
121
|
+
id: String,
|
|
122
|
+
integration_config: Dodopayments::Models::Product::Entitlement::integration_config,
|
|
123
|
+
integration_type: Dodopayments::Models::Product::Entitlement::integration_type,
|
|
124
|
+
name: String,
|
|
125
|
+
description: String?
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
class Entitlement < Dodopayments::Internal::Type::BaseModel
|
|
129
|
+
attr_accessor id: String
|
|
130
|
+
|
|
131
|
+
attr_accessor integration_config: Dodopayments::Models::Product::Entitlement::integration_config
|
|
132
|
+
|
|
133
|
+
attr_accessor integration_type: Dodopayments::Models::Product::Entitlement::integration_type
|
|
134
|
+
|
|
135
|
+
attr_accessor name: String
|
|
136
|
+
|
|
137
|
+
attr_accessor description: String?
|
|
138
|
+
|
|
139
|
+
def initialize: (
|
|
140
|
+
id: String,
|
|
141
|
+
integration_config: Dodopayments::Models::Product::Entitlement::integration_config,
|
|
142
|
+
integration_type: Dodopayments::Models::Product::Entitlement::integration_type,
|
|
143
|
+
name: String,
|
|
144
|
+
?description: String?
|
|
145
|
+
) -> void
|
|
146
|
+
|
|
147
|
+
def to_hash: -> {
|
|
148
|
+
id: String,
|
|
149
|
+
integration_config: Dodopayments::Models::Product::Entitlement::integration_config,
|
|
150
|
+
integration_type: Dodopayments::Models::Product::Entitlement::integration_type,
|
|
151
|
+
name: String,
|
|
152
|
+
description: String?
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
type integration_config =
|
|
156
|
+
Dodopayments::Product::Entitlement::IntegrationConfig::GitHubConfig
|
|
157
|
+
| Dodopayments::Product::Entitlement::IntegrationConfig::DiscordConfig
|
|
158
|
+
| Dodopayments::Product::Entitlement::IntegrationConfig::TelegramConfig
|
|
159
|
+
| Dodopayments::Product::Entitlement::IntegrationConfig::FigmaConfig
|
|
160
|
+
| Dodopayments::Product::Entitlement::IntegrationConfig::FramerConfig
|
|
161
|
+
| Dodopayments::Product::Entitlement::IntegrationConfig::NotionConfig
|
|
162
|
+
| Dodopayments::Product::Entitlement::IntegrationConfig::DigitalFilesConfig
|
|
163
|
+
| Dodopayments::Product::Entitlement::IntegrationConfig::LicenseKeyConfig
|
|
164
|
+
|
|
165
|
+
module IntegrationConfig
|
|
166
|
+
extend Dodopayments::Internal::Type::Union
|
|
167
|
+
|
|
168
|
+
type github_config = { permission: String, target_id: String }
|
|
169
|
+
|
|
170
|
+
class GitHubConfig < Dodopayments::Internal::Type::BaseModel
|
|
171
|
+
attr_accessor permission: String
|
|
172
|
+
|
|
173
|
+
attr_accessor target_id: String
|
|
174
|
+
|
|
175
|
+
def initialize: (permission: String, target_id: String) -> void
|
|
176
|
+
|
|
177
|
+
def to_hash: -> { permission: String, target_id: String }
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
type discord_config = { guild_id: String, role_id: String? }
|
|
181
|
+
|
|
182
|
+
class DiscordConfig < Dodopayments::Internal::Type::BaseModel
|
|
183
|
+
attr_accessor guild_id: String
|
|
184
|
+
|
|
185
|
+
attr_accessor role_id: String?
|
|
186
|
+
|
|
187
|
+
def initialize: (guild_id: String, ?role_id: String?) -> void
|
|
188
|
+
|
|
189
|
+
def to_hash: -> { guild_id: String, role_id: String? }
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
type telegram_config = { chat_id: String }
|
|
193
|
+
|
|
194
|
+
class TelegramConfig < Dodopayments::Internal::Type::BaseModel
|
|
195
|
+
attr_accessor chat_id: String
|
|
196
|
+
|
|
197
|
+
def initialize: (chat_id: String) -> void
|
|
198
|
+
|
|
199
|
+
def to_hash: -> { chat_id: String }
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
type figma_config = { figma_file_id: String }
|
|
203
|
+
|
|
204
|
+
class FigmaConfig < Dodopayments::Internal::Type::BaseModel
|
|
205
|
+
attr_accessor figma_file_id: String
|
|
206
|
+
|
|
207
|
+
def initialize: (figma_file_id: String) -> void
|
|
208
|
+
|
|
209
|
+
def to_hash: -> { figma_file_id: String }
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
type framer_config = { framer_template_id: String }
|
|
213
|
+
|
|
214
|
+
class FramerConfig < Dodopayments::Internal::Type::BaseModel
|
|
215
|
+
attr_accessor framer_template_id: String
|
|
216
|
+
|
|
217
|
+
def initialize: (framer_template_id: String) -> void
|
|
218
|
+
|
|
219
|
+
def to_hash: -> { framer_template_id: String }
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
type notion_config = { notion_template_id: String }
|
|
223
|
+
|
|
224
|
+
class NotionConfig < Dodopayments::Internal::Type::BaseModel
|
|
225
|
+
attr_accessor notion_template_id: String
|
|
226
|
+
|
|
227
|
+
def initialize: (notion_template_id: String) -> void
|
|
228
|
+
|
|
229
|
+
def to_hash: -> { notion_template_id: String }
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
type digital_files_config =
|
|
233
|
+
{
|
|
234
|
+
digital_file_ids: ::Array[String],
|
|
235
|
+
external_url: String?,
|
|
236
|
+
instructions: String?
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
class DigitalFilesConfig < Dodopayments::Internal::Type::BaseModel
|
|
240
|
+
attr_accessor digital_file_ids: ::Array[String]
|
|
241
|
+
|
|
242
|
+
attr_accessor external_url: String?
|
|
243
|
+
|
|
244
|
+
attr_accessor instructions: String?
|
|
245
|
+
|
|
246
|
+
def initialize: (
|
|
247
|
+
digital_file_ids: ::Array[String],
|
|
248
|
+
?external_url: String?,
|
|
249
|
+
?instructions: String?
|
|
250
|
+
) -> void
|
|
251
|
+
|
|
252
|
+
def to_hash: -> {
|
|
253
|
+
digital_file_ids: ::Array[String],
|
|
254
|
+
external_url: String?,
|
|
255
|
+
instructions: String?
|
|
256
|
+
}
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
type license_key_config =
|
|
260
|
+
{
|
|
261
|
+
activation_message: String?,
|
|
262
|
+
activations_limit: Integer?,
|
|
263
|
+
duration_count: Integer?,
|
|
264
|
+
duration_interval: String?
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
class LicenseKeyConfig < Dodopayments::Internal::Type::BaseModel
|
|
268
|
+
attr_accessor activation_message: String?
|
|
269
|
+
|
|
270
|
+
attr_accessor activations_limit: Integer?
|
|
271
|
+
|
|
272
|
+
attr_accessor duration_count: Integer?
|
|
273
|
+
|
|
274
|
+
attr_accessor duration_interval: String?
|
|
275
|
+
|
|
276
|
+
def initialize: (
|
|
277
|
+
?activation_message: String?,
|
|
278
|
+
?activations_limit: Integer?,
|
|
279
|
+
?duration_count: Integer?,
|
|
280
|
+
?duration_interval: String?
|
|
281
|
+
) -> void
|
|
282
|
+
|
|
283
|
+
def to_hash: -> {
|
|
284
|
+
activation_message: String?,
|
|
285
|
+
activations_limit: Integer?,
|
|
286
|
+
duration_count: Integer?,
|
|
287
|
+
duration_interval: String?
|
|
288
|
+
}
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
def self?.variants: -> ::Array[Dodopayments::Models::Product::Entitlement::integration_config]
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
type integration_type =
|
|
295
|
+
:discord
|
|
296
|
+
| :telegram
|
|
297
|
+
| :github
|
|
298
|
+
| :figma
|
|
299
|
+
| :framer
|
|
300
|
+
| :notion
|
|
301
|
+
| :digital_files
|
|
302
|
+
| :license_key
|
|
303
|
+
|
|
304
|
+
module IntegrationType
|
|
305
|
+
extend Dodopayments::Internal::Type::Enum
|
|
306
|
+
|
|
307
|
+
DISCORD: :discord
|
|
308
|
+
TELEGRAM: :telegram
|
|
309
|
+
GITHUB: :github
|
|
310
|
+
FIGMA: :figma
|
|
311
|
+
FRAMER: :framer
|
|
312
|
+
NOTION: :notion
|
|
313
|
+
DIGITAL_FILES: :digital_files
|
|
314
|
+
LICENSE_KEY: :license_key
|
|
315
|
+
|
|
316
|
+
def self?.values: -> ::Array[Dodopayments::Models::Product::Entitlement::integration_type]
|
|
317
|
+
end
|
|
318
|
+
end
|
|
113
319
|
end
|
|
114
320
|
end
|
|
115
321
|
end
|
|
@@ -10,6 +10,7 @@ module Dodopayments
|
|
|
10
10
|
credit_entitlements: ::Array[Dodopayments::AttachCreditEntitlement]?,
|
|
11
11
|
description: String?,
|
|
12
12
|
digital_product_delivery: Dodopayments::ProductCreateParams::DigitalProductDelivery?,
|
|
13
|
+
entitlement_ids: ::Array[String]?,
|
|
13
14
|
license_key_activation_message: String?,
|
|
14
15
|
license_key_activations_limit: Integer?,
|
|
15
16
|
license_key_duration: Dodopayments::LicenseKeyDuration?,
|
|
@@ -38,6 +39,8 @@ module Dodopayments
|
|
|
38
39
|
|
|
39
40
|
attr_accessor digital_product_delivery: Dodopayments::ProductCreateParams::DigitalProductDelivery?
|
|
40
41
|
|
|
42
|
+
attr_accessor entitlement_ids: ::Array[String]?
|
|
43
|
+
|
|
41
44
|
attr_accessor license_key_activation_message: String?
|
|
42
45
|
|
|
43
46
|
attr_accessor license_key_activations_limit: Integer?
|
|
@@ -59,6 +62,7 @@ module Dodopayments
|
|
|
59
62
|
?credit_entitlements: ::Array[Dodopayments::AttachCreditEntitlement]?,
|
|
60
63
|
?description: String?,
|
|
61
64
|
?digital_product_delivery: Dodopayments::ProductCreateParams::DigitalProductDelivery?,
|
|
65
|
+
?entitlement_ids: ::Array[String]?,
|
|
62
66
|
?license_key_activation_message: String?,
|
|
63
67
|
?license_key_activations_limit: Integer?,
|
|
64
68
|
?license_key_duration: Dodopayments::LicenseKeyDuration?,
|
|
@@ -76,6 +80,7 @@ module Dodopayments
|
|
|
76
80
|
credit_entitlements: ::Array[Dodopayments::AttachCreditEntitlement]?,
|
|
77
81
|
description: String?,
|
|
78
82
|
digital_product_delivery: Dodopayments::ProductCreateParams::DigitalProductDelivery?,
|
|
83
|
+
entitlement_ids: ::Array[String]?,
|
|
79
84
|
license_key_activation_message: String?,
|
|
80
85
|
license_key_activations_limit: Integer?,
|
|
81
86
|
license_key_duration: Dodopayments::LicenseKeyDuration?,
|
|
@@ -4,6 +4,7 @@ module Dodopayments
|
|
|
4
4
|
{
|
|
5
5
|
business_id: String,
|
|
6
6
|
created_at: Time,
|
|
7
|
+
entitlements: ::Array[Dodopayments::Models::ProductListResponse::Entitlement],
|
|
7
8
|
is_recurring: bool,
|
|
8
9
|
metadata: ::Hash[Symbol, String],
|
|
9
10
|
product_id: String,
|
|
@@ -23,6 +24,8 @@ module Dodopayments
|
|
|
23
24
|
|
|
24
25
|
attr_accessor created_at: Time
|
|
25
26
|
|
|
27
|
+
attr_accessor entitlements: ::Array[Dodopayments::Models::ProductListResponse::Entitlement]
|
|
28
|
+
|
|
26
29
|
attr_accessor is_recurring: bool
|
|
27
30
|
|
|
28
31
|
attr_accessor metadata: ::Hash[Symbol, String]
|
|
@@ -50,6 +53,7 @@ module Dodopayments
|
|
|
50
53
|
def initialize: (
|
|
51
54
|
business_id: String,
|
|
52
55
|
created_at: Time,
|
|
56
|
+
entitlements: ::Array[Dodopayments::Models::ProductListResponse::Entitlement],
|
|
53
57
|
is_recurring: bool,
|
|
54
58
|
metadata: ::Hash[Symbol, String],
|
|
55
59
|
product_id: String,
|
|
@@ -67,6 +71,7 @@ module Dodopayments
|
|
|
67
71
|
def to_hash: -> {
|
|
68
72
|
business_id: String,
|
|
69
73
|
created_at: Time,
|
|
74
|
+
entitlements: ::Array[Dodopayments::Models::ProductListResponse::Entitlement],
|
|
70
75
|
is_recurring: bool,
|
|
71
76
|
metadata: ::Hash[Symbol, String],
|
|
72
77
|
product_id: String,
|
|
@@ -80,6 +85,207 @@ module Dodopayments
|
|
|
80
85
|
price_detail: Dodopayments::Models::price?,
|
|
81
86
|
tax_inclusive: bool?
|
|
82
87
|
}
|
|
88
|
+
|
|
89
|
+
type entitlement =
|
|
90
|
+
{
|
|
91
|
+
id: String,
|
|
92
|
+
integration_config: Dodopayments::Models::ProductListResponse::Entitlement::integration_config,
|
|
93
|
+
integration_type: Dodopayments::Models::ProductListResponse::Entitlement::integration_type,
|
|
94
|
+
name: String,
|
|
95
|
+
description: String?
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
class Entitlement < Dodopayments::Internal::Type::BaseModel
|
|
99
|
+
attr_accessor id: String
|
|
100
|
+
|
|
101
|
+
attr_accessor integration_config: Dodopayments::Models::ProductListResponse::Entitlement::integration_config
|
|
102
|
+
|
|
103
|
+
attr_accessor integration_type: Dodopayments::Models::ProductListResponse::Entitlement::integration_type
|
|
104
|
+
|
|
105
|
+
attr_accessor name: String
|
|
106
|
+
|
|
107
|
+
attr_accessor description: String?
|
|
108
|
+
|
|
109
|
+
def initialize: (
|
|
110
|
+
id: String,
|
|
111
|
+
integration_config: Dodopayments::Models::ProductListResponse::Entitlement::integration_config,
|
|
112
|
+
integration_type: Dodopayments::Models::ProductListResponse::Entitlement::integration_type,
|
|
113
|
+
name: String,
|
|
114
|
+
?description: String?
|
|
115
|
+
) -> void
|
|
116
|
+
|
|
117
|
+
def to_hash: -> {
|
|
118
|
+
id: String,
|
|
119
|
+
integration_config: Dodopayments::Models::ProductListResponse::Entitlement::integration_config,
|
|
120
|
+
integration_type: Dodopayments::Models::ProductListResponse::Entitlement::integration_type,
|
|
121
|
+
name: String,
|
|
122
|
+
description: String?
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
type integration_config =
|
|
126
|
+
Dodopayments::Models::ProductListResponse::Entitlement::IntegrationConfig::GitHubConfig
|
|
127
|
+
| Dodopayments::Models::ProductListResponse::Entitlement::IntegrationConfig::DiscordConfig
|
|
128
|
+
| Dodopayments::Models::ProductListResponse::Entitlement::IntegrationConfig::TelegramConfig
|
|
129
|
+
| Dodopayments::Models::ProductListResponse::Entitlement::IntegrationConfig::FigmaConfig
|
|
130
|
+
| Dodopayments::Models::ProductListResponse::Entitlement::IntegrationConfig::FramerConfig
|
|
131
|
+
| Dodopayments::Models::ProductListResponse::Entitlement::IntegrationConfig::NotionConfig
|
|
132
|
+
| Dodopayments::Models::ProductListResponse::Entitlement::IntegrationConfig::DigitalFilesConfig
|
|
133
|
+
| Dodopayments::Models::ProductListResponse::Entitlement::IntegrationConfig::LicenseKeyConfig
|
|
134
|
+
|
|
135
|
+
module IntegrationConfig
|
|
136
|
+
extend Dodopayments::Internal::Type::Union
|
|
137
|
+
|
|
138
|
+
type github_config = { permission: String, target_id: String }
|
|
139
|
+
|
|
140
|
+
class GitHubConfig < Dodopayments::Internal::Type::BaseModel
|
|
141
|
+
attr_accessor permission: String
|
|
142
|
+
|
|
143
|
+
attr_accessor target_id: String
|
|
144
|
+
|
|
145
|
+
def initialize: (permission: String, target_id: String) -> void
|
|
146
|
+
|
|
147
|
+
def to_hash: -> { permission: String, target_id: String }
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
type discord_config = { guild_id: String, role_id: String? }
|
|
151
|
+
|
|
152
|
+
class DiscordConfig < Dodopayments::Internal::Type::BaseModel
|
|
153
|
+
attr_accessor guild_id: String
|
|
154
|
+
|
|
155
|
+
attr_accessor role_id: String?
|
|
156
|
+
|
|
157
|
+
def initialize: (guild_id: String, ?role_id: String?) -> void
|
|
158
|
+
|
|
159
|
+
def to_hash: -> { guild_id: String, role_id: String? }
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
type telegram_config = { chat_id: String }
|
|
163
|
+
|
|
164
|
+
class TelegramConfig < Dodopayments::Internal::Type::BaseModel
|
|
165
|
+
attr_accessor chat_id: String
|
|
166
|
+
|
|
167
|
+
def initialize: (chat_id: String) -> void
|
|
168
|
+
|
|
169
|
+
def to_hash: -> { chat_id: String }
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
type figma_config = { figma_file_id: String }
|
|
173
|
+
|
|
174
|
+
class FigmaConfig < Dodopayments::Internal::Type::BaseModel
|
|
175
|
+
attr_accessor figma_file_id: String
|
|
176
|
+
|
|
177
|
+
def initialize: (figma_file_id: String) -> void
|
|
178
|
+
|
|
179
|
+
def to_hash: -> { figma_file_id: String }
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
type framer_config = { framer_template_id: String }
|
|
183
|
+
|
|
184
|
+
class FramerConfig < Dodopayments::Internal::Type::BaseModel
|
|
185
|
+
attr_accessor framer_template_id: String
|
|
186
|
+
|
|
187
|
+
def initialize: (framer_template_id: String) -> void
|
|
188
|
+
|
|
189
|
+
def to_hash: -> { framer_template_id: String }
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
type notion_config = { notion_template_id: String }
|
|
193
|
+
|
|
194
|
+
class NotionConfig < Dodopayments::Internal::Type::BaseModel
|
|
195
|
+
attr_accessor notion_template_id: String
|
|
196
|
+
|
|
197
|
+
def initialize: (notion_template_id: String) -> void
|
|
198
|
+
|
|
199
|
+
def to_hash: -> { notion_template_id: String }
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
type digital_files_config =
|
|
203
|
+
{
|
|
204
|
+
digital_file_ids: ::Array[String],
|
|
205
|
+
external_url: String?,
|
|
206
|
+
instructions: String?
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
class DigitalFilesConfig < Dodopayments::Internal::Type::BaseModel
|
|
210
|
+
attr_accessor digital_file_ids: ::Array[String]
|
|
211
|
+
|
|
212
|
+
attr_accessor external_url: String?
|
|
213
|
+
|
|
214
|
+
attr_accessor instructions: String?
|
|
215
|
+
|
|
216
|
+
def initialize: (
|
|
217
|
+
digital_file_ids: ::Array[String],
|
|
218
|
+
?external_url: String?,
|
|
219
|
+
?instructions: String?
|
|
220
|
+
) -> void
|
|
221
|
+
|
|
222
|
+
def to_hash: -> {
|
|
223
|
+
digital_file_ids: ::Array[String],
|
|
224
|
+
external_url: String?,
|
|
225
|
+
instructions: String?
|
|
226
|
+
}
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
type license_key_config =
|
|
230
|
+
{
|
|
231
|
+
activation_message: String?,
|
|
232
|
+
activations_limit: Integer?,
|
|
233
|
+
duration_count: Integer?,
|
|
234
|
+
duration_interval: String?
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
class LicenseKeyConfig < Dodopayments::Internal::Type::BaseModel
|
|
238
|
+
attr_accessor activation_message: String?
|
|
239
|
+
|
|
240
|
+
attr_accessor activations_limit: Integer?
|
|
241
|
+
|
|
242
|
+
attr_accessor duration_count: Integer?
|
|
243
|
+
|
|
244
|
+
attr_accessor duration_interval: String?
|
|
245
|
+
|
|
246
|
+
def initialize: (
|
|
247
|
+
?activation_message: String?,
|
|
248
|
+
?activations_limit: Integer?,
|
|
249
|
+
?duration_count: Integer?,
|
|
250
|
+
?duration_interval: String?
|
|
251
|
+
) -> void
|
|
252
|
+
|
|
253
|
+
def to_hash: -> {
|
|
254
|
+
activation_message: String?,
|
|
255
|
+
activations_limit: Integer?,
|
|
256
|
+
duration_count: Integer?,
|
|
257
|
+
duration_interval: String?
|
|
258
|
+
}
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
def self?.variants: -> ::Array[Dodopayments::Models::ProductListResponse::Entitlement::integration_config]
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
type integration_type =
|
|
265
|
+
:discord
|
|
266
|
+
| :telegram
|
|
267
|
+
| :github
|
|
268
|
+
| :figma
|
|
269
|
+
| :framer
|
|
270
|
+
| :notion
|
|
271
|
+
| :digital_files
|
|
272
|
+
| :license_key
|
|
273
|
+
|
|
274
|
+
module IntegrationType
|
|
275
|
+
extend Dodopayments::Internal::Type::Enum
|
|
276
|
+
|
|
277
|
+
DISCORD: :discord
|
|
278
|
+
TELEGRAM: :telegram
|
|
279
|
+
GITHUB: :github
|
|
280
|
+
FIGMA: :figma
|
|
281
|
+
FRAMER: :framer
|
|
282
|
+
NOTION: :notion
|
|
283
|
+
DIGITAL_FILES: :digital_files
|
|
284
|
+
LICENSE_KEY: :license_key
|
|
285
|
+
|
|
286
|
+
def self?.values: -> ::Array[Dodopayments::Models::ProductListResponse::Entitlement::integration_type]
|
|
287
|
+
end
|
|
288
|
+
end
|
|
83
289
|
end
|
|
84
290
|
end
|
|
85
291
|
end
|
|
@@ -8,6 +8,7 @@ module Dodopayments
|
|
|
8
8
|
credit_entitlements: ::Array[Dodopayments::AttachCreditEntitlement]?,
|
|
9
9
|
description: String?,
|
|
10
10
|
digital_product_delivery: Dodopayments::ProductUpdateParams::DigitalProductDelivery?,
|
|
11
|
+
entitlement_ids: ::Array[String]?,
|
|
11
12
|
image_id: String?,
|
|
12
13
|
license_key_activation_message: String?,
|
|
13
14
|
license_key_activations_limit: Integer?,
|
|
@@ -36,6 +37,8 @@ module Dodopayments
|
|
|
36
37
|
|
|
37
38
|
attr_accessor digital_product_delivery: Dodopayments::ProductUpdateParams::DigitalProductDelivery?
|
|
38
39
|
|
|
40
|
+
attr_accessor entitlement_ids: ::Array[String]?
|
|
41
|
+
|
|
39
42
|
attr_accessor image_id: String?
|
|
40
43
|
|
|
41
44
|
attr_accessor license_key_activation_message: String?
|
|
@@ -61,6 +64,7 @@ module Dodopayments
|
|
|
61
64
|
?credit_entitlements: ::Array[Dodopayments::AttachCreditEntitlement]?,
|
|
62
65
|
?description: String?,
|
|
63
66
|
?digital_product_delivery: Dodopayments::ProductUpdateParams::DigitalProductDelivery?,
|
|
67
|
+
?entitlement_ids: ::Array[String]?,
|
|
64
68
|
?image_id: String?,
|
|
65
69
|
?license_key_activation_message: String?,
|
|
66
70
|
?license_key_activations_limit: Integer?,
|
|
@@ -80,6 +84,7 @@ module Dodopayments
|
|
|
80
84
|
credit_entitlements: ::Array[Dodopayments::AttachCreditEntitlement]?,
|
|
81
85
|
description: String?,
|
|
82
86
|
digital_product_delivery: Dodopayments::ProductUpdateParams::DigitalProductDelivery?,
|
|
87
|
+
entitlement_ids: ::Array[String]?,
|
|
83
88
|
image_id: String?,
|
|
84
89
|
license_key_activation_message: String?,
|
|
85
90
|
license_key_activations_limit: Integer?,
|
|
@@ -42,6 +42,10 @@ module Dodopayments
|
|
|
42
42
|
| :"dunning.recovered"
|
|
43
43
|
| :"acr.email"
|
|
44
44
|
| :"dunning.email"
|
|
45
|
+
| :"entitlement_grant.created"
|
|
46
|
+
| :"entitlement_grant.delivered"
|
|
47
|
+
| :"entitlement_grant.failed"
|
|
48
|
+
| :"entitlement_grant.revoked"
|
|
45
49
|
|
|
46
50
|
module WebhookEventType
|
|
47
51
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -87,6 +91,10 @@ module Dodopayments
|
|
|
87
91
|
DUNNING_RECOVERED: :"dunning.recovered"
|
|
88
92
|
ACR_EMAIL: :"acr.email"
|
|
89
93
|
DUNNING_EMAIL: :"dunning.email"
|
|
94
|
+
ENTITLEMENT_GRANT_CREATED: :"entitlement_grant.created"
|
|
95
|
+
ENTITLEMENT_GRANT_DELIVERED: :"entitlement_grant.delivered"
|
|
96
|
+
ENTITLEMENT_GRANT_FAILED: :"entitlement_grant.failed"
|
|
97
|
+
ENTITLEMENT_GRANT_REVOKED: :"entitlement_grant.revoked"
|
|
90
98
|
|
|
91
99
|
def self?.values: -> ::Array[Dodopayments::Models::webhook_event_type]
|
|
92
100
|
end
|