dodopayments 2.2.0 → 2.4.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 +26 -0
- data/README.md +3 -3
- 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_delete_payment_method_params.rb +26 -0
- 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/dispute.rb +9 -1
- data/lib/dodopayments/models/dispute_list_response.rb +9 -1
- data/lib/dodopayments/models/get_dispute.rb +9 -1
- data/lib/dodopayments/models/payment_method_types.rb +3 -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.rb +4 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/customers/customer_portal.rb +6 -1
- data/lib/dodopayments/resources/customers.rb +25 -0
- data/lib/dodopayments/resources/subscriptions.rb +24 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +2 -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/customer_delete_payment_method_params.rbi +46 -0
- 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 +8 -0
- data/rbi/dodopayments/models/dispute_list_response.rbi +11 -3
- data/rbi/dodopayments/models/get_dispute.rbi +8 -0
- data/rbi/dodopayments/models/payment_method_types.rbi +3 -0
- data/rbi/dodopayments/models/subscription.rbi +161 -0
- 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.rbi +6 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +8 -0
- data/rbi/dodopayments/resources/customers/customer_portal.rbi +4 -0
- data/rbi/dodopayments/resources/customers.rbi +16 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +27 -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/customer_delete_payment_method_params.rbs +28 -0
- data/sig/dodopayments/models/customers/customer_portal_create_params.rbs +7 -1
- data/sig/dodopayments/models/dispute.rbs +5 -0
- data/sig/dodopayments/models/dispute_list_response.rbs +8 -3
- data/sig/dodopayments/models/get_dispute.rbs +5 -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.rbs +4 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/customers/customer_portal.rbs +1 -0
- data/sig/dodopayments/resources/customers.rbs +6 -0
- data/sig/dodopayments/resources/subscriptions.rbs +7 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4536f0effec2845cc577e915e513fd707212965ba56cbdca4009f8eb8113bccf
|
|
4
|
+
data.tar.gz: 2e195536a171409b4e8a774a6e94df7f10e132338c7c6676309a4fb9cde72bc9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c71eea5a3f83802121f9c7f52630085f4d32ed676da3d1d7d92f0db4787f5ee77adb3208b685c13f727caa11b1af6936c55dd8b6b600b21bd1d40e18ad79223
|
|
7
|
+
data.tar.gz: dd9b81433d09525d736470774a900aefc2234b935db545f95d0c1a0bb3f8826b7f1f1c3adc5383bf0703264c46e5403dcb16a15b60bf3c7680d1fe85539b33c4
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.4.0 (2026-03-25)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v2.3.0...v2.4.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.3.0...v2.4.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([63ef98e](https://github.com/dodopayments/dodopayments-ruby/commit/63ef98ecd320d35628d2e1e3a7d494708023c55e))
|
|
10
|
+
* **api:** updated openapi spec to v1.92.3 ([e827af5](https://github.com/dodopayments/dodopayments-ruby/commit/e827af5ba14c9af4f6bf8cc911f4160f4a6ead93))
|
|
11
|
+
|
|
12
|
+
## 2.3.0 (2026-03-25)
|
|
13
|
+
|
|
14
|
+
Full Changelog: [v2.2.0...v2.3.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.2.0...v2.3.0)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **api:** added cancel change plan endpoint ([c8748db](https://github.com/dodopayments/dodopayments-ruby/commit/c8748db3c02b945204bf7fab98c48361ff8615a7))
|
|
19
|
+
* **api:** updated openapi spec to 1.92.1 ([0355574](https://github.com/dodopayments/dodopayments-ruby/commit/035557423766f101ac5f35e62ba84cfbe0fbfbd5))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Chores
|
|
23
|
+
|
|
24
|
+
* **ci:** skip lint on metadata-only changes ([ad5b48a](https://github.com/dodopayments/dodopayments-ruby/commit/ad5b48a9eebd480a0da063316bd0732b200ffa2a))
|
|
25
|
+
* **internal:** update gitignore ([249ca11](https://github.com/dodopayments/dodopayments-ruby/commit/249ca1127b6aa3913db257668ec8f2fb6d1d0c5c))
|
|
26
|
+
* **tests:** bump steady to v0.19.6 ([b3ff385](https://github.com/dodopayments/dodopayments-ruby/commit/b3ff385d9e3db267aeedfe9f27a294f0239f989c))
|
|
27
|
+
* **tests:** bump steady to v0.19.7 ([4f7229a](https://github.com/dodopayments/dodopayments-ruby/commit/4f7229ae821eb448e3efc1335a6a13da1b391156))
|
|
28
|
+
|
|
3
29
|
## 2.2.0 (2026-03-21)
|
|
4
30
|
|
|
5
31
|
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.4.0"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- x-release-please-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)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Customers#delete_payment_method
|
|
6
|
+
class CustomerDeletePaymentMethodParams < 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
|
+
# @!attribute payment_method_id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :payment_method_id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(customer_id:, payment_method_id:, request_options: {})
|
|
21
|
+
# @param customer_id [String]
|
|
22
|
+
# @param payment_method_id [String]
|
|
23
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -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}]
|
|
@@ -52,13 +52,19 @@ module Dodopayments
|
|
|
52
52
|
# @return [String]
|
|
53
53
|
required :payment_id, String
|
|
54
54
|
|
|
55
|
+
# @!attribute is_resolved_by_rdr
|
|
56
|
+
# Whether the dispute was resolved by Rapid Dispute Resolution
|
|
57
|
+
#
|
|
58
|
+
# @return [Boolean, nil]
|
|
59
|
+
optional :is_resolved_by_rdr, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
60
|
+
|
|
55
61
|
# @!attribute remarks
|
|
56
62
|
# Remarks
|
|
57
63
|
#
|
|
58
64
|
# @return [String, nil]
|
|
59
65
|
optional :remarks, String, nil?: true
|
|
60
66
|
|
|
61
|
-
# @!method initialize(amount:, business_id:, created_at:, currency:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, remarks: nil)
|
|
67
|
+
# @!method initialize(amount:, business_id:, created_at:, currency:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, is_resolved_by_rdr: nil, remarks: nil)
|
|
62
68
|
# Some parameter documentations has been truncated, see
|
|
63
69
|
# {Dodopayments::Models::Dispute} for more details.
|
|
64
70
|
#
|
|
@@ -78,6 +84,8 @@ module Dodopayments
|
|
|
78
84
|
#
|
|
79
85
|
# @param payment_id [String] The unique identifier of the payment associated with the dispute.
|
|
80
86
|
#
|
|
87
|
+
# @param is_resolved_by_rdr [Boolean, nil] Whether the dispute was resolved by Rapid Dispute Resolution
|
|
88
|
+
#
|
|
81
89
|
# @param remarks [String, nil] Remarks
|
|
82
90
|
end
|
|
83
91
|
end
|
|
@@ -53,7 +53,13 @@ module Dodopayments
|
|
|
53
53
|
# @return [String]
|
|
54
54
|
required :payment_id, String
|
|
55
55
|
|
|
56
|
-
# @!
|
|
56
|
+
# @!attribute is_resolved_by_rdr
|
|
57
|
+
# Whether the dispute was resolved by Rapid Dispute Resolution
|
|
58
|
+
#
|
|
59
|
+
# @return [Boolean, nil]
|
|
60
|
+
optional :is_resolved_by_rdr, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
61
|
+
|
|
62
|
+
# @!method initialize(amount:, business_id:, created_at:, currency:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, is_resolved_by_rdr: nil)
|
|
57
63
|
# Some parameter documentations has been truncated, see
|
|
58
64
|
# {Dodopayments::Models::DisputeListResponse} for more details.
|
|
59
65
|
#
|
|
@@ -72,6 +78,8 @@ module Dodopayments
|
|
|
72
78
|
# @param dispute_status [Symbol, Dodopayments::Models::DisputeStatus] The current status of the dispute.
|
|
73
79
|
#
|
|
74
80
|
# @param payment_id [String] The unique identifier of the payment associated with the dispute.
|
|
81
|
+
#
|
|
82
|
+
# @param is_resolved_by_rdr [Boolean, nil] Whether the dispute was resolved by Rapid Dispute Resolution
|
|
75
83
|
end
|
|
76
84
|
end
|
|
77
85
|
end
|
|
@@ -59,6 +59,12 @@ module Dodopayments
|
|
|
59
59
|
# @return [String]
|
|
60
60
|
required :payment_id, String
|
|
61
61
|
|
|
62
|
+
# @!attribute is_resolved_by_rdr
|
|
63
|
+
# Whether the dispute was resolved by Rapid Dispute Resolution
|
|
64
|
+
#
|
|
65
|
+
# @return [Boolean, nil]
|
|
66
|
+
optional :is_resolved_by_rdr, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
67
|
+
|
|
62
68
|
# @!attribute reason
|
|
63
69
|
# Reason for the dispute
|
|
64
70
|
#
|
|
@@ -71,7 +77,7 @@ module Dodopayments
|
|
|
71
77
|
# @return [String, nil]
|
|
72
78
|
optional :remarks, String, nil?: true
|
|
73
79
|
|
|
74
|
-
# @!method initialize(amount:, business_id:, created_at:, currency:, customer:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, reason: nil, remarks: nil)
|
|
80
|
+
# @!method initialize(amount:, business_id:, created_at:, currency:, customer:, dispute_id:, dispute_stage:, dispute_status:, payment_id:, is_resolved_by_rdr: nil, reason: nil, remarks: nil)
|
|
75
81
|
# Some parameter documentations has been truncated, see
|
|
76
82
|
# {Dodopayments::Models::GetDispute} for more details.
|
|
77
83
|
#
|
|
@@ -93,6 +99,8 @@ module Dodopayments
|
|
|
93
99
|
#
|
|
94
100
|
# @param payment_id [String] The unique identifier of the payment associated with the dispute.
|
|
95
101
|
#
|
|
102
|
+
# @param is_resolved_by_rdr [Boolean, nil] Whether the dispute was resolved by Rapid Dispute Resolution
|
|
103
|
+
#
|
|
96
104
|
# @param reason [String, nil] Reason for the dispute
|
|
97
105
|
#
|
|
98
106
|
# @param remarks [String, nil] Remarks
|
|
@@ -190,13 +190,19 @@ module Dodopayments
|
|
|
190
190
|
# @return [String, nil]
|
|
191
191
|
optional :payment_method_id, String, nil?: true
|
|
192
192
|
|
|
193
|
+
# @!attribute scheduled_change
|
|
194
|
+
# Scheduled plan change details, if any
|
|
195
|
+
#
|
|
196
|
+
# @return [Dodopayments::Models::Subscription::ScheduledChange, nil]
|
|
197
|
+
optional :scheduled_change, -> { Dodopayments::Subscription::ScheduledChange }, nil?: true
|
|
198
|
+
|
|
193
199
|
# @!attribute tax_id
|
|
194
200
|
# Tax identifier provided for this subscription (if applicable)
|
|
195
201
|
#
|
|
196
202
|
# @return [String, nil]
|
|
197
203
|
optional :tax_id, String, nil?: true
|
|
198
204
|
|
|
199
|
-
# @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, credit_entitlement_cart:, currency:, customer:, metadata:, meter_credit_entitlement_cart:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, custom_field_responses: nil, discount_cycles_remaining: nil, discount_id: nil, expires_at: nil, payment_method_id: nil, tax_id: nil)
|
|
205
|
+
# @!method initialize(addons:, billing:, cancel_at_next_billing_date:, created_at:, credit_entitlement_cart:, currency:, customer:, metadata:, meter_credit_entitlement_cart:, meters:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, custom_field_responses: nil, discount_cycles_remaining: nil, discount_id: nil, expires_at: nil, payment_method_id: nil, scheduled_change: nil, tax_id: nil)
|
|
200
206
|
# Some parameter documentations has been truncated, see
|
|
201
207
|
# {Dodopayments::Models::Subscription} for more details.
|
|
202
208
|
#
|
|
@@ -262,7 +268,107 @@ module Dodopayments
|
|
|
262
268
|
#
|
|
263
269
|
# @param payment_method_id [String, nil] Saved payment method id used for recurring charges
|
|
264
270
|
#
|
|
271
|
+
# @param scheduled_change [Dodopayments::Models::Subscription::ScheduledChange, nil] Scheduled plan change details, if any
|
|
272
|
+
#
|
|
265
273
|
# @param tax_id [String, nil] Tax identifier provided for this subscription (if applicable)
|
|
274
|
+
|
|
275
|
+
# @see Dodopayments::Models::Subscription#scheduled_change
|
|
276
|
+
class ScheduledChange < Dodopayments::Internal::Type::BaseModel
|
|
277
|
+
# @!attribute id
|
|
278
|
+
# The scheduled plan change ID
|
|
279
|
+
#
|
|
280
|
+
# @return [String]
|
|
281
|
+
required :id, String
|
|
282
|
+
|
|
283
|
+
# @!attribute addons
|
|
284
|
+
# Addons included in the scheduled change
|
|
285
|
+
#
|
|
286
|
+
# @return [Array<Dodopayments::Models::Subscription::ScheduledChange::Addon>]
|
|
287
|
+
required :addons,
|
|
288
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Subscription::ScheduledChange::Addon] }
|
|
289
|
+
|
|
290
|
+
# @!attribute created_at
|
|
291
|
+
# When this scheduled change was created
|
|
292
|
+
#
|
|
293
|
+
# @return [Time]
|
|
294
|
+
required :created_at, Time
|
|
295
|
+
|
|
296
|
+
# @!attribute effective_at
|
|
297
|
+
# When the change will be applied
|
|
298
|
+
#
|
|
299
|
+
# @return [Time]
|
|
300
|
+
required :effective_at, Time
|
|
301
|
+
|
|
302
|
+
# @!attribute product_id
|
|
303
|
+
# The product ID the subscription will change to
|
|
304
|
+
#
|
|
305
|
+
# @return [String]
|
|
306
|
+
required :product_id, String
|
|
307
|
+
|
|
308
|
+
# @!attribute quantity
|
|
309
|
+
# Quantity for the new plan
|
|
310
|
+
#
|
|
311
|
+
# @return [Integer]
|
|
312
|
+
required :quantity, Integer
|
|
313
|
+
|
|
314
|
+
# @!attribute product_description
|
|
315
|
+
# Description of the product being changed to
|
|
316
|
+
#
|
|
317
|
+
# @return [String, nil]
|
|
318
|
+
optional :product_description, String, nil?: true
|
|
319
|
+
|
|
320
|
+
# @!attribute product_name
|
|
321
|
+
# Name of the product being changed to
|
|
322
|
+
#
|
|
323
|
+
# @return [String, nil]
|
|
324
|
+
optional :product_name, String, nil?: true
|
|
325
|
+
|
|
326
|
+
# @!method initialize(id:, addons:, created_at:, effective_at:, product_id:, quantity:, product_description: nil, product_name: nil)
|
|
327
|
+
# Scheduled plan change details, if any
|
|
328
|
+
#
|
|
329
|
+
# @param id [String] The scheduled plan change ID
|
|
330
|
+
#
|
|
331
|
+
# @param addons [Array<Dodopayments::Models::Subscription::ScheduledChange::Addon>] Addons included in the scheduled change
|
|
332
|
+
#
|
|
333
|
+
# @param created_at [Time] When this scheduled change was created
|
|
334
|
+
#
|
|
335
|
+
# @param effective_at [Time] When the change will be applied
|
|
336
|
+
#
|
|
337
|
+
# @param product_id [String] The product ID the subscription will change to
|
|
338
|
+
#
|
|
339
|
+
# @param quantity [Integer] Quantity for the new plan
|
|
340
|
+
#
|
|
341
|
+
# @param product_description [String, nil] Description of the product being changed to
|
|
342
|
+
#
|
|
343
|
+
# @param product_name [String, nil] Name of the product being changed to
|
|
344
|
+
|
|
345
|
+
class Addon < Dodopayments::Internal::Type::BaseModel
|
|
346
|
+
# @!attribute addon_id
|
|
347
|
+
# The addon ID
|
|
348
|
+
#
|
|
349
|
+
# @return [String]
|
|
350
|
+
required :addon_id, String
|
|
351
|
+
|
|
352
|
+
# @!attribute name
|
|
353
|
+
# Name of the addon
|
|
354
|
+
#
|
|
355
|
+
# @return [String]
|
|
356
|
+
required :name, String
|
|
357
|
+
|
|
358
|
+
# @!attribute quantity
|
|
359
|
+
# Quantity of the addon
|
|
360
|
+
#
|
|
361
|
+
# @return [Integer]
|
|
362
|
+
required :quantity, Integer
|
|
363
|
+
|
|
364
|
+
# @!method initialize(addon_id:, name:, quantity:)
|
|
365
|
+
# @param addon_id [String] The addon ID
|
|
366
|
+
#
|
|
367
|
+
# @param name [String] Name of the addon
|
|
368
|
+
#
|
|
369
|
+
# @param quantity [Integer] Quantity of the addon
|
|
370
|
+
end
|
|
371
|
+
end
|
|
266
372
|
end
|
|
267
373
|
end
|
|
268
374
|
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::Subscriptions#cancel_change_plan
|
|
6
|
+
class SubscriptionCancelChangePlanParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute subscription_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :subscription_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(subscription_id:, request_options: {})
|
|
16
|
+
# @param subscription_id [String]
|
|
17
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -156,13 +156,21 @@ module Dodopayments
|
|
|
156
156
|
# @return [String, nil]
|
|
157
157
|
optional :product_name, String, nil?: true
|
|
158
158
|
|
|
159
|
+
# @!attribute scheduled_change
|
|
160
|
+
# Scheduled plan change details, if any
|
|
161
|
+
#
|
|
162
|
+
# @return [Dodopayments::Models::SubscriptionListResponse::ScheduledChange, nil]
|
|
163
|
+
optional :scheduled_change,
|
|
164
|
+
-> { Dodopayments::Models::SubscriptionListResponse::ScheduledChange },
|
|
165
|
+
nil?: true
|
|
166
|
+
|
|
159
167
|
# @!attribute tax_id
|
|
160
168
|
# Tax identifier provided for this subscription (if applicable)
|
|
161
169
|
#
|
|
162
170
|
# @return [String, nil]
|
|
163
171
|
optional :tax_id, String, nil?: true
|
|
164
172
|
|
|
165
|
-
# @!method initialize(billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil, payment_method_id: nil, product_name: nil, tax_id: nil)
|
|
173
|
+
# @!method initialize(billing:, cancel_at_next_billing_date:, created_at:, currency:, customer:, metadata:, next_billing_date:, on_demand:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_cycles_remaining: nil, discount_id: nil, payment_method_id: nil, product_name: nil, scheduled_change: nil, tax_id: nil)
|
|
166
174
|
# Some parameter documentations has been truncated, see
|
|
167
175
|
# {Dodopayments::Models::SubscriptionListResponse} for more details.
|
|
168
176
|
#
|
|
@@ -218,7 +226,107 @@ module Dodopayments
|
|
|
218
226
|
#
|
|
219
227
|
# @param product_name [String, nil] Name of the product associated with this subscription
|
|
220
228
|
#
|
|
229
|
+
# @param scheduled_change [Dodopayments::Models::SubscriptionListResponse::ScheduledChange, nil] Scheduled plan change details, if any
|
|
230
|
+
#
|
|
221
231
|
# @param tax_id [String, nil] Tax identifier provided for this subscription (if applicable)
|
|
232
|
+
|
|
233
|
+
# @see Dodopayments::Models::SubscriptionListResponse#scheduled_change
|
|
234
|
+
class ScheduledChange < Dodopayments::Internal::Type::BaseModel
|
|
235
|
+
# @!attribute id
|
|
236
|
+
# The scheduled plan change ID
|
|
237
|
+
#
|
|
238
|
+
# @return [String]
|
|
239
|
+
required :id, String
|
|
240
|
+
|
|
241
|
+
# @!attribute addons
|
|
242
|
+
# Addons included in the scheduled change
|
|
243
|
+
#
|
|
244
|
+
# @return [Array<Dodopayments::Models::SubscriptionListResponse::ScheduledChange::Addon>]
|
|
245
|
+
required :addons,
|
|
246
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::Models::SubscriptionListResponse::ScheduledChange::Addon] }
|
|
247
|
+
|
|
248
|
+
# @!attribute created_at
|
|
249
|
+
# When this scheduled change was created
|
|
250
|
+
#
|
|
251
|
+
# @return [Time]
|
|
252
|
+
required :created_at, Time
|
|
253
|
+
|
|
254
|
+
# @!attribute effective_at
|
|
255
|
+
# When the change will be applied
|
|
256
|
+
#
|
|
257
|
+
# @return [Time]
|
|
258
|
+
required :effective_at, Time
|
|
259
|
+
|
|
260
|
+
# @!attribute product_id
|
|
261
|
+
# The product ID the subscription will change to
|
|
262
|
+
#
|
|
263
|
+
# @return [String]
|
|
264
|
+
required :product_id, String
|
|
265
|
+
|
|
266
|
+
# @!attribute quantity
|
|
267
|
+
# Quantity for the new plan
|
|
268
|
+
#
|
|
269
|
+
# @return [Integer]
|
|
270
|
+
required :quantity, Integer
|
|
271
|
+
|
|
272
|
+
# @!attribute product_description
|
|
273
|
+
# Description of the product being changed to
|
|
274
|
+
#
|
|
275
|
+
# @return [String, nil]
|
|
276
|
+
optional :product_description, String, nil?: true
|
|
277
|
+
|
|
278
|
+
# @!attribute product_name
|
|
279
|
+
# Name of the product being changed to
|
|
280
|
+
#
|
|
281
|
+
# @return [String, nil]
|
|
282
|
+
optional :product_name, String, nil?: true
|
|
283
|
+
|
|
284
|
+
# @!method initialize(id:, addons:, created_at:, effective_at:, product_id:, quantity:, product_description: nil, product_name: nil)
|
|
285
|
+
# Scheduled plan change details, if any
|
|
286
|
+
#
|
|
287
|
+
# @param id [String] The scheduled plan change ID
|
|
288
|
+
#
|
|
289
|
+
# @param addons [Array<Dodopayments::Models::SubscriptionListResponse::ScheduledChange::Addon>] Addons included in the scheduled change
|
|
290
|
+
#
|
|
291
|
+
# @param created_at [Time] When this scheduled change was created
|
|
292
|
+
#
|
|
293
|
+
# @param effective_at [Time] When the change will be applied
|
|
294
|
+
#
|
|
295
|
+
# @param product_id [String] The product ID the subscription will change to
|
|
296
|
+
#
|
|
297
|
+
# @param quantity [Integer] Quantity for the new plan
|
|
298
|
+
#
|
|
299
|
+
# @param product_description [String, nil] Description of the product being changed to
|
|
300
|
+
#
|
|
301
|
+
# @param product_name [String, nil] Name of the product being changed to
|
|
302
|
+
|
|
303
|
+
class Addon < Dodopayments::Internal::Type::BaseModel
|
|
304
|
+
# @!attribute addon_id
|
|
305
|
+
# The addon ID
|
|
306
|
+
#
|
|
307
|
+
# @return [String]
|
|
308
|
+
required :addon_id, String
|
|
309
|
+
|
|
310
|
+
# @!attribute name
|
|
311
|
+
# Name of the addon
|
|
312
|
+
#
|
|
313
|
+
# @return [String]
|
|
314
|
+
required :name, String
|
|
315
|
+
|
|
316
|
+
# @!attribute quantity
|
|
317
|
+
# Quantity of the addon
|
|
318
|
+
#
|
|
319
|
+
# @return [Integer]
|
|
320
|
+
required :quantity, Integer
|
|
321
|
+
|
|
322
|
+
# @!method initialize(addon_id:, name:, quantity:)
|
|
323
|
+
# @param addon_id [String] The addon ID
|
|
324
|
+
#
|
|
325
|
+
# @param name [String] Name of the addon
|
|
326
|
+
#
|
|
327
|
+
# @param quantity [Integer] Quantity of the addon
|
|
328
|
+
end
|
|
329
|
+
end
|
|
222
330
|
end
|
|
223
331
|
end
|
|
224
332
|
end
|
|
@@ -23,6 +23,12 @@ module Dodopayments
|
|
|
23
23
|
|
|
24
24
|
# @see Dodopayments::Models::SubscriptionPreviewChangePlanResponse#immediate_charge
|
|
25
25
|
class ImmediateCharge < Dodopayments::Internal::Type::BaseModel
|
|
26
|
+
# @!attribute effective_at
|
|
27
|
+
# When the plan change will be effective
|
|
28
|
+
#
|
|
29
|
+
# @return [Time]
|
|
30
|
+
required :effective_at, Time
|
|
31
|
+
|
|
26
32
|
# @!attribute line_items
|
|
27
33
|
#
|
|
28
34
|
# @return [Array<Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter>]
|
|
@@ -35,8 +41,11 @@ module Dodopayments
|
|
|
35
41
|
required :summary,
|
|
36
42
|
-> { Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary }
|
|
37
43
|
|
|
38
|
-
# @!method initialize(line_items:, summary:)
|
|
44
|
+
# @!method initialize(effective_at:, line_items:, summary:)
|
|
45
|
+
# @param effective_at [Time] When the plan change will be effective
|
|
46
|
+
#
|
|
39
47
|
# @param line_items [Array<Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Subscription, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Addon, Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::LineItem::Meter>]
|
|
48
|
+
#
|
|
40
49
|
# @param summary [Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary]
|
|
41
50
|
|
|
42
51
|
module LineItem
|