dodopayments 2.8.1 → 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 +17 -0
- data/README.md +1 -1
- data/lib/dodopayments/client.rb +4 -0
- data/lib/dodopayments/models/attach_product_entitlement.rb +22 -0
- data/lib/dodopayments/models/cancellation_feedback.rb +21 -0
- data/lib/dodopayments/models/checkout_session_flags.rb +12 -1
- data/lib/dodopayments/models/checkout_session_request.rb +14 -1
- data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +1 -0
- data/lib/dodopayments/models/credit_overage_reset_webhook_event.rb +52 -0
- data/lib/dodopayments/models/customer_list_entitlements_params.rb +20 -0
- data/lib/dodopayments/models/customer_list_entitlements_response.rb +105 -0
- data/lib/dodopayments/models/digital_product_delivery.rb +19 -14
- data/lib/dodopayments/models/digital_product_delivery_file.rb +40 -9
- data/lib/dodopayments/models/entitlement.rb +97 -0
- data/lib/dodopayments/models/entitlement_create_params.rb +54 -0
- data/lib/dodopayments/models/entitlement_delete_params.rb +20 -0
- data/lib/dodopayments/models/entitlement_grant_created_webhook_event.rb +56 -0
- data/lib/dodopayments/models/entitlement_grant_delivered_webhook_event.rb +56 -0
- data/lib/dodopayments/models/entitlement_grant_failed_webhook_event.rb +56 -0
- data/lib/dodopayments/models/entitlement_grant_revoked_webhook_event.rb +56 -0
- data/lib/dodopayments/models/entitlement_integration_type.rb +21 -0
- data/lib/dodopayments/models/entitlement_list_params.rb +55 -0
- data/lib/dodopayments/models/entitlement_retrieve_params.rb +20 -0
- data/lib/dodopayments/models/entitlement_update_params.rb +54 -0
- data/lib/dodopayments/models/entitlements/entitlement_grant.rb +190 -0
- data/lib/dodopayments/models/entitlements/file_delete_params.rb +28 -0
- data/lib/dodopayments/models/entitlements/file_upload_params.rb +22 -0
- data/lib/dodopayments/models/entitlements/file_upload_response.rb +23 -0
- data/lib/dodopayments/models/entitlements/grant_list_params.rb +68 -0
- data/lib/dodopayments/models/entitlements/grant_revoke_params.rb +28 -0
- data/lib/dodopayments/models/entitlements/license_key_grant.rb +45 -0
- data/lib/dodopayments/models/integration_config.rb +217 -0
- data/lib/dodopayments/models/integration_config_response.rb +278 -0
- data/lib/dodopayments/models/license_key_instance_list_params.rb +9 -1
- data/lib/dodopayments/models/one_time_product_cart_item.rb +15 -1
- data/lib/dodopayments/models/payment.rb +19 -3
- data/lib/dodopayments/models/payment_create_params.rb +23 -35
- data/lib/dodopayments/models/payment_create_response.rb +3 -33
- data/lib/dodopayments/models/product.rb +10 -217
- data/lib/dodopayments/models/product_create_params.rb +25 -6
- data/lib/dodopayments/models/product_entitlement_summary.rb +57 -0
- data/lib/dodopayments/models/product_list_response.rb +3 -218
- data/lib/dodopayments/models/product_update_params.rb +21 -7
- data/lib/dodopayments/models/scheduled_plan_change.rb +99 -0
- data/lib/dodopayments/models/subscription.rb +20 -102
- data/lib/dodopayments/models/subscription_create_params.rb +27 -37
- data/lib/dodopayments/models/subscription_create_response.rb +19 -3
- data/lib/dodopayments/models/subscription_list_response.rb +3 -103
- data/lib/dodopayments/models/subscription_update_params.rb +23 -1
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +11 -1
- data/lib/dodopayments/models/unwrap_webhook_event.rb +11 -1
- data/lib/dodopayments/models/update_subscription_plan_req.rb +10 -1
- data/lib/dodopayments/models/webhook_event_type.rb +1 -0
- data/lib/dodopayments/models/webhook_payload.rb +6 -153
- data/lib/dodopayments/models.rb +40 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/customers.rb +20 -0
- data/lib/dodopayments/resources/entitlements/files.rb +63 -0
- data/lib/dodopayments/resources/entitlements/grants.rb +76 -0
- data/lib/dodopayments/resources/entitlements.rb +153 -0
- data/lib/dodopayments/resources/license_key_instances.rb +3 -1
- data/lib/dodopayments/resources/payments.rb +6 -2
- data/lib/dodopayments/resources/products.rb +4 -4
- data/lib/dodopayments/resources/subscriptions.rb +20 -5
- data/lib/dodopayments/resources/webhooks.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +30 -0
- data/rbi/dodopayments/client.rbi +3 -0
- data/rbi/dodopayments/models/attach_product_entitlement.rbi +35 -0
- data/rbi/dodopayments/models/cancellation_feedback.rbi +45 -0
- data/rbi/dodopayments/models/checkout_session_flags.rbi +20 -3
- data/rbi/dodopayments/models/checkout_session_request.rbi +18 -0
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +5 -0
- data/rbi/dodopayments/models/credit_overage_reset_webhook_event.rbi +103 -0
- data/rbi/dodopayments/models/customer_list_entitlements_params.rbi +38 -0
- data/rbi/dodopayments/models/customer_list_entitlements_response.rbi +189 -0
- data/rbi/dodopayments/models/digital_product_delivery.rbi +16 -18
- data/rbi/dodopayments/models/digital_product_delivery_file.rbi +51 -8
- data/rbi/dodopayments/models/entitlement.rbi +127 -0
- data/rbi/dodopayments/models/entitlement_create_params.rbi +115 -0
- data/rbi/dodopayments/models/entitlement_delete_params.rbi +38 -0
- data/rbi/dodopayments/models/entitlement_grant_created_webhook_event.rbi +107 -0
- data/rbi/dodopayments/models/entitlement_grant_delivered_webhook_event.rbi +107 -0
- data/rbi/dodopayments/models/entitlement_grant_failed_webhook_event.rbi +106 -0
- data/rbi/dodopayments/models/entitlement_grant_revoked_webhook_event.rbi +107 -0
- data/rbi/dodopayments/models/entitlement_integration_type.rbi +44 -0
- data/rbi/dodopayments/models/entitlement_list_params.rbi +146 -0
- data/rbi/dodopayments/models/entitlement_retrieve_params.rbi +38 -0
- data/rbi/dodopayments/models/entitlement_update_params.rbi +111 -0
- data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +269 -0
- data/rbi/dodopayments/models/entitlements/file_delete_params.rbi +48 -0
- data/rbi/dodopayments/models/entitlements/file_upload_params.rbi +40 -0
- data/rbi/dodopayments/models/entitlements/file_upload_response.rbi +34 -0
- data/rbi/dodopayments/models/entitlements/grant_list_params.rbi +145 -0
- data/rbi/dodopayments/models/entitlements/grant_revoke_params.rbi +48 -0
- data/rbi/dodopayments/models/entitlements/license_key_grant.rbi +68 -0
- data/rbi/dodopayments/models/integration_config.rbi +411 -0
- data/rbi/dodopayments/models/integration_config_response.rbi +531 -0
- data/rbi/dodopayments/models/license_key_instance_list_params.rbi +8 -0
- data/rbi/dodopayments/models/one_time_product_cart_item.rbi +24 -3
- data/rbi/dodopayments/models/payment.rbi +31 -3
- data/rbi/dodopayments/models/payment_create_params.rbi +28 -56
- data/rbi/dodopayments/models/payment_create_response.rbi +3 -68
- data/rbi/dodopayments/models/product.rbi +8 -420
- data/rbi/dodopayments/models/product_create_params.rbi +43 -7
- data/rbi/dodopayments/models/product_entitlement_summary.rbi +88 -0
- data/rbi/dodopayments/models/product_list_response.rbi +3 -430
- data/rbi/dodopayments/models/product_update_params.rbi +35 -9
- data/rbi/dodopayments/models/scheduled_plan_change.rbi +141 -0
- data/rbi/dodopayments/models/subscription.rbi +24 -149
- data/rbi/dodopayments/models/subscription_create_params.rbi +36 -68
- data/rbi/dodopayments/models/subscription_create_response.rbi +47 -3
- data/rbi/dodopayments/models/subscription_list_response.rbi +4 -167
- data/rbi/dodopayments/models/subscription_update_params.rbi +27 -0
- data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/unwrap_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +10 -0
- data/rbi/dodopayments/models/webhook_event_type.rbi +5 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +6 -197
- data/rbi/dodopayments/models.rbi +46 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +16 -0
- data/rbi/dodopayments/resources/customers.rbi +14 -0
- data/rbi/dodopayments/resources/entitlements/files.rbi +45 -0
- data/rbi/dodopayments/resources/entitlements/grants.rbi +63 -0
- data/rbi/dodopayments/resources/entitlements.rbi +143 -0
- data/rbi/dodopayments/resources/license_key_instances.rbi +3 -0
- data/rbi/dodopayments/resources/payments.rbi +10 -2
- data/rbi/dodopayments/resources/products.rbi +34 -7
- data/rbi/dodopayments/resources/subscriptions.rbi +31 -5
- data/rbi/dodopayments/resources/webhooks.rbi +10 -0
- data/sig/dodopayments/client.rbs +2 -0
- data/sig/dodopayments/models/attach_product_entitlement.rbs +13 -0
- data/sig/dodopayments/models/cancellation_feedback.rbs +28 -0
- data/sig/dodopayments/models/checkout_session_flags.rbs +10 -3
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/credit_entitlements/credit_ledger_entry.rbs +2 -0
- data/sig/dodopayments/models/credit_overage_reset_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/customer_list_entitlements_params.rbs +23 -0
- data/sig/dodopayments/models/customer_list_entitlements_response.rbs +95 -0
- data/sig/dodopayments/models/digital_product_delivery.rbs +5 -5
- data/sig/dodopayments/models/digital_product_delivery_file.rbs +32 -5
- data/sig/dodopayments/models/entitlement.rbs +65 -0
- data/sig/dodopayments/models/entitlement_create_params.rbs +48 -0
- data/sig/dodopayments/models/entitlement_delete_params.rbs +23 -0
- data/sig/dodopayments/models/entitlement_grant_created_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/entitlement_grant_delivered_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/entitlement_grant_failed_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/entitlement_grant_revoked_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/entitlement_integration_type.rbs +28 -0
- data/sig/dodopayments/models/entitlement_list_params.rbs +69 -0
- data/sig/dodopayments/models/entitlement_retrieve_params.rbs +23 -0
- data/sig/dodopayments/models/entitlement_update_params.rbs +46 -0
- data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +127 -0
- data/sig/dodopayments/models/entitlements/file_delete_params.rbs +30 -0
- data/sig/dodopayments/models/entitlements/file_upload_params.rbs +25 -0
- data/sig/dodopayments/models/entitlements/file_upload_response.rbs +15 -0
- data/sig/dodopayments/models/entitlements/grant_list_params.rbs +71 -0
- data/sig/dodopayments/models/entitlements/grant_revoke_params.rbs +30 -0
- data/sig/dodopayments/models/entitlements/license_key_grant.rbs +37 -0
- data/sig/dodopayments/models/integration_config.rbs +171 -0
- data/sig/dodopayments/models/integration_config_response.rbs +225 -0
- data/sig/dodopayments/models/license_key_instance_list_params.rbs +10 -1
- data/sig/dodopayments/models/one_time_product_cart_item.rbs +14 -3
- data/sig/dodopayments/models/payment.rbs +16 -4
- data/sig/dodopayments/models/payment_create_params.rbs +16 -27
- data/sig/dodopayments/models/payment_create_response.rbs +4 -27
- data/sig/dodopayments/models/product.rbs +4 -205
- data/sig/dodopayments/models/product_create_params.rbs +4 -4
- data/sig/dodopayments/models/product_entitlement_summary.rbs +40 -0
- data/sig/dodopayments/models/product_list_response.rbs +4 -205
- data/sig/dodopayments/models/product_update_params.rbs +4 -4
- data/sig/dodopayments/models/scheduled_plan_change.rbs +73 -0
- data/sig/dodopayments/models/subscription.rbs +14 -74
- data/sig/dodopayments/models/subscription_create_params.rbs +16 -27
- data/sig/dodopayments/models/subscription_create_response.rbs +16 -4
- data/sig/dodopayments/models/subscription_list_response.rbs +4 -74
- data/sig/dodopayments/models/subscription_update_params.rbs +12 -0
- data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/unwrap_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +5 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -0
- data/sig/dodopayments/models/webhook_payload.rbs +8 -134
- data/sig/dodopayments/models.rbs +40 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/customers.rbs +5 -0
- data/sig/dodopayments/resources/entitlements/files.rbs +20 -0
- data/sig/dodopayments/resources/entitlements/grants.rbs +24 -0
- data/sig/dodopayments/resources/entitlements.rbs +46 -0
- data/sig/dodopayments/resources/license_key_instances.rbs +1 -0
- data/sig/dodopayments/resources/payments.rbs +3 -1
- data/sig/dodopayments/resources/products.rbs +2 -2
- data/sig/dodopayments/resources/subscriptions.rbs +7 -1
- data/sig/dodopayments/resources/webhooks.rbs +10 -0
- metadata +92 -2
data/rbi/dodopayments/models.rbi
CHANGED
|
@@ -29,6 +29,8 @@ module Dodopayments
|
|
|
29
29
|
|
|
30
30
|
AttachExistingCustomer = Dodopayments::Models::AttachExistingCustomer
|
|
31
31
|
|
|
32
|
+
AttachProductEntitlement = Dodopayments::Models::AttachProductEntitlement
|
|
33
|
+
|
|
32
34
|
BalanceLedgerEntry = Dodopayments::Models::BalanceLedgerEntry
|
|
33
35
|
|
|
34
36
|
BalanceRetrieveLedgerParams =
|
|
@@ -48,6 +50,8 @@ module Dodopayments
|
|
|
48
50
|
|
|
49
51
|
BrandUpdateParams = Dodopayments::Models::BrandUpdateParams
|
|
50
52
|
|
|
53
|
+
CancellationFeedback = Dodopayments::Models::CancellationFeedback
|
|
54
|
+
|
|
51
55
|
CbbOverageBehavior = Dodopayments::Models::CbbOverageBehavior
|
|
52
56
|
|
|
53
57
|
CbbProrationBehavior = Dodopayments::Models::CbbProrationBehavior
|
|
@@ -124,6 +128,9 @@ module Dodopayments
|
|
|
124
128
|
CreditOverageChargedWebhookEvent =
|
|
125
129
|
Dodopayments::Models::CreditOverageChargedWebhookEvent
|
|
126
130
|
|
|
131
|
+
CreditOverageResetWebhookEvent =
|
|
132
|
+
Dodopayments::Models::CreditOverageResetWebhookEvent
|
|
133
|
+
|
|
127
134
|
CreditRolledOverWebhookEvent =
|
|
128
135
|
Dodopayments::Models::CreditRolledOverWebhookEvent
|
|
129
136
|
|
|
@@ -144,6 +151,9 @@ module Dodopayments
|
|
|
144
151
|
CustomerListCreditEntitlementsParams =
|
|
145
152
|
Dodopayments::Models::CustomerListCreditEntitlementsParams
|
|
146
153
|
|
|
154
|
+
CustomerListEntitlementsParams =
|
|
155
|
+
Dodopayments::Models::CustomerListEntitlementsParams
|
|
156
|
+
|
|
147
157
|
CustomerListParams = Dodopayments::Models::CustomerListParams
|
|
148
158
|
|
|
149
159
|
CustomerPortalSession = Dodopayments::Models::CustomerPortalSession
|
|
@@ -216,6 +226,34 @@ module Dodopayments
|
|
|
216
226
|
|
|
217
227
|
DunningStartedWebhookEvent = Dodopayments::Models::DunningStartedWebhookEvent
|
|
218
228
|
|
|
229
|
+
Entitlement = Dodopayments::Models::Entitlement
|
|
230
|
+
|
|
231
|
+
EntitlementCreateParams = Dodopayments::Models::EntitlementCreateParams
|
|
232
|
+
|
|
233
|
+
EntitlementDeleteParams = Dodopayments::Models::EntitlementDeleteParams
|
|
234
|
+
|
|
235
|
+
EntitlementGrantCreatedWebhookEvent =
|
|
236
|
+
Dodopayments::Models::EntitlementGrantCreatedWebhookEvent
|
|
237
|
+
|
|
238
|
+
EntitlementGrantDeliveredWebhookEvent =
|
|
239
|
+
Dodopayments::Models::EntitlementGrantDeliveredWebhookEvent
|
|
240
|
+
|
|
241
|
+
EntitlementGrantFailedWebhookEvent =
|
|
242
|
+
Dodopayments::Models::EntitlementGrantFailedWebhookEvent
|
|
243
|
+
|
|
244
|
+
EntitlementGrantRevokedWebhookEvent =
|
|
245
|
+
Dodopayments::Models::EntitlementGrantRevokedWebhookEvent
|
|
246
|
+
|
|
247
|
+
EntitlementIntegrationType = Dodopayments::Models::EntitlementIntegrationType
|
|
248
|
+
|
|
249
|
+
EntitlementListParams = Dodopayments::Models::EntitlementListParams
|
|
250
|
+
|
|
251
|
+
EntitlementRetrieveParams = Dodopayments::Models::EntitlementRetrieveParams
|
|
252
|
+
|
|
253
|
+
Entitlements = Dodopayments::Models::Entitlements
|
|
254
|
+
|
|
255
|
+
EntitlementUpdateParams = Dodopayments::Models::EntitlementUpdateParams
|
|
256
|
+
|
|
219
257
|
Event = Dodopayments::Models::Event
|
|
220
258
|
|
|
221
259
|
EventInput = Dodopayments::Models::EventInput
|
|
@@ -224,6 +262,10 @@ module Dodopayments
|
|
|
224
262
|
|
|
225
263
|
GetDispute = Dodopayments::Models::GetDispute
|
|
226
264
|
|
|
265
|
+
IntegrationConfig = Dodopayments::Models::IntegrationConfig
|
|
266
|
+
|
|
267
|
+
IntegrationConfigResponse = Dodopayments::Models::IntegrationConfigResponse
|
|
268
|
+
|
|
227
269
|
IntentStatus = Dodopayments::Models::IntentStatus
|
|
228
270
|
|
|
229
271
|
Invoices = Dodopayments::Models::Invoices
|
|
@@ -330,6 +372,8 @@ module Dodopayments
|
|
|
330
372
|
|
|
331
373
|
ProductCreateParams = Dodopayments::Models::ProductCreateParams
|
|
332
374
|
|
|
375
|
+
ProductEntitlementSummary = Dodopayments::Models::ProductEntitlementSummary
|
|
376
|
+
|
|
333
377
|
ProductItemReq = Dodopayments::Models::ProductItemReq
|
|
334
378
|
|
|
335
379
|
ProductListParams = Dodopayments::Models::ProductListParams
|
|
@@ -361,6 +405,8 @@ module Dodopayments
|
|
|
361
405
|
RefundSucceededWebhookEvent =
|
|
362
406
|
Dodopayments::Models::RefundSucceededWebhookEvent
|
|
363
407
|
|
|
408
|
+
ScheduledPlanChange = Dodopayments::Models::ScheduledPlanChange
|
|
409
|
+
|
|
364
410
|
Subscription = Dodopayments::Models::Subscription
|
|
365
411
|
|
|
366
412
|
SubscriptionActiveWebhookEvent =
|
|
@@ -25,6 +25,7 @@ module Dodopayments
|
|
|
25
25
|
discount_code: T.nilable(String),
|
|
26
26
|
feature_flags: Dodopayments::CheckoutSessionFlags::OrHash,
|
|
27
27
|
force_3ds: T.nilable(T::Boolean),
|
|
28
|
+
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
28
29
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
29
30
|
minimal_address: T::Boolean,
|
|
30
31
|
payment_method_id: T.nilable(String),
|
|
@@ -66,6 +67,13 @@ module Dodopayments
|
|
|
66
67
|
feature_flags: nil,
|
|
67
68
|
# Override merchant default 3DS behaviour for this session
|
|
68
69
|
force_3ds: nil,
|
|
70
|
+
# Override the merchant-level mandate floor (in INR paise) for INR e-mandates on
|
|
71
|
+
# Indian-card recurring payments. The mandate amount sent to the processor is
|
|
72
|
+
# `max(this_floor, actual_billing_amount)`, so this is effectively the
|
|
73
|
+
# customer-facing authorization ceiling whenever billing is lower. When unset, the
|
|
74
|
+
# merchant setting applies; when that's also unset, the system default of ₹15,000
|
|
75
|
+
# applies.
|
|
76
|
+
mandate_min_amount_inr_paise: nil,
|
|
69
77
|
# Additional metadata associated with the payment. Defaults to empty if not
|
|
70
78
|
# provided.
|
|
71
79
|
metadata: nil,
|
|
@@ -122,6 +130,7 @@ module Dodopayments
|
|
|
122
130
|
discount_code: T.nilable(String),
|
|
123
131
|
feature_flags: Dodopayments::CheckoutSessionFlags::OrHash,
|
|
124
132
|
force_3ds: T.nilable(T::Boolean),
|
|
133
|
+
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
125
134
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
126
135
|
minimal_address: T::Boolean,
|
|
127
136
|
payment_method_id: T.nilable(String),
|
|
@@ -163,6 +172,13 @@ module Dodopayments
|
|
|
163
172
|
feature_flags: nil,
|
|
164
173
|
# Override merchant default 3DS behaviour for this session
|
|
165
174
|
force_3ds: nil,
|
|
175
|
+
# Override the merchant-level mandate floor (in INR paise) for INR e-mandates on
|
|
176
|
+
# Indian-card recurring payments. The mandate amount sent to the processor is
|
|
177
|
+
# `max(this_floor, actual_billing_amount)`, so this is effectively the
|
|
178
|
+
# customer-facing authorization ceiling whenever billing is lower. When unset, the
|
|
179
|
+
# merchant setting applies; when that's also unset, the system default of ₹15,000
|
|
180
|
+
# applies.
|
|
181
|
+
mandate_min_amount_inr_paise: nil,
|
|
166
182
|
# Additional metadata associated with the payment. Defaults to empty if not
|
|
167
183
|
# provided.
|
|
168
184
|
metadata: nil,
|
|
@@ -125,6 +125,20 @@ module Dodopayments
|
|
|
125
125
|
)
|
|
126
126
|
end
|
|
127
127
|
|
|
128
|
+
# List all entitlement grants delivered (or in flight) to a customer.
|
|
129
|
+
sig do
|
|
130
|
+
params(
|
|
131
|
+
customer_id: String,
|
|
132
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
133
|
+
).returns(Dodopayments::Models::CustomerListEntitlementsResponse)
|
|
134
|
+
end
|
|
135
|
+
def list_entitlements(
|
|
136
|
+
# Customer ID
|
|
137
|
+
customer_id,
|
|
138
|
+
request_options: {}
|
|
139
|
+
)
|
|
140
|
+
end
|
|
141
|
+
|
|
128
142
|
sig do
|
|
129
143
|
params(
|
|
130
144
|
customer_id: String,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Entitlements
|
|
6
|
+
class Files
|
|
7
|
+
# Detach a previously-attached file from a `digital_files` entitlement.
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
file_id: String,
|
|
11
|
+
id: String,
|
|
12
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
13
|
+
).void
|
|
14
|
+
end
|
|
15
|
+
def delete(
|
|
16
|
+
# Identifier of the attached file
|
|
17
|
+
file_id,
|
|
18
|
+
# Entitlement Id
|
|
19
|
+
id:,
|
|
20
|
+
request_options: {}
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Attach a file to a `digital_files` entitlement. Per-file size cap: 500 MiB.
|
|
25
|
+
sig do
|
|
26
|
+
params(
|
|
27
|
+
id: String,
|
|
28
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
29
|
+
).returns(Dodopayments::Models::Entitlements::FileUploadResponse)
|
|
30
|
+
end
|
|
31
|
+
def upload(
|
|
32
|
+
# Entitlement Id
|
|
33
|
+
id,
|
|
34
|
+
request_options: {}
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# @api private
|
|
39
|
+
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
40
|
+
def self.new(client:)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Entitlements
|
|
6
|
+
class Grants
|
|
7
|
+
# GET /entitlements/{id}/grants (public API)
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
id: String,
|
|
11
|
+
customer_id: String,
|
|
12
|
+
page_number: Integer,
|
|
13
|
+
page_size: Integer,
|
|
14
|
+
status:
|
|
15
|
+
Dodopayments::Entitlements::GrantListParams::Status::OrSymbol,
|
|
16
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
17
|
+
).returns(
|
|
18
|
+
Dodopayments::Internal::DefaultPageNumberPagination[
|
|
19
|
+
Dodopayments::Entitlements::EntitlementGrant
|
|
20
|
+
]
|
|
21
|
+
)
|
|
22
|
+
end
|
|
23
|
+
def list(
|
|
24
|
+
# Entitlement ID
|
|
25
|
+
id,
|
|
26
|
+
# Filter by customer ID
|
|
27
|
+
customer_id: nil,
|
|
28
|
+
# Page number (default 0)
|
|
29
|
+
page_number: nil,
|
|
30
|
+
# Page size (default 10, max 100)
|
|
31
|
+
page_size: nil,
|
|
32
|
+
# Filter by grant status
|
|
33
|
+
status: nil,
|
|
34
|
+
request_options: {}
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Revoke a single grant. Idempotent: re-revoking an already-revoked grant returns
|
|
39
|
+
# the grant in its current state.
|
|
40
|
+
sig do
|
|
41
|
+
params(
|
|
42
|
+
grant_id: String,
|
|
43
|
+
id: String,
|
|
44
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
45
|
+
).returns(Dodopayments::Entitlements::EntitlementGrant)
|
|
46
|
+
end
|
|
47
|
+
def revoke(
|
|
48
|
+
# Grant ID
|
|
49
|
+
grant_id,
|
|
50
|
+
# Entitlement ID
|
|
51
|
+
id:,
|
|
52
|
+
request_options: {}
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# @api private
|
|
57
|
+
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
58
|
+
def self.new(client:)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class Entitlements
|
|
6
|
+
sig { returns(Dodopayments::Resources::Entitlements::Files) }
|
|
7
|
+
attr_reader :files
|
|
8
|
+
|
|
9
|
+
sig { returns(Dodopayments::Resources::Entitlements::Grants) }
|
|
10
|
+
attr_reader :grants
|
|
11
|
+
|
|
12
|
+
# POST /entitlements
|
|
13
|
+
sig do
|
|
14
|
+
params(
|
|
15
|
+
integration_config:
|
|
16
|
+
T.any(
|
|
17
|
+
Dodopayments::IntegrationConfig::GitHubConfig::OrHash,
|
|
18
|
+
Dodopayments::IntegrationConfig::DiscordConfig::OrHash,
|
|
19
|
+
Dodopayments::IntegrationConfig::TelegramConfig::OrHash,
|
|
20
|
+
Dodopayments::IntegrationConfig::FigmaConfig::OrHash,
|
|
21
|
+
Dodopayments::IntegrationConfig::FramerConfig::OrHash,
|
|
22
|
+
Dodopayments::IntegrationConfig::NotionConfig::OrHash,
|
|
23
|
+
Dodopayments::IntegrationConfig::DigitalFilesConfig::OrHash,
|
|
24
|
+
Dodopayments::IntegrationConfig::LicenseKeyConfig::OrHash
|
|
25
|
+
),
|
|
26
|
+
integration_type: Dodopayments::EntitlementIntegrationType::OrSymbol,
|
|
27
|
+
name: String,
|
|
28
|
+
description: T.nilable(String),
|
|
29
|
+
metadata: T::Hash[Symbol, String],
|
|
30
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
31
|
+
).returns(Dodopayments::Entitlement)
|
|
32
|
+
end
|
|
33
|
+
def create(
|
|
34
|
+
# Platform-specific configuration (validated per integration_type)
|
|
35
|
+
integration_config:,
|
|
36
|
+
# Which platform integration this entitlement uses
|
|
37
|
+
integration_type:,
|
|
38
|
+
# Display name for this entitlement
|
|
39
|
+
name:,
|
|
40
|
+
# Optional description
|
|
41
|
+
description: nil,
|
|
42
|
+
# Additional metadata for the entitlement
|
|
43
|
+
metadata: nil,
|
|
44
|
+
request_options: {}
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# GET /entitlements/{id}
|
|
49
|
+
sig do
|
|
50
|
+
params(
|
|
51
|
+
id: String,
|
|
52
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
53
|
+
).returns(Dodopayments::Entitlement)
|
|
54
|
+
end
|
|
55
|
+
def retrieve(
|
|
56
|
+
# Entitlement ID
|
|
57
|
+
id,
|
|
58
|
+
request_options: {}
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# PATCH /entitlements/{id}
|
|
63
|
+
sig do
|
|
64
|
+
params(
|
|
65
|
+
id: String,
|
|
66
|
+
description: T.nilable(String),
|
|
67
|
+
integration_config:
|
|
68
|
+
T.nilable(
|
|
69
|
+
T.any(
|
|
70
|
+
Dodopayments::IntegrationConfig::GitHubConfig::OrHash,
|
|
71
|
+
Dodopayments::IntegrationConfig::DiscordConfig::OrHash,
|
|
72
|
+
Dodopayments::IntegrationConfig::TelegramConfig::OrHash,
|
|
73
|
+
Dodopayments::IntegrationConfig::FigmaConfig::OrHash,
|
|
74
|
+
Dodopayments::IntegrationConfig::FramerConfig::OrHash,
|
|
75
|
+
Dodopayments::IntegrationConfig::NotionConfig::OrHash,
|
|
76
|
+
Dodopayments::IntegrationConfig::DigitalFilesConfig::OrHash,
|
|
77
|
+
Dodopayments::IntegrationConfig::LicenseKeyConfig::OrHash
|
|
78
|
+
)
|
|
79
|
+
),
|
|
80
|
+
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
81
|
+
name: T.nilable(String),
|
|
82
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
83
|
+
).returns(Dodopayments::Entitlement)
|
|
84
|
+
end
|
|
85
|
+
def update(
|
|
86
|
+
# Entitlement ID
|
|
87
|
+
id,
|
|
88
|
+
description: nil,
|
|
89
|
+
# Integration-specific configuration supplied when creating or updating an
|
|
90
|
+
# entitlement. The shape required matches the entitlement's `integration_type`.
|
|
91
|
+
integration_config: nil,
|
|
92
|
+
metadata: nil,
|
|
93
|
+
name: nil,
|
|
94
|
+
request_options: {}
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# GET /entitlements
|
|
99
|
+
sig do
|
|
100
|
+
params(
|
|
101
|
+
integration_type:
|
|
102
|
+
Dodopayments::EntitlementListParams::IntegrationType::OrSymbol,
|
|
103
|
+
page_number: Integer,
|
|
104
|
+
page_size: Integer,
|
|
105
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
106
|
+
).returns(
|
|
107
|
+
Dodopayments::Internal::DefaultPageNumberPagination[
|
|
108
|
+
Dodopayments::Entitlement
|
|
109
|
+
]
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
def list(
|
|
113
|
+
# Filter by integration type
|
|
114
|
+
integration_type: nil,
|
|
115
|
+
# Page number (default 0)
|
|
116
|
+
page_number: nil,
|
|
117
|
+
# Page size (default 10, max 100)
|
|
118
|
+
page_size: nil,
|
|
119
|
+
request_options: {}
|
|
120
|
+
)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# DELETE /entitlements/{id} (soft-delete)
|
|
124
|
+
sig do
|
|
125
|
+
params(
|
|
126
|
+
id: String,
|
|
127
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
128
|
+
).void
|
|
129
|
+
end
|
|
130
|
+
def delete(
|
|
131
|
+
# Entitlement ID
|
|
132
|
+
id,
|
|
133
|
+
request_options: {}
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @api private
|
|
138
|
+
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
139
|
+
def self.new(client:)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
@@ -33,6 +33,7 @@ module Dodopayments
|
|
|
33
33
|
|
|
34
34
|
sig do
|
|
35
35
|
params(
|
|
36
|
+
grant_id: T.nilable(String),
|
|
36
37
|
license_key_id: T.nilable(String),
|
|
37
38
|
page_number: T.nilable(Integer),
|
|
38
39
|
page_size: T.nilable(Integer),
|
|
@@ -44,6 +45,8 @@ module Dodopayments
|
|
|
44
45
|
)
|
|
45
46
|
end
|
|
46
47
|
def list(
|
|
48
|
+
# Filter instances by entitlement grant ID
|
|
49
|
+
grant_id: nil,
|
|
47
50
|
# Filter by license key ID
|
|
48
51
|
license_key_id: nil,
|
|
49
52
|
# Page number default is 0
|
|
@@ -11,8 +11,8 @@ module Dodopayments
|
|
|
11
11
|
Dodopayments::AttachExistingCustomer::OrHash,
|
|
12
12
|
Dodopayments::NewCustomer::OrHash
|
|
13
13
|
),
|
|
14
|
-
product_cart:
|
|
15
|
-
|
|
14
|
+
product_cart: T::Array[Dodopayments::OneTimeProductCartItem::OrHash],
|
|
15
|
+
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
|
16
16
|
allowed_payment_method_types:
|
|
17
17
|
T.nilable(T::Array[Dodopayments::PaymentMethodTypes::OrSymbol]),
|
|
18
18
|
billing_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
@@ -22,6 +22,7 @@ module Dodopayments
|
|
|
22
22
|
payment_link: T.nilable(T::Boolean),
|
|
23
23
|
payment_method_id: T.nilable(String),
|
|
24
24
|
redirect_immediately: T::Boolean,
|
|
25
|
+
require_phone_number: T::Boolean,
|
|
25
26
|
return_url: T.nilable(String),
|
|
26
27
|
short_link: T.nilable(T::Boolean),
|
|
27
28
|
show_saved_payment_methods: T::Boolean,
|
|
@@ -36,6 +37,9 @@ module Dodopayments
|
|
|
36
37
|
customer:,
|
|
37
38
|
# List of products in the cart. Must contain at least 1 and at most 100 items.
|
|
38
39
|
product_cart:,
|
|
40
|
+
# Whether adaptive currency fees should be included in the price (true) or added
|
|
41
|
+
# on top (false). If not specified, defaults to the business-level setting.
|
|
42
|
+
adaptive_currency_fees_inclusive: nil,
|
|
39
43
|
# List of payment methods allowed during checkout.
|
|
40
44
|
#
|
|
41
45
|
# Customers will **never** see payment methods that are **not** in this list.
|
|
@@ -62,6 +66,10 @@ module Dodopayments
|
|
|
62
66
|
# If true, redirects the customer immediately after payment completion False by
|
|
63
67
|
# default
|
|
64
68
|
redirect_immediately: nil,
|
|
69
|
+
# If true, the customer's phone number is required to create this payment.
|
|
70
|
+
# Typically set alongside `payment_link=true` so merchants can enforce phone
|
|
71
|
+
# collection on the hosted payment page. Defaults to false.
|
|
72
|
+
require_phone_number: nil,
|
|
65
73
|
# Optional URL to redirect the customer after payment. Must be a valid URL if
|
|
66
74
|
# provided.
|
|
67
75
|
return_url: nil,
|
|
@@ -28,7 +28,8 @@ module Dodopayments
|
|
|
28
28
|
T.nilable(
|
|
29
29
|
Dodopayments::ProductCreateParams::DigitalProductDelivery::OrHash
|
|
30
30
|
),
|
|
31
|
-
|
|
31
|
+
entitlements:
|
|
32
|
+
T.nilable(T::Array[Dodopayments::AttachProductEntitlement::OrHash]),
|
|
32
33
|
license_key_activation_message: T.nilable(String),
|
|
33
34
|
license_key_activations_limit: T.nilable(Integer),
|
|
34
35
|
license_key_duration:
|
|
@@ -54,18 +55,33 @@ module Dodopayments
|
|
|
54
55
|
# Optional description of the product
|
|
55
56
|
description: nil,
|
|
56
57
|
# Choose how you would like you digital product delivered
|
|
58
|
+
#
|
|
59
|
+
# deprecated: use entitlements instead
|
|
57
60
|
digital_product_delivery: nil,
|
|
58
|
-
# Optional
|
|
59
|
-
|
|
61
|
+
# Optional entitlements to attach to this product (max 20)
|
|
62
|
+
entitlements: nil,
|
|
60
63
|
# Optional message displayed during license key activation
|
|
64
|
+
#
|
|
65
|
+
# deprecated: use entitlements instead. Ignored when a `license_key` entitlement
|
|
66
|
+
# is attached via the `entitlements` field.
|
|
61
67
|
license_key_activation_message: nil,
|
|
62
68
|
# The number of times the license key can be activated. Must be 0 or greater
|
|
69
|
+
#
|
|
70
|
+
# deprecated: use entitlements instead. Ignored when a `license_key` entitlement
|
|
71
|
+
# is attached via the `entitlements` field.
|
|
63
72
|
license_key_activations_limit: nil,
|
|
64
73
|
# Duration configuration for the license key. Set to null if you don't want the
|
|
65
74
|
# license key to expire. For subscriptions, the lifetime of the license key is
|
|
66
75
|
# tied to the subscription period
|
|
76
|
+
#
|
|
77
|
+
# deprecated: use entitlements instead. Ignored when a `license_key` entitlement
|
|
78
|
+
# is attached via the `entitlements` field.
|
|
67
79
|
license_key_duration: nil,
|
|
68
80
|
# When true, generates and sends a license key to your customer. Defaults to false
|
|
81
|
+
#
|
|
82
|
+
# deprecated: use entitlements instead. If a `license_key` entitlement is also
|
|
83
|
+
# attached via the `entitlements` field, the `license_key_*` config fields below
|
|
84
|
+
# are ignored — the attached entitlement's config is the source of truth.
|
|
69
85
|
license_key_enabled: nil,
|
|
70
86
|
# Additional metadata for the product
|
|
71
87
|
metadata: nil,
|
|
@@ -98,7 +114,8 @@ module Dodopayments
|
|
|
98
114
|
T.nilable(
|
|
99
115
|
Dodopayments::ProductUpdateParams::DigitalProductDelivery::OrHash
|
|
100
116
|
),
|
|
101
|
-
|
|
117
|
+
entitlements:
|
|
118
|
+
T.nilable(T::Array[Dodopayments::AttachProductEntitlement::OrHash]),
|
|
102
119
|
image_id: T.nilable(String),
|
|
103
120
|
license_key_activation_message: T.nilable(String),
|
|
104
121
|
license_key_activations_limit: T.nilable(Integer),
|
|
@@ -130,31 +147,41 @@ module Dodopayments
|
|
|
130
147
|
# Description of the product, optional and must be at most 1000 characters.
|
|
131
148
|
description: nil,
|
|
132
149
|
# Choose how you would like you digital product delivered
|
|
150
|
+
#
|
|
151
|
+
# deprecated: use entitlements instead
|
|
133
152
|
digital_product_delivery: nil,
|
|
134
|
-
#
|
|
135
|
-
#
|
|
136
|
-
|
|
153
|
+
# Entitlements to attach (replaces all existing when present) Send empty array to
|
|
154
|
+
# remove all, omit field to leave unchanged
|
|
155
|
+
entitlements: nil,
|
|
137
156
|
# Product image id after its uploaded to S3
|
|
138
157
|
image_id: nil,
|
|
139
158
|
# Message sent to the customer upon license key activation.
|
|
140
159
|
#
|
|
141
160
|
# Only applicable if `license_key_enabled` is `true`. This message contains
|
|
142
161
|
# instructions for activating the license key.
|
|
162
|
+
#
|
|
163
|
+
# deprecated: use entitlements instead
|
|
143
164
|
license_key_activation_message: nil,
|
|
144
165
|
# Limit for the number of activations for the license key.
|
|
145
166
|
#
|
|
146
167
|
# Only applicable if `license_key_enabled` is `true`. Represents the maximum
|
|
147
168
|
# number of times the license key can be activated.
|
|
169
|
+
#
|
|
170
|
+
# deprecated: use entitlements instead
|
|
148
171
|
license_key_activations_limit: nil,
|
|
149
172
|
# Duration of the license key if enabled.
|
|
150
173
|
#
|
|
151
174
|
# Only applicable if `license_key_enabled` is `true`. Represents the duration in
|
|
152
175
|
# days for which the license key is valid.
|
|
176
|
+
#
|
|
177
|
+
# deprecated: use entitlements instead
|
|
153
178
|
license_key_duration: nil,
|
|
154
179
|
# Whether the product requires a license key.
|
|
155
180
|
#
|
|
156
181
|
# If `true`, additional fields related to license key (duration, activations
|
|
157
182
|
# limit, activation message) become applicable.
|
|
183
|
+
#
|
|
184
|
+
# deprecated: use entitlements instead
|
|
158
185
|
license_key_enabled: nil,
|
|
159
186
|
# Additional metadata for the product
|
|
160
187
|
metadata: nil,
|
|
@@ -19,17 +19,15 @@ module Dodopayments
|
|
|
19
19
|
billing_currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
20
20
|
discount_code: T.nilable(String),
|
|
21
21
|
force_3ds: T.nilable(T::Boolean),
|
|
22
|
+
mandate_min_amount_inr_paise: T.nilable(Integer),
|
|
22
23
|
metadata: T::Hash[Symbol, String],
|
|
23
24
|
on_demand: T.nilable(Dodopayments::OnDemandSubscription::OrHash),
|
|
24
25
|
one_time_product_cart:
|
|
25
|
-
T.nilable(
|
|
26
|
-
T::Array[
|
|
27
|
-
Dodopayments::SubscriptionCreateParams::OneTimeProductCart::OrHash
|
|
28
|
-
]
|
|
29
|
-
),
|
|
26
|
+
T.nilable(T::Array[Dodopayments::OneTimeProductCartItem::OrHash]),
|
|
30
27
|
payment_link: T.nilable(T::Boolean),
|
|
31
28
|
payment_method_id: T.nilable(String),
|
|
32
29
|
redirect_immediately: T::Boolean,
|
|
30
|
+
require_phone_number: T::Boolean,
|
|
33
31
|
return_url: T.nilable(String),
|
|
34
32
|
short_link: T.nilable(T::Boolean),
|
|
35
33
|
show_saved_payment_methods: T::Boolean,
|
|
@@ -63,6 +61,13 @@ module Dodopayments
|
|
|
63
61
|
discount_code: nil,
|
|
64
62
|
# Override merchant default 3DS behaviour for this subscription
|
|
65
63
|
force_3ds: nil,
|
|
64
|
+
# Override the merchant-level mandate floor (in INR paise) for INR e-mandates on
|
|
65
|
+
# Indian-card recurring payments. The mandate amount sent to the processor is
|
|
66
|
+
# `max(this_floor, actual_billing_amount)`, so this is effectively the
|
|
67
|
+
# customer-facing authorization ceiling whenever billing is lower. When unset, the
|
|
68
|
+
# merchant setting applies; when that's also unset, the system default of ₹15,000
|
|
69
|
+
# applies.
|
|
70
|
+
mandate_min_amount_inr_paise: nil,
|
|
66
71
|
# Additional metadata for the subscription Defaults to empty if not specified
|
|
67
72
|
metadata: nil,
|
|
68
73
|
on_demand: nil,
|
|
@@ -78,6 +83,10 @@ module Dodopayments
|
|
|
78
83
|
# If true, redirects the customer immediately after payment completion False by
|
|
79
84
|
# default
|
|
80
85
|
redirect_immediately: nil,
|
|
86
|
+
# If true, the customer's phone number is required to create this subscription.
|
|
87
|
+
# Typically set alongside `payment_link=true` so merchants can enforce phone
|
|
88
|
+
# collection on the hosted payment page. Defaults to false.
|
|
89
|
+
require_phone_number: nil,
|
|
81
90
|
# Optional URL to redirect after successful subscription creation
|
|
82
91
|
return_url: nil,
|
|
83
92
|
# If true, returns a shortened payment link. Defaults to false if not specified.
|
|
@@ -116,6 +125,9 @@ module Dodopayments
|
|
|
116
125
|
T.nilable(
|
|
117
126
|
Dodopayments::SubscriptionUpdateParams::CancelReason::OrSymbol
|
|
118
127
|
),
|
|
128
|
+
cancellation_comment: T.nilable(String),
|
|
129
|
+
cancellation_feedback:
|
|
130
|
+
T.nilable(Dodopayments::CancellationFeedback::OrSymbol),
|
|
119
131
|
credit_entitlement_cart:
|
|
120
132
|
T.nilable(
|
|
121
133
|
T::Array[
|
|
@@ -141,6 +153,12 @@ module Dodopayments
|
|
|
141
153
|
# When set, the subscription will remain active until the end of billing period
|
|
142
154
|
cancel_at_next_billing_date: nil,
|
|
143
155
|
cancel_reason: nil,
|
|
156
|
+
# Free-text cancellation comment (only valid when cancelling or scheduling
|
|
157
|
+
# cancellation).
|
|
158
|
+
cancellation_comment: nil,
|
|
159
|
+
# Customer-supplied churn reason (only valid when cancelling or scheduling
|
|
160
|
+
# cancellation).
|
|
161
|
+
cancellation_feedback: nil,
|
|
144
162
|
# Update credit entitlement cart settings
|
|
145
163
|
credit_entitlement_cart: nil,
|
|
146
164
|
customer_name: nil,
|
|
@@ -211,6 +229,7 @@ module Dodopayments
|
|
|
211
229
|
proration_billing_mode:
|
|
212
230
|
Dodopayments::UpdateSubscriptionPlanReq::ProrationBillingMode::OrSymbol,
|
|
213
231
|
quantity: Integer,
|
|
232
|
+
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
|
214
233
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon::OrHash]),
|
|
215
234
|
discount_code: T.nilable(String),
|
|
216
235
|
effective_at:
|
|
@@ -232,6 +251,9 @@ module Dodopayments
|
|
|
232
251
|
proration_billing_mode:,
|
|
233
252
|
# Number of units to subscribe for. Must be at least 1.
|
|
234
253
|
quantity:,
|
|
254
|
+
# Whether adaptive currency fees should be included in the price (true) or added
|
|
255
|
+
# on top (false). If not specified, uses the subscription's stored setting.
|
|
256
|
+
adaptive_currency_fees_inclusive: nil,
|
|
235
257
|
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
|
236
258
|
# addons
|
|
237
259
|
addons: nil,
|
|
@@ -307,6 +329,7 @@ module Dodopayments
|
|
|
307
329
|
proration_billing_mode:
|
|
308
330
|
Dodopayments::UpdateSubscriptionPlanReq::ProrationBillingMode::OrSymbol,
|
|
309
331
|
quantity: Integer,
|
|
332
|
+
adaptive_currency_fees_inclusive: T.nilable(T::Boolean),
|
|
310
333
|
addons: T.nilable(T::Array[Dodopayments::AttachAddon::OrHash]),
|
|
311
334
|
discount_code: T.nilable(String),
|
|
312
335
|
effective_at:
|
|
@@ -328,6 +351,9 @@ module Dodopayments
|
|
|
328
351
|
proration_billing_mode:,
|
|
329
352
|
# Number of units to subscribe for. Must be at least 1.
|
|
330
353
|
quantity:,
|
|
354
|
+
# Whether adaptive currency fees should be included in the price (true) or added
|
|
355
|
+
# on top (false). If not specified, uses the subscription's stored setting.
|
|
356
|
+
adaptive_currency_fees_inclusive: nil,
|
|
331
357
|
# Addons for the new plan. Note : Leaving this empty would remove any existing
|
|
332
358
|
# addons
|
|
333
359
|
addons: nil,
|