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
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,22 @@
|
|
|
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
|
+
|
|
11
|
+
## 2.9.0 (2026-04-30)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v2.8.1...v2.9.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.8.1...v2.9.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** added more models to make the dx easy ([93de5ac](https://github.com/dodopayments/dodopayments-ruby/commit/93de5ac30132bece06134c8cba70bfbb8fd201eb))
|
|
18
|
+
* **api:** updated openapi spec to v1.97.5 ([03df817](https://github.com/dodopayments/dodopayments-ruby/commit/03df8177c6704f9f6497cd449cb9ce7fc0429ef2))
|
|
19
|
+
|
|
3
20
|
## 2.8.1 (2026-04-29)
|
|
4
21
|
|
|
5
22
|
Full Changelog: [v2.8.0...v2.8.1](https://github.com/dodopayments/dodopayments-ruby/compare/v2.8.0...v2.8.1)
|
data/README.md
CHANGED
data/lib/dodopayments/client.rb
CHANGED
|
@@ -93,6 +93,9 @@ module Dodopayments
|
|
|
93
93
|
# @return [Dodopayments::Resources::CreditEntitlements]
|
|
94
94
|
attr_reader :credit_entitlements
|
|
95
95
|
|
|
96
|
+
# @return [Dodopayments::Resources::Entitlements]
|
|
97
|
+
attr_reader :entitlements
|
|
98
|
+
|
|
96
99
|
# @api private
|
|
97
100
|
#
|
|
98
101
|
# @return [Hash{String=>String}]
|
|
@@ -191,6 +194,7 @@ module Dodopayments
|
|
|
191
194
|
@meters = Dodopayments::Resources::Meters.new(client: self)
|
|
192
195
|
@balances = Dodopayments::Resources::Balances.new(client: self)
|
|
193
196
|
@credit_entitlements = Dodopayments::Resources::CreditEntitlements.new(client: self)
|
|
197
|
+
@entitlements = Dodopayments::Resources::Entitlements.new(client: self)
|
|
194
198
|
end
|
|
195
199
|
end
|
|
196
200
|
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class AttachProductEntitlement < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute entitlement_id
|
|
7
|
+
# ID of the entitlement to attach to the product
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :entitlement_id, String
|
|
11
|
+
|
|
12
|
+
# @!method initialize(entitlement_id:)
|
|
13
|
+
# Request struct for attaching an entitlement to a product.
|
|
14
|
+
#
|
|
15
|
+
# Mirrors the `credit_entitlements` attach shape — every "attach something to a
|
|
16
|
+
# product" array takes objects, not bare IDs. Uniform shape leaves room for
|
|
17
|
+
# per-attachment settings later without another API break.
|
|
18
|
+
#
|
|
19
|
+
# @param entitlement_id [String] ID of the entitlement to attach to the product
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module CancellationFeedback
|
|
6
|
+
extend Dodopayments::Internal::Type::Enum
|
|
7
|
+
|
|
8
|
+
TOO_EXPENSIVE = :too_expensive
|
|
9
|
+
MISSING_FEATURES = :missing_features
|
|
10
|
+
SWITCHED_SERVICE = :switched_service
|
|
11
|
+
UNUSED = :unused
|
|
12
|
+
CUSTOMER_SERVICE = :customer_service
|
|
13
|
+
LOW_QUALITY = :low_quality
|
|
14
|
+
TOO_COMPLEX = :too_complex
|
|
15
|
+
OTHER = :other
|
|
16
|
+
|
|
17
|
+
# @!method self.values
|
|
18
|
+
# @return [Array<Symbol>]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -92,7 +92,16 @@ module Dodopayments
|
|
|
92
92
|
# @return [Boolean, nil]
|
|
93
93
|
optional :redirect_immediately, Dodopayments::Internal::Type::Boolean
|
|
94
94
|
|
|
95
|
-
# @!
|
|
95
|
+
# @!attribute require_phone_number
|
|
96
|
+
# If true, the customer must provide a phone number to complete checkout. Requires
|
|
97
|
+
# `allow_phone_number_collection` to also be true.
|
|
98
|
+
#
|
|
99
|
+
# Default is false
|
|
100
|
+
#
|
|
101
|
+
# @return [Boolean, nil]
|
|
102
|
+
optional :require_phone_number, Dodopayments::Internal::Type::Boolean
|
|
103
|
+
|
|
104
|
+
# @!method initialize(allow_currency_selection: nil, allow_customer_editing_city: nil, allow_customer_editing_country: nil, allow_customer_editing_email: nil, allow_customer_editing_name: nil, allow_customer_editing_state: nil, allow_customer_editing_street: nil, allow_customer_editing_tax_id: nil, allow_customer_editing_zipcode: nil, allow_discount_code: nil, allow_phone_number_collection: nil, allow_tax_id: nil, always_create_new_customer: nil, redirect_immediately: nil, require_phone_number: nil)
|
|
96
105
|
# Some parameter documentations has been truncated, see
|
|
97
106
|
# {Dodopayments::Models::CheckoutSessionFlags} for more details.
|
|
98
107
|
#
|
|
@@ -123,6 +132,8 @@ module Dodopayments
|
|
|
123
132
|
# @param always_create_new_customer [Boolean] Set to true if a new customer object should be created.
|
|
124
133
|
#
|
|
125
134
|
# @param redirect_immediately [Boolean] If true, redirects the customer immediately after payment completion
|
|
135
|
+
#
|
|
136
|
+
# @param require_phone_number [Boolean] If true, the customer must provide a phone number to complete checkout.
|
|
126
137
|
end
|
|
127
138
|
end
|
|
128
139
|
end
|
|
@@ -83,6 +83,17 @@ module Dodopayments
|
|
|
83
83
|
# @return [Boolean, nil]
|
|
84
84
|
optional :force_3ds, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
85
85
|
|
|
86
|
+
# @!attribute mandate_min_amount_inr_paise
|
|
87
|
+
# Override the merchant-level mandate floor (in INR paise) for INR e-mandates on
|
|
88
|
+
# Indian-card recurring payments. The mandate amount sent to the processor is
|
|
89
|
+
# `max(this_floor, actual_billing_amount)`, so this is effectively the
|
|
90
|
+
# customer-facing authorization ceiling whenever billing is lower. When unset, the
|
|
91
|
+
# merchant setting applies; when that's also unset, the system default of ₹15,000
|
|
92
|
+
# applies.
|
|
93
|
+
#
|
|
94
|
+
# @return [Integer, nil]
|
|
95
|
+
optional :mandate_min_amount_inr_paise, Integer, nil?: true
|
|
96
|
+
|
|
86
97
|
# @!attribute metadata
|
|
87
98
|
# Additional metadata associated with the payment. Defaults to empty if not
|
|
88
99
|
# provided.
|
|
@@ -140,7 +151,7 @@ module Dodopayments
|
|
|
140
151
|
# @return [String, nil]
|
|
141
152
|
optional :tax_id, String, nil?: true
|
|
142
153
|
|
|
143
|
-
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil)
|
|
154
|
+
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: nil, cancel_url: nil, confirm: nil, custom_fields: nil, customer: nil, customization: nil, discount_code: nil, feature_flags: nil, force_3ds: nil, mandate_min_amount_inr_paise: nil, metadata: nil, minimal_address: nil, payment_method_id: nil, product_collection_id: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, subscription_data: nil, tax_id: nil)
|
|
144
155
|
# Some parameter documentations has been truncated, see
|
|
145
156
|
# {Dodopayments::Models::CheckoutSessionRequest} for more details.
|
|
146
157
|
#
|
|
@@ -168,6 +179,8 @@ module Dodopayments
|
|
|
168
179
|
#
|
|
169
180
|
# @param force_3ds [Boolean, nil] Override merchant default 3DS behaviour for this session
|
|
170
181
|
#
|
|
182
|
+
# @param mandate_min_amount_inr_paise [Integer, nil] Override the merchant-level mandate floor (in INR paise) for INR
|
|
183
|
+
#
|
|
171
184
|
# @param metadata [Hash{Symbol=>String}, nil] Additional metadata associated with the payment. Defaults to empty if not provid
|
|
172
185
|
#
|
|
173
186
|
# @param minimal_address [Boolean] If true, only zipcode is required when confirm is true; other address fields rem
|
|
@@ -116,6 +116,7 @@ module Dodopayments
|
|
|
116
116
|
CREDIT_ROLLED_OVER = :credit_rolled_over
|
|
117
117
|
ROLLOVER_FORFEITED = :rollover_forfeited
|
|
118
118
|
OVERAGE_CHARGED = :overage_charged
|
|
119
|
+
OVERAGE_RESET = :overage_reset
|
|
119
120
|
AUTO_TOP_UP = :auto_top_up
|
|
120
121
|
MANUAL_ADJUSTMENT = :manual_adjustment
|
|
121
122
|
REFUND = :refund
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class CreditOverageResetWebhookEvent < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute business_id
|
|
7
|
+
# The business identifier
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :business_id, String
|
|
11
|
+
|
|
12
|
+
# @!attribute data
|
|
13
|
+
# Response for a ledger entry
|
|
14
|
+
#
|
|
15
|
+
# @return [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry]
|
|
16
|
+
required :data, -> { Dodopayments::CreditEntitlements::CreditLedgerEntry }
|
|
17
|
+
|
|
18
|
+
# @!attribute timestamp
|
|
19
|
+
# The timestamp of when the event occurred
|
|
20
|
+
#
|
|
21
|
+
# @return [Time]
|
|
22
|
+
required :timestamp, Time
|
|
23
|
+
|
|
24
|
+
# @!attribute type
|
|
25
|
+
# The event type
|
|
26
|
+
#
|
|
27
|
+
# @return [Symbol, Dodopayments::Models::CreditOverageResetWebhookEvent::Type]
|
|
28
|
+
required :type, enum: -> { Dodopayments::CreditOverageResetWebhookEvent::Type }
|
|
29
|
+
|
|
30
|
+
# @!method initialize(business_id:, data:, timestamp:, type:)
|
|
31
|
+
# @param business_id [String] The business identifier
|
|
32
|
+
#
|
|
33
|
+
# @param data [Dodopayments::Models::CreditEntitlements::CreditLedgerEntry] Response for a ledger entry
|
|
34
|
+
#
|
|
35
|
+
# @param timestamp [Time] The timestamp of when the event occurred
|
|
36
|
+
#
|
|
37
|
+
# @param type [Symbol, Dodopayments::Models::CreditOverageResetWebhookEvent::Type] The event type
|
|
38
|
+
|
|
39
|
+
# The event type
|
|
40
|
+
#
|
|
41
|
+
# @see Dodopayments::Models::CreditOverageResetWebhookEvent#type
|
|
42
|
+
module Type
|
|
43
|
+
extend Dodopayments::Internal::Type::Enum
|
|
44
|
+
|
|
45
|
+
CREDIT_OVERAGE_RESET = :"credit.overage_reset"
|
|
46
|
+
|
|
47
|
+
# @!method self.values
|
|
48
|
+
# @return [Array<Symbol>]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Customers#list_entitlements
|
|
6
|
+
class CustomerListEntitlementsParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute customer_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :customer_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(customer_id:, request_options: {})
|
|
16
|
+
# @param customer_id [String]
|
|
17
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Customers#list_entitlements
|
|
6
|
+
class CustomerListEntitlementsResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute items
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Dodopayments::Models::CustomerListEntitlementsResponse::Item>]
|
|
10
|
+
required :items,
|
|
11
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::CustomerListEntitlementsResponse::Item] }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(items:)
|
|
14
|
+
# @param items [Array<Dodopayments::Models::CustomerListEntitlementsResponse::Item>]
|
|
15
|
+
|
|
16
|
+
class Item < Dodopayments::Internal::Type::BaseModel
|
|
17
|
+
# @!attribute created_at
|
|
18
|
+
#
|
|
19
|
+
# @return [Time]
|
|
20
|
+
required :created_at, Time
|
|
21
|
+
|
|
22
|
+
# @!attribute entitlement_id
|
|
23
|
+
# The entitlement this grant belongs to.
|
|
24
|
+
#
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :entitlement_id, String
|
|
27
|
+
|
|
28
|
+
# @!attribute entitlement_name
|
|
29
|
+
#
|
|
30
|
+
# @return [String]
|
|
31
|
+
required :entitlement_name, String
|
|
32
|
+
|
|
33
|
+
# @!attribute grant_id
|
|
34
|
+
# Grant id (the per-customer row in `entitlement_grants`).
|
|
35
|
+
#
|
|
36
|
+
# @return [String]
|
|
37
|
+
required :grant_id, String
|
|
38
|
+
|
|
39
|
+
# @!attribute integration_type
|
|
40
|
+
#
|
|
41
|
+
# @return [Symbol, Dodopayments::Models::EntitlementIntegrationType]
|
|
42
|
+
required :integration_type, enum: -> { Dodopayments::EntitlementIntegrationType }
|
|
43
|
+
|
|
44
|
+
# @!attribute status
|
|
45
|
+
#
|
|
46
|
+
# @return [Symbol, Dodopayments::Models::CustomerListEntitlementsResponse::Item::Status]
|
|
47
|
+
required :status, enum: -> { Dodopayments::Models::CustomerListEntitlementsResponse::Item::Status }
|
|
48
|
+
|
|
49
|
+
# @!attribute updated_at
|
|
50
|
+
#
|
|
51
|
+
# @return [Time]
|
|
52
|
+
required :updated_at, Time
|
|
53
|
+
|
|
54
|
+
# @!attribute delivered_at
|
|
55
|
+
#
|
|
56
|
+
# @return [Time, nil]
|
|
57
|
+
optional :delivered_at, Time, nil?: true
|
|
58
|
+
|
|
59
|
+
# @!attribute entitlement_description
|
|
60
|
+
#
|
|
61
|
+
# @return [String, nil]
|
|
62
|
+
optional :entitlement_description, String, nil?: true
|
|
63
|
+
|
|
64
|
+
# @!attribute revoked_at
|
|
65
|
+
#
|
|
66
|
+
# @return [Time, nil]
|
|
67
|
+
optional :revoked_at, Time, nil?: true
|
|
68
|
+
|
|
69
|
+
# @!method initialize(created_at:, entitlement_id:, entitlement_name:, grant_id:, integration_type:, status:, updated_at:, delivered_at: nil, entitlement_description: nil, revoked_at: nil)
|
|
70
|
+
# @param created_at [Time]
|
|
71
|
+
#
|
|
72
|
+
# @param entitlement_id [String] The entitlement this grant belongs to.
|
|
73
|
+
#
|
|
74
|
+
# @param entitlement_name [String]
|
|
75
|
+
#
|
|
76
|
+
# @param grant_id [String] Grant id (the per-customer row in `entitlement_grants`).
|
|
77
|
+
#
|
|
78
|
+
# @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType]
|
|
79
|
+
#
|
|
80
|
+
# @param status [Symbol, Dodopayments::Models::CustomerListEntitlementsResponse::Item::Status]
|
|
81
|
+
#
|
|
82
|
+
# @param updated_at [Time]
|
|
83
|
+
#
|
|
84
|
+
# @param delivered_at [Time, nil]
|
|
85
|
+
#
|
|
86
|
+
# @param entitlement_description [String, nil]
|
|
87
|
+
#
|
|
88
|
+
# @param revoked_at [Time, nil]
|
|
89
|
+
|
|
90
|
+
# @see Dodopayments::Models::CustomerListEntitlementsResponse::Item#status
|
|
91
|
+
module Status
|
|
92
|
+
extend Dodopayments::Internal::Type::Enum
|
|
93
|
+
|
|
94
|
+
PENDING = :pending
|
|
95
|
+
DELIVERED = :delivered
|
|
96
|
+
FAILED = :failed
|
|
97
|
+
REVOKED = :revoked
|
|
98
|
+
|
|
99
|
+
# @!method self.values
|
|
100
|
+
# @return [Array<Symbol>]
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -3,32 +3,37 @@
|
|
|
3
3
|
module Dodopayments
|
|
4
4
|
module Models
|
|
5
5
|
class DigitalProductDelivery < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute files
|
|
7
|
+
# One entry per attached file.
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Dodopayments::Models::DigitalProductDeliveryFile>]
|
|
10
|
+
required :files, -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::DigitalProductDeliveryFile] }
|
|
11
|
+
|
|
6
12
|
# @!attribute external_url
|
|
7
|
-
#
|
|
13
|
+
# Optional external URL, passed through from the entitlement configuration.
|
|
8
14
|
#
|
|
9
15
|
# @return [String, nil]
|
|
10
16
|
optional :external_url, String, nil?: true
|
|
11
17
|
|
|
12
|
-
# @!attribute files
|
|
13
|
-
# Uploaded files ids of digital product
|
|
14
|
-
#
|
|
15
|
-
# @return [Array<Dodopayments::Models::DigitalProductDeliveryFile>, nil]
|
|
16
|
-
optional :files,
|
|
17
|
-
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::DigitalProductDeliveryFile] },
|
|
18
|
-
nil?: true
|
|
19
|
-
|
|
20
18
|
# @!attribute instructions
|
|
21
|
-
#
|
|
19
|
+
# Optional human-readable delivery instructions, passed through from the
|
|
20
|
+
# entitlement configuration.
|
|
22
21
|
#
|
|
23
22
|
# @return [String, nil]
|
|
24
23
|
optional :instructions, String, nil?: true
|
|
25
24
|
|
|
26
|
-
# @!method initialize(external_url: nil,
|
|
27
|
-
#
|
|
25
|
+
# @!method initialize(files:, external_url: nil, instructions: nil)
|
|
26
|
+
# Some parameter documentations has been truncated, see
|
|
27
|
+
# {Dodopayments::Models::DigitalProductDelivery} for more details.
|
|
28
|
+
#
|
|
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.
|
|
28
33
|
#
|
|
29
|
-
# @param
|
|
34
|
+
# @param external_url [String, nil] Optional external URL, passed through from the entitlement
|
|
30
35
|
#
|
|
31
|
-
# @param instructions [String, nil]
|
|
36
|
+
# @param instructions [String, nil] Optional human-readable delivery instructions, passed through from
|
|
32
37
|
end
|
|
33
38
|
end
|
|
34
39
|
end
|
|
@@ -3,25 +3,56 @@
|
|
|
3
3
|
module Dodopayments
|
|
4
4
|
module Models
|
|
5
5
|
class DigitalProductDeliveryFile < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute download_url
|
|
7
|
+
# Short-lived presigned URL for downloading the file.
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :download_url, String
|
|
11
|
+
|
|
12
|
+
# @!attribute expires_in
|
|
13
|
+
# Seconds until `download_url` expires.
|
|
14
|
+
#
|
|
15
|
+
# @return [Integer]
|
|
16
|
+
required :expires_in, Integer
|
|
17
|
+
|
|
6
18
|
# @!attribute file_id
|
|
19
|
+
# Identifier of the attached file.
|
|
7
20
|
#
|
|
8
21
|
# @return [String]
|
|
9
22
|
required :file_id, String
|
|
10
23
|
|
|
11
|
-
# @!attribute
|
|
24
|
+
# @!attribute filename
|
|
25
|
+
# Original filename of the attached file.
|
|
12
26
|
#
|
|
13
27
|
# @return [String]
|
|
14
|
-
required :
|
|
28
|
+
required :filename, String
|
|
15
29
|
|
|
16
|
-
# @!attribute
|
|
30
|
+
# @!attribute content_type
|
|
31
|
+
# Optional content-type declared at upload.
|
|
17
32
|
#
|
|
18
|
-
# @return [String]
|
|
19
|
-
|
|
33
|
+
# @return [String, nil]
|
|
34
|
+
optional :content_type, String, nil?: true
|
|
35
|
+
|
|
36
|
+
# @!attribute file_size
|
|
37
|
+
# Optional size of the file in bytes.
|
|
38
|
+
#
|
|
39
|
+
# @return [Integer, nil]
|
|
40
|
+
optional :file_size, Integer, nil?: true
|
|
20
41
|
|
|
21
|
-
# @!method initialize(file_id:,
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
# @param
|
|
42
|
+
# @!method initialize(download_url:, expires_in:, file_id:, filename:, content_type: nil, file_size: nil)
|
|
43
|
+
# One file in a digital-product delivery payload.
|
|
44
|
+
#
|
|
45
|
+
# @param download_url [String] Short-lived presigned URL for downloading the file.
|
|
46
|
+
#
|
|
47
|
+
# @param expires_in [Integer] Seconds until `download_url` expires.
|
|
48
|
+
#
|
|
49
|
+
# @param file_id [String] Identifier of the attached file.
|
|
50
|
+
#
|
|
51
|
+
# @param filename [String] Original filename of the attached file.
|
|
52
|
+
#
|
|
53
|
+
# @param content_type [String, nil] Optional content-type declared at upload.
|
|
54
|
+
#
|
|
55
|
+
# @param file_size [Integer, nil] Optional size of the file in bytes.
|
|
25
56
|
end
|
|
26
57
|
end
|
|
27
58
|
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Entitlements#create
|
|
6
|
+
class Entitlement < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Unique identifier of the entitlement.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute business_id
|
|
14
|
+
# Identifier of the business that owns this entitlement.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :business_id, String
|
|
18
|
+
|
|
19
|
+
# @!attribute created_at
|
|
20
|
+
# Timestamp when the entitlement was created.
|
|
21
|
+
#
|
|
22
|
+
# @return [Time]
|
|
23
|
+
required :created_at, Time
|
|
24
|
+
|
|
25
|
+
# @!attribute integration_config
|
|
26
|
+
# Integration-specific configuration. For `digital_files` entitlements this
|
|
27
|
+
# includes presigned download URLs for each attached file.
|
|
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]
|
|
30
|
+
required :integration_config, union: -> { Dodopayments::IntegrationConfigResponse }
|
|
31
|
+
|
|
32
|
+
# @!attribute integration_type
|
|
33
|
+
# Platform integration this entitlement uses.
|
|
34
|
+
#
|
|
35
|
+
# @return [Symbol, Dodopayments::Models::EntitlementIntegrationType]
|
|
36
|
+
required :integration_type, enum: -> { Dodopayments::EntitlementIntegrationType }
|
|
37
|
+
|
|
38
|
+
# @!attribute is_active
|
|
39
|
+
# Always `true` for entitlements returned by the public API; soft-deleted
|
|
40
|
+
# entitlements are not returned.
|
|
41
|
+
#
|
|
42
|
+
# @return [Boolean]
|
|
43
|
+
required :is_active, Dodopayments::Internal::Type::Boolean
|
|
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
|
+
|
|
51
|
+
# @!attribute name
|
|
52
|
+
# Display name supplied at creation.
|
|
53
|
+
#
|
|
54
|
+
# @return [String]
|
|
55
|
+
required :name, String
|
|
56
|
+
|
|
57
|
+
# @!attribute updated_at
|
|
58
|
+
# Timestamp when the entitlement was last modified.
|
|
59
|
+
#
|
|
60
|
+
# @return [Time]
|
|
61
|
+
required :updated_at, Time
|
|
62
|
+
|
|
63
|
+
# @!attribute description
|
|
64
|
+
# Optional description supplied at creation.
|
|
65
|
+
#
|
|
66
|
+
# @return [String, nil]
|
|
67
|
+
optional :description, String, nil?: true
|
|
68
|
+
|
|
69
|
+
# @!method initialize(id:, business_id:, created_at:, integration_config:, integration_type:, is_active:, metadata:, name:, updated_at:, description: nil)
|
|
70
|
+
# Some parameter documentations has been truncated, see
|
|
71
|
+
# {Dodopayments::Models::Entitlement} for more details.
|
|
72
|
+
#
|
|
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.
|
|
77
|
+
#
|
|
78
|
+
# @param business_id [String] Identifier of the business that owns this entitlement.
|
|
79
|
+
#
|
|
80
|
+
# @param created_at [Time] Timestamp when the entitlement was created.
|
|
81
|
+
#
|
|
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
|
|
83
|
+
#
|
|
84
|
+
# @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType] Platform integration this entitlement uses.
|
|
85
|
+
#
|
|
86
|
+
# @param is_active [Boolean] Always `true` for entitlements returned by the public API;
|
|
87
|
+
#
|
|
88
|
+
# @param metadata [Hash{Symbol=>String}] Arbitrary key-value metadata supplied at creation or via PATCH.
|
|
89
|
+
#
|
|
90
|
+
# @param name [String] Display name supplied at creation.
|
|
91
|
+
#
|
|
92
|
+
# @param updated_at [Time] Timestamp when the entitlement was last modified.
|
|
93
|
+
#
|
|
94
|
+
# @param description [String, nil] Optional description supplied at creation.
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Entitlements#create
|
|
6
|
+
class EntitlementCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute integration_config
|
|
11
|
+
# Platform-specific configuration (validated per integration_type)
|
|
12
|
+
#
|
|
13
|
+
# @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]
|
|
14
|
+
required :integration_config, union: -> { Dodopayments::IntegrationConfig }
|
|
15
|
+
|
|
16
|
+
# @!attribute integration_type
|
|
17
|
+
# Which platform integration this entitlement uses
|
|
18
|
+
#
|
|
19
|
+
# @return [Symbol, Dodopayments::Models::EntitlementIntegrationType]
|
|
20
|
+
required :integration_type, enum: -> { Dodopayments::EntitlementIntegrationType }
|
|
21
|
+
|
|
22
|
+
# @!attribute name
|
|
23
|
+
# Display name for this entitlement
|
|
24
|
+
#
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :name, String
|
|
27
|
+
|
|
28
|
+
# @!attribute description
|
|
29
|
+
# Optional description
|
|
30
|
+
#
|
|
31
|
+
# @return [String, nil]
|
|
32
|
+
optional :description, String, nil?: true
|
|
33
|
+
|
|
34
|
+
# @!attribute metadata
|
|
35
|
+
# Additional metadata for the entitlement
|
|
36
|
+
#
|
|
37
|
+
# @return [Hash{Symbol=>String}, nil]
|
|
38
|
+
optional :metadata, Dodopayments::Internal::Type::HashOf[String]
|
|
39
|
+
|
|
40
|
+
# @!method initialize(integration_config:, integration_type:, name:, description: nil, metadata: nil, request_options: {})
|
|
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)
|
|
42
|
+
#
|
|
43
|
+
# @param integration_type [Symbol, Dodopayments::Models::EntitlementIntegrationType] Which platform integration this entitlement uses
|
|
44
|
+
#
|
|
45
|
+
# @param name [String] Display name for this entitlement
|
|
46
|
+
#
|
|
47
|
+
# @param description [String, nil] Optional description
|
|
48
|
+
#
|
|
49
|
+
# @param metadata [Hash{Symbol=>String}] Additional metadata for the entitlement
|
|
50
|
+
#
|
|
51
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Entitlements#delete
|
|
6
|
+
class EntitlementDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|