dodopayments 2.2.0 → 2.3.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 +17 -0
- data/README.md +3 -3
- data/lib/dodopayments/client.rb +8 -0
- data/lib/dodopayments/models/checkout_session_customization.rb +4 -4
- data/lib/dodopayments/models/checkout_session_request.rb +10 -1
- data/lib/dodopayments/models/customer_retrieve_payment_methods_response.rb +13 -1
- data/lib/dodopayments/models/customers/customer_portal_create_params.rb +13 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +22 -0
- data/lib/dodopayments/models/payment_method_types.rb +3 -0
- data/lib/dodopayments/models/product_collection_create_params.rb +98 -0
- data/lib/dodopayments/models/product_collection_create_response.rb +226 -0
- data/lib/dodopayments/models/product_collection_delete_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_list_params.rb +46 -0
- data/lib/dodopayments/models/product_collection_list_response.rb +65 -0
- data/lib/dodopayments/models/product_collection_retrieve_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_retrieve_response.rb +226 -0
- data/lib/dodopayments/models/product_collection_unarchive_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_unarchive_response.rb +33 -0
- data/lib/dodopayments/models/product_collection_update_images_params.rb +29 -0
- data/lib/dodopayments/models/product_collection_update_images_response.rb +25 -0
- data/lib/dodopayments/models/product_collection_update_params.rb +61 -0
- data/lib/dodopayments/models/product_collections/group_create_params.rb +71 -0
- data/lib/dodopayments/models/product_collections/group_create_response.rb +160 -0
- data/lib/dodopayments/models/product_collections/group_delete_params.rb +28 -0
- data/lib/dodopayments/models/product_collections/group_update_params.rb +59 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_params.rb +60 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_response.rb +136 -0
- data/lib/dodopayments/models/product_collections/groups/item_delete_params.rb +36 -0
- data/lib/dodopayments/models/product_collections/groups/item_update_params.rb +47 -0
- data/lib/dodopayments/models/subscription.rb +107 -1
- data/lib/dodopayments/models/subscription_cancel_change_plan_params.rb +20 -0
- data/lib/dodopayments/models/subscription_list_response.rb +109 -1
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +10 -1
- data/lib/dodopayments/models/update_subscription_plan_req.rb +29 -1
- data/lib/dodopayments/models/your_webhook_url_create_params.rb +32 -0
- data/lib/dodopayments/models.rb +20 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/customers/customer_portal.rb +6 -1
- data/lib/dodopayments/resources/invoices/payments.rb +18 -0
- data/lib/dodopayments/resources/product_collections/groups/items.rb +111 -0
- data/lib/dodopayments/resources/product_collections/groups.rb +109 -0
- data/lib/dodopayments/resources/product_collections.rb +179 -0
- data/lib/dodopayments/resources/subscriptions.rb +24 -2
- data/lib/dodopayments/resources/your_webhook_url.rb +56 -0
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +30 -3
- data/rbi/dodopayments/client.rbi +6 -0
- data/rbi/dodopayments/models/checkout_session_customization.rbi +12 -13
- data/rbi/dodopayments/models/checkout_session_request.rbi +10 -0
- data/rbi/dodopayments/models/credit_entitlement_cart_response.rbi +4 -4
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +2 -2
- data/rbi/dodopayments/models/customer_retrieve_payment_methods_response.rbi +6 -0
- data/rbi/dodopayments/models/customers/customer_portal_create_params.rbi +13 -0
- data/rbi/dodopayments/models/dispute.rbi +4 -4
- data/rbi/dodopayments/models/get_dispute.rbi +4 -4
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +40 -0
- data/rbi/dodopayments/models/license_key.rbi +2 -2
- data/rbi/dodopayments/models/meter_cart_response_item.rbi +2 -2
- data/rbi/dodopayments/models/payment.rbi +10 -12
- data/rbi/dodopayments/models/payment_method_types.rbi +3 -0
- data/rbi/dodopayments/models/product_collection_create_params.rbi +180 -0
- data/rbi/dodopayments/models/product_collection_create_response.rbi +303 -0
- data/rbi/dodopayments/models/product_collection_delete_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_list_params.rbi +82 -0
- data/rbi/dodopayments/models/product_collection_list_response.rbi +88 -0
- data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_retrieve_response.rbi +305 -0
- data/rbi/dodopayments/models/product_collection_unarchive_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_unarchive_response.rbi +56 -0
- data/rbi/dodopayments/models/product_collection_update_images_params.rbi +52 -0
- data/rbi/dodopayments/models/product_collection_update_images_response.rbi +40 -0
- data/rbi/dodopayments/models/product_collection_update_params.rbi +84 -0
- data/rbi/dodopayments/models/product_collections/group_create_params.rbi +123 -0
- data/rbi/dodopayments/models/product_collections/group_create_response.rbi +204 -0
- data/rbi/dodopayments/models/product_collections/group_delete_params.rbi +48 -0
- data/rbi/dodopayments/models/product_collections/group_update_params.rbi +80 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_params.rbi +113 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_response.rbi +156 -0
- data/rbi/dodopayments/models/product_collections/groups/item_delete_params.rbi +55 -0
- data/rbi/dodopayments/models/product_collections/groups/item_update_params.rbi +68 -0
- data/rbi/dodopayments/models/refund.rbi +4 -4
- data/rbi/dodopayments/models/refund_list_item.rbi +4 -4
- data/rbi/dodopayments/models/subscription.rbi +169 -10
- data/rbi/dodopayments/models/subscription_cancel_change_plan_params.rbi +41 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +179 -0
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +12 -1
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +70 -0
- data/rbi/dodopayments/models/your_webhook_url_create_params.rbi +56 -0
- data/rbi/dodopayments/models.rbi +28 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +8 -0
- data/rbi/dodopayments/resources/customers/customer_portal.rbi +4 -0
- data/rbi/dodopayments/resources/invoices/payments.rbi +9 -0
- data/rbi/dodopayments/resources/product_collections/groups/items.rbi +83 -0
- data/rbi/dodopayments/resources/product_collections/groups.rbi +90 -0
- data/rbi/dodopayments/resources/product_collections.rbi +149 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +27 -0
- data/rbi/dodopayments/resources/your_webhook_url.rbi +53 -0
- data/sig/dodopayments/client.rbs +4 -0
- data/sig/dodopayments/models/checkout_session_customization.rbs +4 -8
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/customers/customer_portal_create_params.rbs +7 -1
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +25 -0
- data/sig/dodopayments/models/product_collection_create_params.rbs +80 -0
- data/sig/dodopayments/models/product_collection_create_response.rbs +179 -0
- data/sig/dodopayments/models/product_collection_delete_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_list_params.rbs +49 -0
- data/sig/dodopayments/models/product_collection_list_response.rbs +50 -0
- data/sig/dodopayments/models/product_collection_retrieve_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_retrieve_response.rbs +179 -0
- data/sig/dodopayments/models/product_collection_unarchive_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_unarchive_response.rbs +30 -0
- data/sig/dodopayments/models/product_collection_update_images_params.rbs +28 -0
- data/sig/dodopayments/models/product_collection_update_images_response.rbs +16 -0
- data/sig/dodopayments/models/product_collection_update_params.rbs +51 -0
- data/sig/dodopayments/models/product_collections/group_create_params.rbs +55 -0
- data/sig/dodopayments/models/product_collections/group_create_response.rbs +129 -0
- data/sig/dodopayments/models/product_collections/group_delete_params.rbs +30 -0
- data/sig/dodopayments/models/product_collections/group_update_params.rbs +48 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_params.rbs +52 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_response.rbs +104 -0
- data/sig/dodopayments/models/product_collections/groups/item_delete_params.rbs +36 -0
- data/sig/dodopayments/models/product_collections/groups/item_update_params.rbs +40 -0
- data/sig/dodopayments/models/subscription.rbs +75 -0
- data/sig/dodopayments/models/subscription_cancel_change_plan_params.rbs +24 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +75 -0
- data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +5 -0
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +25 -1
- data/sig/dodopayments/models/your_webhook_url_create_params.rbs +42 -0
- data/sig/dodopayments/models.rbs +20 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/customers/customer_portal.rbs +1 -0
- data/sig/dodopayments/resources/invoices/payments.rbs +5 -0
- data/sig/dodopayments/resources/product_collections/groups/items.rbs +33 -0
- data/sig/dodopayments/resources/product_collections/groups.rbs +34 -0
- data/sig/dodopayments/resources/product_collections.rbs +56 -0
- data/sig/dodopayments/resources/subscriptions.rbs +7 -0
- data/sig/dodopayments/resources/your_webhook_url.rbs +18 -0
- metadata +83 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b9060cc76ee60562ea5bec0a17398c37dd9d9d74d0c3050274e4e44b9421724
|
|
4
|
+
data.tar.gz: 9ac3c0892df1ec8600fdcc7f3ab697ae6d588539f323a31ebcf78fb0812e28f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa21151a63d47c5a9f301f30861adcaa5abd19292808a9c4875c0b0887dcff01d6bdd10467916ebc4d82a2de3d3b2613ffbcc3276f63432d30ee689d49ab8b14
|
|
7
|
+
data.tar.gz: 50fcd2ee3f2ddd5fdb33afe26b747133779e892109f09330b9dac8f975d6326f7ce83f6dc74d23b562b4068a486989c2d3885f33e799aad0b1c452bfb63d4861
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.3.0 (2026-03-25)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.2.0...v2.3.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.2.0...v2.3.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** added cancel change plan endpoint ([c8748db](https://github.com/dodopayments/dodopayments-ruby/commit/c8748db3c02b945204bf7fab98c48361ff8615a7))
|
|
10
|
+
* **api:** updated openapi spec to 1.92.1 ([0355574](https://github.com/dodopayments/dodopayments-ruby/commit/035557423766f101ac5f35e62ba84cfbe0fbfbd5))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Chores
|
|
14
|
+
|
|
15
|
+
* **ci:** skip lint on metadata-only changes ([ad5b48a](https://github.com/dodopayments/dodopayments-ruby/commit/ad5b48a9eebd480a0da063316bd0732b200ffa2a))
|
|
16
|
+
* **internal:** update gitignore ([249ca11](https://github.com/dodopayments/dodopayments-ruby/commit/249ca1127b6aa3913db257668ec8f2fb6d1d0c5c))
|
|
17
|
+
* **tests:** bump steady to v0.19.6 ([b3ff385](https://github.com/dodopayments/dodopayments-ruby/commit/b3ff385d9e3db267aeedfe9f27a294f0239f989c))
|
|
18
|
+
* **tests:** bump steady to v0.19.7 ([4f7229a](https://github.com/dodopayments/dodopayments-ruby/commit/4f7229ae821eb448e3efc1335a6a13da1b391156))
|
|
19
|
+
|
|
3
20
|
## 2.2.0 (2026-03-21)
|
|
4
21
|
|
|
5
22
|
Full Changelog: [v2.1.2...v2.2.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.1.2...v2.2.0)
|
data/README.md
CHANGED
|
@@ -8,8 +8,8 @@ It is generated with [Stainless](https://www.stainless.com/).
|
|
|
8
8
|
|
|
9
9
|
Use the Dodo Payments MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
10
10
|
|
|
11
|
-
[](https://cursor.com/en-US/install-mcp?name=dodopayments-mcp&config=
|
|
12
|
-
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dodopayments-mcp%22%2C%
|
|
11
|
+
[](https://cursor.com/en-US/install-mcp?name=dodopayments-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImRvZG9wYXltZW50cy1tY3AiXSwiZW52Ijp7IkRPRE9fUEFZTUVOVFNfQVBJX0tFWSI6Ik15IEJlYXJlciBUb2tlbiIsIkRPRE9fUEFZTUVOVFNfV0VCSE9PS19LRVkiOiJNeSBXZWJob29rIEtleSJ9fQ)
|
|
12
|
+
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22dodopayments-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22dodopayments-mcp%22%5D%2C%22env%22%3A%7B%22DODO_PAYMENTS_API_KEY%22%3A%22My%20Bearer%20Token%22%2C%22DODO_PAYMENTS_WEBHOOK_KEY%22%3A%22My%20Webhook%20Key%22%7D%7D)
|
|
13
13
|
|
|
14
14
|
> Note: You may need to set environment variables in your MCP client.
|
|
15
15
|
|
|
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
26
26
|
<!-- x-release-please-start-version -->
|
|
27
27
|
|
|
28
28
|
```ruby
|
|
29
|
-
gem "dodopayments", "~> 2.
|
|
29
|
+
gem "dodopayments", "~> 2.3.0"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- x-release-please-end -->
|
data/lib/dodopayments/client.rb
CHANGED
|
@@ -93,6 +93,12 @@ module Dodopayments
|
|
|
93
93
|
# @return [Dodopayments::Resources::CreditEntitlements]
|
|
94
94
|
attr_reader :credit_entitlements
|
|
95
95
|
|
|
96
|
+
# @return [Dodopayments::Resources::ProductCollections]
|
|
97
|
+
attr_reader :product_collections
|
|
98
|
+
|
|
99
|
+
# @return [Dodopayments::Resources::YourWebhookURL]
|
|
100
|
+
attr_reader :your_webhook_url
|
|
101
|
+
|
|
96
102
|
# @api private
|
|
97
103
|
#
|
|
98
104
|
# @return [Hash{String=>String}]
|
|
@@ -177,6 +183,8 @@ module Dodopayments
|
|
|
177
183
|
@meters = Dodopayments::Resources::Meters.new(client: self)
|
|
178
184
|
@balances = Dodopayments::Resources::Balances.new(client: self)
|
|
179
185
|
@credit_entitlements = Dodopayments::Resources::CreditEntitlements.new(client: self)
|
|
186
|
+
@product_collections = Dodopayments::Resources::ProductCollections.new(client: self)
|
|
187
|
+
@your_webhook_url = Dodopayments::Resources::YourWebhookURL.new(client: self)
|
|
180
188
|
end
|
|
181
189
|
end
|
|
182
190
|
end
|
|
@@ -28,10 +28,10 @@ module Dodopayments
|
|
|
28
28
|
# @!attribute theme
|
|
29
29
|
# Theme of the page (determines which mode - light/dark/system - to use)
|
|
30
30
|
#
|
|
31
|
-
#
|
|
31
|
+
# If not provided, uses the business-configured theme from business_themes table.
|
|
32
32
|
#
|
|
33
33
|
# @return [Symbol, Dodopayments::Models::CheckoutSessionCustomization::Theme, nil]
|
|
34
|
-
optional :theme, enum: -> { Dodopayments::CheckoutSessionCustomization::Theme }
|
|
34
|
+
optional :theme, enum: -> { Dodopayments::CheckoutSessionCustomization::Theme }, nil?: true
|
|
35
35
|
|
|
36
36
|
# @!attribute theme_config
|
|
37
37
|
# Optional custom theme configuration with colors for light and dark modes
|
|
@@ -49,13 +49,13 @@ module Dodopayments
|
|
|
49
49
|
#
|
|
50
50
|
# @param show_order_details [Boolean] Show order details by default
|
|
51
51
|
#
|
|
52
|
-
# @param theme [Symbol, Dodopayments::Models::CheckoutSessionCustomization::Theme] Theme of the page (determines which mode - light/dark/system - to use)
|
|
52
|
+
# @param theme [Symbol, Dodopayments::Models::CheckoutSessionCustomization::Theme, nil] Theme of the page (determines which mode - light/dark/system - to use)
|
|
53
53
|
#
|
|
54
54
|
# @param theme_config [Dodopayments::Models::ThemeConfig, nil] Optional custom theme configuration with colors for light and dark modes
|
|
55
55
|
|
|
56
56
|
# Theme of the page (determines which mode - light/dark/system - to use)
|
|
57
57
|
#
|
|
58
|
-
#
|
|
58
|
+
# If not provided, uses the business-configured theme from business_themes table.
|
|
59
59
|
#
|
|
60
60
|
# @see Dodopayments::Models::CheckoutSessionCustomization#theme
|
|
61
61
|
module Theme
|
|
@@ -33,6 +33,13 @@ module Dodopayments
|
|
|
33
33
|
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
|
34
34
|
optional :billing_currency, enum: -> { Dodopayments::Currency }, nil?: true
|
|
35
35
|
|
|
36
|
+
# @!attribute cancel_url
|
|
37
|
+
# The URL to redirect the customer if they cancel or go back from the checkout. If
|
|
38
|
+
# not provided, the back button will not be displayed.
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :cancel_url, String, nil?: true
|
|
42
|
+
|
|
36
43
|
# @!attribute confirm
|
|
37
44
|
# If confirm is true, all the details will be finalized. If required data is
|
|
38
45
|
# missing, an API error is thrown.
|
|
@@ -133,7 +140,7 @@ module Dodopayments
|
|
|
133
140
|
# @return [String, nil]
|
|
134
141
|
optional :tax_id, String, nil?: true
|
|
135
142
|
|
|
136
|
-
# @!method initialize(product_cart:, allowed_payment_method_types: nil, billing_address: nil, billing_currency: 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)
|
|
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)
|
|
137
144
|
# Some parameter documentations has been truncated, see
|
|
138
145
|
# {Dodopayments::Models::CheckoutSessionRequest} for more details.
|
|
139
146
|
#
|
|
@@ -145,6 +152,8 @@ module Dodopayments
|
|
|
145
152
|
#
|
|
146
153
|
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] This field is ingored if adaptive pricing is disabled
|
|
147
154
|
#
|
|
155
|
+
# @param cancel_url [String, nil] The URL to redirect the customer if they cancel or go back from the checkout.
|
|
156
|
+
#
|
|
148
157
|
# @param confirm [Boolean] If confirm is true, all the details will be finalized. If required data is missi
|
|
149
158
|
#
|
|
150
159
|
# @param custom_fields [Array<Dodopayments::Models::CustomField>, nil] Custom fields to collect from customer during checkout (max 5 fields)
|
|
@@ -38,6 +38,9 @@ module Dodopayments
|
|
|
38
38
|
optional :last_used_at, Time, nil?: true
|
|
39
39
|
|
|
40
40
|
# @!attribute payment_method_type
|
|
41
|
+
# All supported payment method types (from Hyperswitch).
|
|
42
|
+
#
|
|
43
|
+
# Used for disabled-payment-methods filtering and validation.
|
|
41
44
|
#
|
|
42
45
|
# @return [Symbol, Dodopayments::Models::PaymentMethodTypes, nil]
|
|
43
46
|
optional :payment_method_type, enum: -> { Dodopayments::PaymentMethodTypes }, nil?: true
|
|
@@ -48,11 +51,20 @@ module Dodopayments
|
|
|
48
51
|
optional :recurring_enabled, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
49
52
|
|
|
50
53
|
# @!method initialize(payment_method:, payment_method_id:, card: nil, last_used_at: nil, payment_method_type: nil, recurring_enabled: nil)
|
|
54
|
+
# Some parameter documentations has been truncated, see
|
|
55
|
+
# {Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item} for more
|
|
56
|
+
# details.
|
|
57
|
+
#
|
|
51
58
|
# @param payment_method [Symbol, Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::PaymentMethod]
|
|
59
|
+
#
|
|
52
60
|
# @param payment_method_id [String]
|
|
61
|
+
#
|
|
53
62
|
# @param card [Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item::Card, nil]
|
|
63
|
+
#
|
|
54
64
|
# @param last_used_at [Time, nil]
|
|
55
|
-
#
|
|
65
|
+
#
|
|
66
|
+
# @param payment_method_type [Symbol, Dodopayments::Models::PaymentMethodTypes, nil] All supported payment method types (from Hyperswitch).
|
|
67
|
+
#
|
|
56
68
|
# @param recurring_enabled [Boolean, nil]
|
|
57
69
|
|
|
58
70
|
# @see Dodopayments::Models::CustomerRetrievePaymentMethodsResponse::Item#payment_method
|
|
@@ -13,15 +13,27 @@ module Dodopayments
|
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :customer_id, String
|
|
15
15
|
|
|
16
|
+
# @!attribute return_url
|
|
17
|
+
# Optional return URL for this session. Overrides the business-level default. This
|
|
18
|
+
# URL will be shown as a "Return to {business}" back button in the portal.
|
|
19
|
+
#
|
|
20
|
+
# @return [String, nil]
|
|
21
|
+
optional :return_url, String
|
|
22
|
+
|
|
16
23
|
# @!attribute send_email
|
|
17
24
|
# If true, will send link to user.
|
|
18
25
|
#
|
|
19
26
|
# @return [Boolean, nil]
|
|
20
27
|
optional :send_email, Dodopayments::Internal::Type::Boolean
|
|
21
28
|
|
|
22
|
-
# @!method initialize(customer_id:, send_email: nil, request_options: {})
|
|
29
|
+
# @!method initialize(customer_id:, return_url: nil, send_email: nil, request_options: {})
|
|
30
|
+
# Some parameter documentations has been truncated, see
|
|
31
|
+
# {Dodopayments::Models::Customers::CustomerPortalCreateParams} for more details.
|
|
32
|
+
#
|
|
23
33
|
# @param customer_id [String]
|
|
24
34
|
#
|
|
35
|
+
# @param return_url [String] Optional return URL for this session. Overrides the business-level default.
|
|
36
|
+
#
|
|
25
37
|
# @param send_email [Boolean] If true, will send link to user.
|
|
26
38
|
#
|
|
27
39
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Invoices
|
|
6
|
+
# @see Dodopayments::Resources::Invoices::Payments#retrieve_payout
|
|
7
|
+
class PaymentRetrievePayoutParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute payout_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :payout_id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(payout_id:, request_options: {})
|
|
17
|
+
# @param payout_id [String]
|
|
18
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#create
|
|
6
|
+
class ProductCollectionCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute groups
|
|
11
|
+
# Groups of products in this collection
|
|
12
|
+
#
|
|
13
|
+
# @return [Array<Dodopayments::Models::ProductCollectionCreateParams::Group>]
|
|
14
|
+
required :groups,
|
|
15
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollectionCreateParams::Group] }
|
|
16
|
+
|
|
17
|
+
# @!attribute name
|
|
18
|
+
# Name of the product collection
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :name, String
|
|
22
|
+
|
|
23
|
+
# @!attribute brand_id
|
|
24
|
+
# Brand id for the collection, if not provided will default to primary brand
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :brand_id, String, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute description
|
|
30
|
+
# Optional description of the product collection
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :description, String, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!method initialize(groups:, name:, brand_id: nil, description: nil, request_options: {})
|
|
36
|
+
# @param groups [Array<Dodopayments::Models::ProductCollectionCreateParams::Group>] Groups of products in this collection
|
|
37
|
+
#
|
|
38
|
+
# @param name [String] Name of the product collection
|
|
39
|
+
#
|
|
40
|
+
# @param brand_id [String, nil] Brand id for the collection, if not provided will default to primary brand
|
|
41
|
+
#
|
|
42
|
+
# @param description [String, nil] Optional description of the product collection
|
|
43
|
+
#
|
|
44
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
45
|
+
|
|
46
|
+
class Group < Dodopayments::Internal::Type::BaseModel
|
|
47
|
+
# @!attribute products
|
|
48
|
+
# Products in this group
|
|
49
|
+
#
|
|
50
|
+
# @return [Array<Dodopayments::Models::ProductCollectionCreateParams::Group::Product>]
|
|
51
|
+
required :products,
|
|
52
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollectionCreateParams::Group::Product] }
|
|
53
|
+
|
|
54
|
+
# @!attribute group_name
|
|
55
|
+
# Optional group name. Multiple groups can have null names, but named groups must
|
|
56
|
+
# be unique per collection
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
optional :group_name, String, nil?: true
|
|
60
|
+
|
|
61
|
+
# @!attribute status
|
|
62
|
+
# Status of the group (defaults to true if not provided)
|
|
63
|
+
#
|
|
64
|
+
# @return [Boolean, nil]
|
|
65
|
+
optional :status, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
66
|
+
|
|
67
|
+
# @!method initialize(products:, group_name: nil, status: nil)
|
|
68
|
+
# Some parameter documentations has been truncated, see
|
|
69
|
+
# {Dodopayments::Models::ProductCollectionCreateParams::Group} for more details.
|
|
70
|
+
#
|
|
71
|
+
# @param products [Array<Dodopayments::Models::ProductCollectionCreateParams::Group::Product>] Products in this group
|
|
72
|
+
#
|
|
73
|
+
# @param group_name [String, nil] Optional group name. Multiple groups can have null names, but named groups must
|
|
74
|
+
#
|
|
75
|
+
# @param status [Boolean, nil] Status of the group (defaults to true if not provided)
|
|
76
|
+
|
|
77
|
+
class Product < Dodopayments::Internal::Type::BaseModel
|
|
78
|
+
# @!attribute product_id
|
|
79
|
+
# Product ID to include in the group
|
|
80
|
+
#
|
|
81
|
+
# @return [String]
|
|
82
|
+
required :product_id, String
|
|
83
|
+
|
|
84
|
+
# @!attribute status
|
|
85
|
+
# Status of the product in this group (defaults to true if not provided)
|
|
86
|
+
#
|
|
87
|
+
# @return [Boolean, nil]
|
|
88
|
+
optional :status, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
89
|
+
|
|
90
|
+
# @!method initialize(product_id:, status: nil)
|
|
91
|
+
# @param product_id [String] Product ID to include in the group
|
|
92
|
+
#
|
|
93
|
+
# @param status [Boolean, nil] Status of the product in this group (defaults to true if not provided)
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#create
|
|
6
|
+
class ProductCollectionCreateResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Unique identifier for the product collection
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute brand_id
|
|
14
|
+
# Brand ID for the collection
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :brand_id, String
|
|
18
|
+
|
|
19
|
+
# @!attribute created_at
|
|
20
|
+
# Timestamp when the collection was created
|
|
21
|
+
#
|
|
22
|
+
# @return [Time]
|
|
23
|
+
required :created_at, Time
|
|
24
|
+
|
|
25
|
+
# @!attribute groups
|
|
26
|
+
# Groups in this collection
|
|
27
|
+
#
|
|
28
|
+
# @return [Array<Dodopayments::Models::ProductCollectionCreateResponse::Group>]
|
|
29
|
+
required :groups,
|
|
30
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::ProductCollectionCreateResponse::Group] }
|
|
31
|
+
|
|
32
|
+
# @!attribute name
|
|
33
|
+
# Name of the collection
|
|
34
|
+
#
|
|
35
|
+
# @return [String]
|
|
36
|
+
required :name, String
|
|
37
|
+
|
|
38
|
+
# @!attribute updated_at
|
|
39
|
+
# Timestamp when the collection was last updated
|
|
40
|
+
#
|
|
41
|
+
# @return [Time]
|
|
42
|
+
required :updated_at, Time
|
|
43
|
+
|
|
44
|
+
# @!attribute description
|
|
45
|
+
# Description of the collection
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :description, String, nil?: true
|
|
49
|
+
|
|
50
|
+
# @!attribute image
|
|
51
|
+
# URL of the collection image
|
|
52
|
+
#
|
|
53
|
+
# @return [String, nil]
|
|
54
|
+
optional :image, String, nil?: true
|
|
55
|
+
|
|
56
|
+
# @!method initialize(id:, brand_id:, created_at:, groups:, name:, updated_at:, description: nil, image: nil)
|
|
57
|
+
# @param id [String] Unique identifier for the product collection
|
|
58
|
+
#
|
|
59
|
+
# @param brand_id [String] Brand ID for the collection
|
|
60
|
+
#
|
|
61
|
+
# @param created_at [Time] Timestamp when the collection was created
|
|
62
|
+
#
|
|
63
|
+
# @param groups [Array<Dodopayments::Models::ProductCollectionCreateResponse::Group>] Groups in this collection
|
|
64
|
+
#
|
|
65
|
+
# @param name [String] Name of the collection
|
|
66
|
+
#
|
|
67
|
+
# @param updated_at [Time] Timestamp when the collection was last updated
|
|
68
|
+
#
|
|
69
|
+
# @param description [String, nil] Description of the collection
|
|
70
|
+
#
|
|
71
|
+
# @param image [String, nil] URL of the collection image
|
|
72
|
+
|
|
73
|
+
class Group < Dodopayments::Internal::Type::BaseModel
|
|
74
|
+
# @!attribute group_id
|
|
75
|
+
#
|
|
76
|
+
# @return [String]
|
|
77
|
+
required :group_id, String
|
|
78
|
+
|
|
79
|
+
# @!attribute products
|
|
80
|
+
#
|
|
81
|
+
# @return [Array<Dodopayments::Models::ProductCollectionCreateResponse::Group::Product>]
|
|
82
|
+
required :products,
|
|
83
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::ProductCollectionCreateResponse::Group::Product] }
|
|
84
|
+
|
|
85
|
+
# @!attribute status
|
|
86
|
+
#
|
|
87
|
+
# @return [Boolean]
|
|
88
|
+
required :status, Dodopayments::Internal::Type::Boolean
|
|
89
|
+
|
|
90
|
+
# @!attribute group_name
|
|
91
|
+
#
|
|
92
|
+
# @return [String, nil]
|
|
93
|
+
optional :group_name, String, nil?: true
|
|
94
|
+
|
|
95
|
+
# @!method initialize(group_id:, products:, status:, group_name: nil)
|
|
96
|
+
# @param group_id [String]
|
|
97
|
+
# @param products [Array<Dodopayments::Models::ProductCollectionCreateResponse::Group::Product>]
|
|
98
|
+
# @param status [Boolean]
|
|
99
|
+
# @param group_name [String, nil]
|
|
100
|
+
|
|
101
|
+
class Product < Dodopayments::Internal::Type::BaseModel
|
|
102
|
+
# @!attribute id
|
|
103
|
+
#
|
|
104
|
+
# @return [String]
|
|
105
|
+
required :id, String
|
|
106
|
+
|
|
107
|
+
# @!attribute addons_count
|
|
108
|
+
#
|
|
109
|
+
# @return [Integer]
|
|
110
|
+
required :addons_count, Integer
|
|
111
|
+
|
|
112
|
+
# @!attribute files_count
|
|
113
|
+
#
|
|
114
|
+
# @return [Integer]
|
|
115
|
+
required :files_count, Integer
|
|
116
|
+
|
|
117
|
+
# @!attribute has_credit_entitlements
|
|
118
|
+
# Whether this product has any credit entitlements attached
|
|
119
|
+
#
|
|
120
|
+
# @return [Boolean]
|
|
121
|
+
required :has_credit_entitlements, Dodopayments::Internal::Type::Boolean
|
|
122
|
+
|
|
123
|
+
# @!attribute is_recurring
|
|
124
|
+
#
|
|
125
|
+
# @return [Boolean]
|
|
126
|
+
required :is_recurring, Dodopayments::Internal::Type::Boolean
|
|
127
|
+
|
|
128
|
+
# @!attribute license_key_enabled
|
|
129
|
+
#
|
|
130
|
+
# @return [Boolean]
|
|
131
|
+
required :license_key_enabled, Dodopayments::Internal::Type::Boolean
|
|
132
|
+
|
|
133
|
+
# @!attribute meters_count
|
|
134
|
+
#
|
|
135
|
+
# @return [Integer]
|
|
136
|
+
required :meters_count, Integer
|
|
137
|
+
|
|
138
|
+
# @!attribute product_id
|
|
139
|
+
#
|
|
140
|
+
# @return [String]
|
|
141
|
+
required :product_id, String
|
|
142
|
+
|
|
143
|
+
# @!attribute status
|
|
144
|
+
#
|
|
145
|
+
# @return [Boolean]
|
|
146
|
+
required :status, Dodopayments::Internal::Type::Boolean
|
|
147
|
+
|
|
148
|
+
# @!attribute currency
|
|
149
|
+
#
|
|
150
|
+
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
|
151
|
+
optional :currency, enum: -> { Dodopayments::Currency }, nil?: true
|
|
152
|
+
|
|
153
|
+
# @!attribute description
|
|
154
|
+
#
|
|
155
|
+
# @return [String, nil]
|
|
156
|
+
optional :description, String, nil?: true
|
|
157
|
+
|
|
158
|
+
# @!attribute name
|
|
159
|
+
#
|
|
160
|
+
# @return [String, nil]
|
|
161
|
+
optional :name, String, nil?: true
|
|
162
|
+
|
|
163
|
+
# @!attribute price
|
|
164
|
+
#
|
|
165
|
+
# @return [Integer, nil]
|
|
166
|
+
optional :price, Integer, nil?: true
|
|
167
|
+
|
|
168
|
+
# @!attribute price_detail
|
|
169
|
+
# One-time price details.
|
|
170
|
+
#
|
|
171
|
+
# @return [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil]
|
|
172
|
+
optional :price_detail, union: -> { Dodopayments::Price }, nil?: true
|
|
173
|
+
|
|
174
|
+
# @!attribute tax_category
|
|
175
|
+
# Represents the different categories of taxation applicable to various products
|
|
176
|
+
# and services.
|
|
177
|
+
#
|
|
178
|
+
# @return [Symbol, Dodopayments::Models::TaxCategory, nil]
|
|
179
|
+
optional :tax_category, enum: -> { Dodopayments::TaxCategory }, nil?: true
|
|
180
|
+
|
|
181
|
+
# @!attribute tax_inclusive
|
|
182
|
+
#
|
|
183
|
+
# @return [Boolean, nil]
|
|
184
|
+
optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
185
|
+
|
|
186
|
+
# @!method initialize(id:, addons_count:, files_count:, has_credit_entitlements:, is_recurring:, license_key_enabled:, meters_count:, product_id:, status:, currency: nil, description: nil, name: nil, price: nil, price_detail: nil, tax_category: nil, tax_inclusive: nil)
|
|
187
|
+
# Some parameter documentations has been truncated, see
|
|
188
|
+
# {Dodopayments::Models::ProductCollectionCreateResponse::Group::Product} for more
|
|
189
|
+
# details.
|
|
190
|
+
#
|
|
191
|
+
# @param id [String]
|
|
192
|
+
#
|
|
193
|
+
# @param addons_count [Integer]
|
|
194
|
+
#
|
|
195
|
+
# @param files_count [Integer]
|
|
196
|
+
#
|
|
197
|
+
# @param has_credit_entitlements [Boolean] Whether this product has any credit entitlements attached
|
|
198
|
+
#
|
|
199
|
+
# @param is_recurring [Boolean]
|
|
200
|
+
#
|
|
201
|
+
# @param license_key_enabled [Boolean]
|
|
202
|
+
#
|
|
203
|
+
# @param meters_count [Integer]
|
|
204
|
+
#
|
|
205
|
+
# @param product_id [String]
|
|
206
|
+
#
|
|
207
|
+
# @param status [Boolean]
|
|
208
|
+
#
|
|
209
|
+
# @param currency [Symbol, Dodopayments::Models::Currency, nil]
|
|
210
|
+
#
|
|
211
|
+
# @param description [String, nil]
|
|
212
|
+
#
|
|
213
|
+
# @param name [String, nil]
|
|
214
|
+
#
|
|
215
|
+
# @param price [Integer, nil]
|
|
216
|
+
#
|
|
217
|
+
# @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, Dodopayments::Models::Price::UsageBasedPrice, nil] One-time price details.
|
|
218
|
+
#
|
|
219
|
+
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Represents the different categories of taxation applicable to various products a
|
|
220
|
+
#
|
|
221
|
+
# @param tax_inclusive [Boolean, nil]
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#delete
|
|
6
|
+
class ProductCollectionDeleteParams < 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
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#list
|
|
6
|
+
class ProductCollectionListParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute archived
|
|
11
|
+
# List archived collections
|
|
12
|
+
#
|
|
13
|
+
# @return [Boolean, nil]
|
|
14
|
+
optional :archived, Dodopayments::Internal::Type::Boolean
|
|
15
|
+
|
|
16
|
+
# @!attribute brand_id
|
|
17
|
+
# Filter by Brand id
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :brand_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute page_number
|
|
23
|
+
# Page number default is 0
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :page_number, Integer
|
|
27
|
+
|
|
28
|
+
# @!attribute page_size
|
|
29
|
+
# Page size default is 10 max is 100
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :page_size, Integer
|
|
33
|
+
|
|
34
|
+
# @!method initialize(archived: nil, brand_id: nil, page_number: nil, page_size: nil, request_options: {})
|
|
35
|
+
# @param archived [Boolean] List archived collections
|
|
36
|
+
#
|
|
37
|
+
# @param brand_id [String] Filter by Brand id
|
|
38
|
+
#
|
|
39
|
+
# @param page_number [Integer] Page number default is 0
|
|
40
|
+
#
|
|
41
|
+
# @param page_size [Integer] Page size default is 10 max is 100
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|