dodopayments 2.1.2 → 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 +38 -0
- data/README.md +3 -3
- data/lib/dodopayments/client.rb +15 -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/webhooks.rb +11 -1
- data/lib/dodopayments/resources/your_webhook_url.rb +56 -0
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +31 -3
- data/rbi/dodopayments/client.rbi +12 -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/webhooks.rbi +10 -2
- data/rbi/dodopayments/resources/your_webhook_url.rbi +53 -0
- data/sig/dodopayments/client.rbs +7 -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/webhooks.rbs +3 -1
- data/sig/dodopayments/resources/your_webhook_url.rbs +18 -0
- metadata +97 -2
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module ProductCollections
|
|
4
|
+
module Groups
|
|
5
|
+
type item_create_response_item =
|
|
6
|
+
{
|
|
7
|
+
id: String,
|
|
8
|
+
addons_count: Integer,
|
|
9
|
+
files_count: Integer,
|
|
10
|
+
has_credit_entitlements: bool,
|
|
11
|
+
is_recurring: bool,
|
|
12
|
+
license_key_enabled: bool,
|
|
13
|
+
meters_count: Integer,
|
|
14
|
+
product_id: String,
|
|
15
|
+
status: bool,
|
|
16
|
+
currency: Dodopayments::Models::currency?,
|
|
17
|
+
description: String?,
|
|
18
|
+
name: String?,
|
|
19
|
+
price: Integer?,
|
|
20
|
+
price_detail: Dodopayments::Models::price?,
|
|
21
|
+
tax_category: Dodopayments::Models::tax_category?,
|
|
22
|
+
tax_inclusive: bool?
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
class ItemCreateResponseItem < Dodopayments::Internal::Type::BaseModel
|
|
26
|
+
attr_accessor id: String
|
|
27
|
+
|
|
28
|
+
attr_accessor addons_count: Integer
|
|
29
|
+
|
|
30
|
+
attr_accessor files_count: Integer
|
|
31
|
+
|
|
32
|
+
attr_accessor has_credit_entitlements: bool
|
|
33
|
+
|
|
34
|
+
attr_accessor is_recurring: bool
|
|
35
|
+
|
|
36
|
+
attr_accessor license_key_enabled: bool
|
|
37
|
+
|
|
38
|
+
attr_accessor meters_count: Integer
|
|
39
|
+
|
|
40
|
+
attr_accessor product_id: String
|
|
41
|
+
|
|
42
|
+
attr_accessor status: bool
|
|
43
|
+
|
|
44
|
+
attr_accessor currency: Dodopayments::Models::currency?
|
|
45
|
+
|
|
46
|
+
attr_accessor description: String?
|
|
47
|
+
|
|
48
|
+
attr_accessor name: String?
|
|
49
|
+
|
|
50
|
+
attr_accessor price: Integer?
|
|
51
|
+
|
|
52
|
+
attr_accessor price_detail: Dodopayments::Models::price?
|
|
53
|
+
|
|
54
|
+
attr_accessor tax_category: Dodopayments::Models::tax_category?
|
|
55
|
+
|
|
56
|
+
attr_accessor tax_inclusive: bool?
|
|
57
|
+
|
|
58
|
+
def initialize: (
|
|
59
|
+
id: String,
|
|
60
|
+
addons_count: Integer,
|
|
61
|
+
files_count: Integer,
|
|
62
|
+
has_credit_entitlements: bool,
|
|
63
|
+
is_recurring: bool,
|
|
64
|
+
license_key_enabled: bool,
|
|
65
|
+
meters_count: Integer,
|
|
66
|
+
product_id: String,
|
|
67
|
+
status: bool,
|
|
68
|
+
?currency: Dodopayments::Models::currency?,
|
|
69
|
+
?description: String?,
|
|
70
|
+
?name: String?,
|
|
71
|
+
?price: Integer?,
|
|
72
|
+
?price_detail: Dodopayments::Models::price?,
|
|
73
|
+
?tax_category: Dodopayments::Models::tax_category?,
|
|
74
|
+
?tax_inclusive: bool?
|
|
75
|
+
) -> void
|
|
76
|
+
|
|
77
|
+
def to_hash: -> {
|
|
78
|
+
id: String,
|
|
79
|
+
addons_count: Integer,
|
|
80
|
+
files_count: Integer,
|
|
81
|
+
has_credit_entitlements: bool,
|
|
82
|
+
is_recurring: bool,
|
|
83
|
+
license_key_enabled: bool,
|
|
84
|
+
meters_count: Integer,
|
|
85
|
+
product_id: String,
|
|
86
|
+
status: bool,
|
|
87
|
+
currency: Dodopayments::Models::currency?,
|
|
88
|
+
description: String?,
|
|
89
|
+
name: String?,
|
|
90
|
+
price: Integer?,
|
|
91
|
+
price_detail: Dodopayments::Models::price?,
|
|
92
|
+
tax_category: Dodopayments::Models::tax_category?,
|
|
93
|
+
tax_inclusive: bool?
|
|
94
|
+
}
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
type item_create_response =
|
|
98
|
+
::Array[Dodopayments::Models::ProductCollections::Groups::ItemCreateResponseItem]
|
|
99
|
+
|
|
100
|
+
ItemCreateResponse: Dodopayments::Internal::Type::Converter
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module ProductCollections
|
|
4
|
+
module Groups
|
|
5
|
+
type item_delete_params =
|
|
6
|
+
{ id: String, group_id: String, item_id: String }
|
|
7
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
8
|
+
|
|
9
|
+
class ItemDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
10
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
attr_accessor id: String
|
|
14
|
+
|
|
15
|
+
attr_accessor group_id: String
|
|
16
|
+
|
|
17
|
+
attr_accessor item_id: String
|
|
18
|
+
|
|
19
|
+
def initialize: (
|
|
20
|
+
id: String,
|
|
21
|
+
group_id: String,
|
|
22
|
+
item_id: String,
|
|
23
|
+
?request_options: Dodopayments::request_opts
|
|
24
|
+
) -> void
|
|
25
|
+
|
|
26
|
+
def to_hash: -> {
|
|
27
|
+
id: String,
|
|
28
|
+
group_id: String,
|
|
29
|
+
item_id: String,
|
|
30
|
+
request_options: Dodopayments::RequestOptions
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module ProductCollections
|
|
4
|
+
module Groups
|
|
5
|
+
type item_update_params =
|
|
6
|
+
{ id: String, group_id: String, item_id: String, status: bool }
|
|
7
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
8
|
+
|
|
9
|
+
class ItemUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
10
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
11
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
12
|
+
|
|
13
|
+
attr_accessor id: String
|
|
14
|
+
|
|
15
|
+
attr_accessor group_id: String
|
|
16
|
+
|
|
17
|
+
attr_accessor item_id: String
|
|
18
|
+
|
|
19
|
+
attr_accessor status: bool
|
|
20
|
+
|
|
21
|
+
def initialize: (
|
|
22
|
+
id: String,
|
|
23
|
+
group_id: String,
|
|
24
|
+
item_id: String,
|
|
25
|
+
status: bool,
|
|
26
|
+
?request_options: Dodopayments::request_opts
|
|
27
|
+
) -> void
|
|
28
|
+
|
|
29
|
+
def to_hash: -> {
|
|
30
|
+
id: String,
|
|
31
|
+
group_id: String,
|
|
32
|
+
item_id: String,
|
|
33
|
+
status: bool,
|
|
34
|
+
request_options: Dodopayments::RequestOptions
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -32,6 +32,7 @@ module Dodopayments
|
|
|
32
32
|
discount_id: String?,
|
|
33
33
|
expires_at: Time?,
|
|
34
34
|
payment_method_id: String?,
|
|
35
|
+
scheduled_change: Dodopayments::Subscription::ScheduledChange?,
|
|
35
36
|
tax_id: String?
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -96,6 +97,8 @@ module Dodopayments
|
|
|
96
97
|
|
|
97
98
|
attr_accessor payment_method_id: String?
|
|
98
99
|
|
|
100
|
+
attr_accessor scheduled_change: Dodopayments::Subscription::ScheduledChange?
|
|
101
|
+
|
|
99
102
|
attr_accessor tax_id: String?
|
|
100
103
|
|
|
101
104
|
def initialize: (
|
|
@@ -129,6 +132,7 @@ module Dodopayments
|
|
|
129
132
|
?discount_id: String?,
|
|
130
133
|
?expires_at: Time?,
|
|
131
134
|
?payment_method_id: String?,
|
|
135
|
+
?scheduled_change: Dodopayments::Subscription::ScheduledChange?,
|
|
132
136
|
?tax_id: String?
|
|
133
137
|
) -> void
|
|
134
138
|
|
|
@@ -163,8 +167,79 @@ module Dodopayments
|
|
|
163
167
|
discount_id: String?,
|
|
164
168
|
expires_at: Time?,
|
|
165
169
|
payment_method_id: String?,
|
|
170
|
+
scheduled_change: Dodopayments::Subscription::ScheduledChange?,
|
|
166
171
|
tax_id: String?
|
|
167
172
|
}
|
|
173
|
+
|
|
174
|
+
type scheduled_change =
|
|
175
|
+
{
|
|
176
|
+
id: String,
|
|
177
|
+
addons: ::Array[Dodopayments::Subscription::ScheduledChange::Addon],
|
|
178
|
+
created_at: Time,
|
|
179
|
+
effective_at: Time,
|
|
180
|
+
product_id: String,
|
|
181
|
+
quantity: Integer,
|
|
182
|
+
product_description: String?,
|
|
183
|
+
product_name: String?
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
class ScheduledChange < Dodopayments::Internal::Type::BaseModel
|
|
187
|
+
attr_accessor id: String
|
|
188
|
+
|
|
189
|
+
attr_accessor addons: ::Array[Dodopayments::Subscription::ScheduledChange::Addon]
|
|
190
|
+
|
|
191
|
+
attr_accessor created_at: Time
|
|
192
|
+
|
|
193
|
+
attr_accessor effective_at: Time
|
|
194
|
+
|
|
195
|
+
attr_accessor product_id: String
|
|
196
|
+
|
|
197
|
+
attr_accessor quantity: Integer
|
|
198
|
+
|
|
199
|
+
attr_accessor product_description: String?
|
|
200
|
+
|
|
201
|
+
attr_accessor product_name: String?
|
|
202
|
+
|
|
203
|
+
def initialize: (
|
|
204
|
+
id: String,
|
|
205
|
+
addons: ::Array[Dodopayments::Subscription::ScheduledChange::Addon],
|
|
206
|
+
created_at: Time,
|
|
207
|
+
effective_at: Time,
|
|
208
|
+
product_id: String,
|
|
209
|
+
quantity: Integer,
|
|
210
|
+
?product_description: String?,
|
|
211
|
+
?product_name: String?
|
|
212
|
+
) -> void
|
|
213
|
+
|
|
214
|
+
def to_hash: -> {
|
|
215
|
+
id: String,
|
|
216
|
+
addons: ::Array[Dodopayments::Subscription::ScheduledChange::Addon],
|
|
217
|
+
created_at: Time,
|
|
218
|
+
effective_at: Time,
|
|
219
|
+
product_id: String,
|
|
220
|
+
quantity: Integer,
|
|
221
|
+
product_description: String?,
|
|
222
|
+
product_name: String?
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
type addon = { addon_id: String, name: String, quantity: Integer }
|
|
226
|
+
|
|
227
|
+
class Addon < Dodopayments::Internal::Type::BaseModel
|
|
228
|
+
attr_accessor addon_id: String
|
|
229
|
+
|
|
230
|
+
attr_accessor name: String
|
|
231
|
+
|
|
232
|
+
attr_accessor quantity: Integer
|
|
233
|
+
|
|
234
|
+
def initialize: (
|
|
235
|
+
addon_id: String,
|
|
236
|
+
name: String,
|
|
237
|
+
quantity: Integer
|
|
238
|
+
) -> void
|
|
239
|
+
|
|
240
|
+
def to_hash: -> { addon_id: String, name: String, quantity: Integer }
|
|
241
|
+
end
|
|
242
|
+
end
|
|
168
243
|
end
|
|
169
244
|
end
|
|
170
245
|
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type subscription_cancel_change_plan_params =
|
|
4
|
+
{ subscription_id: String }
|
|
5
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class SubscriptionCancelChangePlanParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor subscription_id: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
subscription_id: String,
|
|
15
|
+
?request_options: Dodopayments::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
subscription_id: String,
|
|
20
|
+
request_options: Dodopayments::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -27,6 +27,7 @@ module Dodopayments
|
|
|
27
27
|
discount_id: String?,
|
|
28
28
|
payment_method_id: String?,
|
|
29
29
|
product_name: String?,
|
|
30
|
+
scheduled_change: Dodopayments::Models::SubscriptionListResponse::ScheduledChange?,
|
|
30
31
|
tax_id: String?
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -81,6 +82,8 @@ module Dodopayments
|
|
|
81
82
|
|
|
82
83
|
attr_accessor product_name: String?
|
|
83
84
|
|
|
85
|
+
attr_accessor scheduled_change: Dodopayments::Models::SubscriptionListResponse::ScheduledChange?
|
|
86
|
+
|
|
84
87
|
attr_accessor tax_id: String?
|
|
85
88
|
|
|
86
89
|
def initialize: (
|
|
@@ -109,6 +112,7 @@ module Dodopayments
|
|
|
109
112
|
?discount_id: String?,
|
|
110
113
|
?payment_method_id: String?,
|
|
111
114
|
?product_name: String?,
|
|
115
|
+
?scheduled_change: Dodopayments::Models::SubscriptionListResponse::ScheduledChange?,
|
|
112
116
|
?tax_id: String?
|
|
113
117
|
) -> void
|
|
114
118
|
|
|
@@ -138,8 +142,79 @@ module Dodopayments
|
|
|
138
142
|
discount_id: String?,
|
|
139
143
|
payment_method_id: String?,
|
|
140
144
|
product_name: String?,
|
|
145
|
+
scheduled_change: Dodopayments::Models::SubscriptionListResponse::ScheduledChange?,
|
|
141
146
|
tax_id: String?
|
|
142
147
|
}
|
|
148
|
+
|
|
149
|
+
type scheduled_change =
|
|
150
|
+
{
|
|
151
|
+
id: String,
|
|
152
|
+
addons: ::Array[Dodopayments::Models::SubscriptionListResponse::ScheduledChange::Addon],
|
|
153
|
+
created_at: Time,
|
|
154
|
+
effective_at: Time,
|
|
155
|
+
product_id: String,
|
|
156
|
+
quantity: Integer,
|
|
157
|
+
product_description: String?,
|
|
158
|
+
product_name: String?
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
class ScheduledChange < Dodopayments::Internal::Type::BaseModel
|
|
162
|
+
attr_accessor id: String
|
|
163
|
+
|
|
164
|
+
attr_accessor addons: ::Array[Dodopayments::Models::SubscriptionListResponse::ScheduledChange::Addon]
|
|
165
|
+
|
|
166
|
+
attr_accessor created_at: Time
|
|
167
|
+
|
|
168
|
+
attr_accessor effective_at: Time
|
|
169
|
+
|
|
170
|
+
attr_accessor product_id: String
|
|
171
|
+
|
|
172
|
+
attr_accessor quantity: Integer
|
|
173
|
+
|
|
174
|
+
attr_accessor product_description: String?
|
|
175
|
+
|
|
176
|
+
attr_accessor product_name: String?
|
|
177
|
+
|
|
178
|
+
def initialize: (
|
|
179
|
+
id: String,
|
|
180
|
+
addons: ::Array[Dodopayments::Models::SubscriptionListResponse::ScheduledChange::Addon],
|
|
181
|
+
created_at: Time,
|
|
182
|
+
effective_at: Time,
|
|
183
|
+
product_id: String,
|
|
184
|
+
quantity: Integer,
|
|
185
|
+
?product_description: String?,
|
|
186
|
+
?product_name: String?
|
|
187
|
+
) -> void
|
|
188
|
+
|
|
189
|
+
def to_hash: -> {
|
|
190
|
+
id: String,
|
|
191
|
+
addons: ::Array[Dodopayments::Models::SubscriptionListResponse::ScheduledChange::Addon],
|
|
192
|
+
created_at: Time,
|
|
193
|
+
effective_at: Time,
|
|
194
|
+
product_id: String,
|
|
195
|
+
quantity: Integer,
|
|
196
|
+
product_description: String?,
|
|
197
|
+
product_name: String?
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
type addon = { addon_id: String, name: String, quantity: Integer }
|
|
201
|
+
|
|
202
|
+
class Addon < Dodopayments::Internal::Type::BaseModel
|
|
203
|
+
attr_accessor addon_id: String
|
|
204
|
+
|
|
205
|
+
attr_accessor name: String
|
|
206
|
+
|
|
207
|
+
attr_accessor quantity: Integer
|
|
208
|
+
|
|
209
|
+
def initialize: (
|
|
210
|
+
addon_id: String,
|
|
211
|
+
name: String,
|
|
212
|
+
quantity: Integer
|
|
213
|
+
) -> void
|
|
214
|
+
|
|
215
|
+
def to_hash: -> { addon_id: String, name: String, quantity: Integer }
|
|
216
|
+
end
|
|
217
|
+
end
|
|
143
218
|
end
|
|
144
219
|
end
|
|
145
220
|
end
|
|
@@ -23,21 +23,26 @@ module Dodopayments
|
|
|
23
23
|
|
|
24
24
|
type immediate_charge =
|
|
25
25
|
{
|
|
26
|
+
effective_at: Time,
|
|
26
27
|
line_items: ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item],
|
|
27
28
|
summary: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
class ImmediateCharge < Dodopayments::Internal::Type::BaseModel
|
|
32
|
+
attr_accessor effective_at: Time
|
|
33
|
+
|
|
31
34
|
attr_accessor line_items: ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item]
|
|
32
35
|
|
|
33
36
|
attr_accessor summary: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary
|
|
34
37
|
|
|
35
38
|
def initialize: (
|
|
39
|
+
effective_at: Time,
|
|
36
40
|
line_items: ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item],
|
|
37
41
|
summary: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary
|
|
38
42
|
) -> void
|
|
39
43
|
|
|
40
44
|
def to_hash: -> {
|
|
45
|
+
effective_at: Time,
|
|
41
46
|
line_items: ::Array[Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::line_item],
|
|
42
47
|
summary: Dodopayments::Models::SubscriptionPreviewChangePlanResponse::ImmediateCharge::Summary
|
|
43
48
|
}
|
|
@@ -7,6 +7,7 @@ module Dodopayments
|
|
|
7
7
|
quantity: Integer,
|
|
8
8
|
addons: ::Array[Dodopayments::AttachAddon]?,
|
|
9
9
|
discount_code: String?,
|
|
10
|
+
effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at,
|
|
10
11
|
metadata: ::Hash[Symbol, String]?,
|
|
11
12
|
on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
|
|
12
13
|
}
|
|
@@ -22,6 +23,12 @@ module Dodopayments
|
|
|
22
23
|
|
|
23
24
|
attr_accessor discount_code: String?
|
|
24
25
|
|
|
26
|
+
attr_reader effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at?
|
|
27
|
+
|
|
28
|
+
def effective_at=: (
|
|
29
|
+
Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at
|
|
30
|
+
) -> Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at
|
|
31
|
+
|
|
25
32
|
attr_accessor metadata: ::Hash[Symbol, String]?
|
|
26
33
|
|
|
27
34
|
attr_accessor on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
|
|
@@ -32,6 +39,7 @@ module Dodopayments
|
|
|
32
39
|
quantity: Integer,
|
|
33
40
|
?addons: ::Array[Dodopayments::AttachAddon]?,
|
|
34
41
|
?discount_code: String?,
|
|
42
|
+
?effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at,
|
|
35
43
|
?metadata: ::Hash[Symbol, String]?,
|
|
36
44
|
?on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
|
|
37
45
|
) -> void
|
|
@@ -42,12 +50,16 @@ module Dodopayments
|
|
|
42
50
|
quantity: Integer,
|
|
43
51
|
addons: ::Array[Dodopayments::AttachAddon]?,
|
|
44
52
|
discount_code: String?,
|
|
53
|
+
effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at,
|
|
45
54
|
metadata: ::Hash[Symbol, String]?,
|
|
46
55
|
on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
|
|
47
56
|
}
|
|
48
57
|
|
|
49
58
|
type proration_billing_mode =
|
|
50
|
-
:prorated_immediately
|
|
59
|
+
:prorated_immediately
|
|
60
|
+
| :full_immediately
|
|
61
|
+
| :difference_immediately
|
|
62
|
+
| :do_not_bill
|
|
51
63
|
|
|
52
64
|
module ProrationBillingMode
|
|
53
65
|
extend Dodopayments::Internal::Type::Enum
|
|
@@ -55,10 +67,22 @@ module Dodopayments
|
|
|
55
67
|
PRORATED_IMMEDIATELY: :prorated_immediately
|
|
56
68
|
FULL_IMMEDIATELY: :full_immediately
|
|
57
69
|
DIFFERENCE_IMMEDIATELY: :difference_immediately
|
|
70
|
+
DO_NOT_BILL: :do_not_bill
|
|
58
71
|
|
|
59
72
|
def self?.values: -> ::Array[Dodopayments::Models::UpdateSubscriptionPlanReq::proration_billing_mode]
|
|
60
73
|
end
|
|
61
74
|
|
|
75
|
+
type effective_at = :immediately | :next_billing_date
|
|
76
|
+
|
|
77
|
+
module EffectiveAt
|
|
78
|
+
extend Dodopayments::Internal::Type::Enum
|
|
79
|
+
|
|
80
|
+
IMMEDIATELY: :immediately
|
|
81
|
+
NEXT_BILLING_DATE: :next_billing_date
|
|
82
|
+
|
|
83
|
+
def self?.values: -> ::Array[Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at]
|
|
84
|
+
end
|
|
85
|
+
|
|
62
86
|
type on_payment_failure = :prevent_change | :apply_change
|
|
63
87
|
|
|
64
88
|
module OnPaymentFailure
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type your_webhook_url_create_params =
|
|
4
|
+
{
|
|
5
|
+
webhook_id: String,
|
|
6
|
+
webhook_signature: String,
|
|
7
|
+
webhook_timestamp: String
|
|
8
|
+
}
|
|
9
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
10
|
+
|
|
11
|
+
class YourWebhookURLCreateParams < Dodopayments::Models::WebhookPayload
|
|
12
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
13
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
14
|
+
|
|
15
|
+
def webhook_id: -> String
|
|
16
|
+
|
|
17
|
+
def webhook_id=: (String _) -> String
|
|
18
|
+
|
|
19
|
+
def webhook_signature: -> String
|
|
20
|
+
|
|
21
|
+
def webhook_signature=: (String _) -> String
|
|
22
|
+
|
|
23
|
+
def webhook_timestamp: -> String
|
|
24
|
+
|
|
25
|
+
def webhook_timestamp=: (String _) -> String
|
|
26
|
+
|
|
27
|
+
def initialize: (
|
|
28
|
+
webhook_id: String,
|
|
29
|
+
webhook_signature: String,
|
|
30
|
+
webhook_timestamp: String,
|
|
31
|
+
?request_options: Dodopayments::request_opts
|
|
32
|
+
) -> void
|
|
33
|
+
|
|
34
|
+
def to_hash: -> {
|
|
35
|
+
webhook_id: String,
|
|
36
|
+
webhook_signature: String,
|
|
37
|
+
webhook_timestamp: String,
|
|
38
|
+
request_options: Dodopayments::RequestOptions
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
data/sig/dodopayments/models.rbs
CHANGED
|
@@ -273,6 +273,22 @@ module Dodopayments
|
|
|
273
273
|
|
|
274
274
|
class ProductArchiveParams = Dodopayments::Models::ProductArchiveParams
|
|
275
275
|
|
|
276
|
+
class ProductCollectionCreateParams = Dodopayments::Models::ProductCollectionCreateParams
|
|
277
|
+
|
|
278
|
+
class ProductCollectionDeleteParams = Dodopayments::Models::ProductCollectionDeleteParams
|
|
279
|
+
|
|
280
|
+
class ProductCollectionListParams = Dodopayments::Models::ProductCollectionListParams
|
|
281
|
+
|
|
282
|
+
class ProductCollectionRetrieveParams = Dodopayments::Models::ProductCollectionRetrieveParams
|
|
283
|
+
|
|
284
|
+
module ProductCollections = Dodopayments::Models::ProductCollections
|
|
285
|
+
|
|
286
|
+
class ProductCollectionUnarchiveParams = Dodopayments::Models::ProductCollectionUnarchiveParams
|
|
287
|
+
|
|
288
|
+
class ProductCollectionUpdateImagesParams = Dodopayments::Models::ProductCollectionUpdateImagesParams
|
|
289
|
+
|
|
290
|
+
class ProductCollectionUpdateParams = Dodopayments::Models::ProductCollectionUpdateParams
|
|
291
|
+
|
|
276
292
|
class ProductCreateParams = Dodopayments::Models::ProductCreateParams
|
|
277
293
|
|
|
278
294
|
class ProductItemReq = Dodopayments::Models::ProductItemReq
|
|
@@ -309,6 +325,8 @@ module Dodopayments
|
|
|
309
325
|
|
|
310
326
|
class SubscriptionActiveWebhookEvent = Dodopayments::Models::SubscriptionActiveWebhookEvent
|
|
311
327
|
|
|
328
|
+
class SubscriptionCancelChangePlanParams = Dodopayments::Models::SubscriptionCancelChangePlanParams
|
|
329
|
+
|
|
312
330
|
class SubscriptionCancelledWebhookEvent = Dodopayments::Models::SubscriptionCancelledWebhookEvent
|
|
313
331
|
|
|
314
332
|
class SubscriptionChangePlanParams = Dodopayments::Models::SubscriptionChangePlanParams
|
|
@@ -390,4 +408,6 @@ module Dodopayments
|
|
|
390
408
|
class WebhookUnwrapParams = Dodopayments::Models::WebhookUnwrapParams
|
|
391
409
|
|
|
392
410
|
class WebhookUpdateParams = Dodopayments::Models::WebhookUpdateParams
|
|
411
|
+
|
|
412
|
+
class YourWebhookURLCreateParams = Dodopayments::Models::YourWebhookURLCreateParams
|
|
393
413
|
end
|
|
@@ -6,6 +6,7 @@ module Dodopayments
|
|
|
6
6
|
?allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
|
|
7
7
|
?billing_address: Dodopayments::CheckoutSessionBillingAddress?,
|
|
8
8
|
?billing_currency: Dodopayments::Models::currency?,
|
|
9
|
+
?cancel_url: String?,
|
|
9
10
|
?confirm: bool,
|
|
10
11
|
?custom_fields: ::Array[Dodopayments::CustomField]?,
|
|
11
12
|
?customer: Dodopayments::Models::customer_request?,
|
|
@@ -35,6 +36,7 @@ module Dodopayments
|
|
|
35
36
|
?allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
|
|
36
37
|
?billing_address: Dodopayments::CheckoutSessionBillingAddress?,
|
|
37
38
|
?billing_currency: Dodopayments::Models::currency?,
|
|
39
|
+
?cancel_url: String?,
|
|
38
40
|
?confirm: bool,
|
|
39
41
|
?custom_fields: ::Array[Dodopayments::CustomField]?,
|
|
40
42
|
?customer: Dodopayments::Models::customer_request?,
|
|
@@ -7,6 +7,11 @@ module Dodopayments
|
|
|
7
7
|
?request_options: Dodopayments::request_opts
|
|
8
8
|
) -> StringIO
|
|
9
9
|
|
|
10
|
+
def retrieve_payout: (
|
|
11
|
+
String payout_id,
|
|
12
|
+
?request_options: Dodopayments::request_opts
|
|
13
|
+
) -> StringIO
|
|
14
|
+
|
|
10
15
|
def retrieve_refund: (
|
|
11
16
|
String refund_id,
|
|
12
17
|
?request_options: Dodopayments::request_opts
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Resources
|
|
3
|
+
class ProductCollections
|
|
4
|
+
class Groups
|
|
5
|
+
class Items
|
|
6
|
+
def create: (
|
|
7
|
+
String group_id,
|
|
8
|
+
id: String,
|
|
9
|
+
products: ::Array[Dodopayments::ProductCollections::Groups::ItemCreateParams::Product],
|
|
10
|
+
?request_options: Dodopayments::request_opts
|
|
11
|
+
) -> Dodopayments::Models::ProductCollections::Groups::item_create_response
|
|
12
|
+
|
|
13
|
+
def update: (
|
|
14
|
+
String item_id,
|
|
15
|
+
id: String,
|
|
16
|
+
group_id: String,
|
|
17
|
+
status: bool,
|
|
18
|
+
?request_options: Dodopayments::request_opts
|
|
19
|
+
) -> nil
|
|
20
|
+
|
|
21
|
+
def delete: (
|
|
22
|
+
String item_id,
|
|
23
|
+
id: String,
|
|
24
|
+
group_id: String,
|
|
25
|
+
?request_options: Dodopayments::request_opts
|
|
26
|
+
) -> nil
|
|
27
|
+
|
|
28
|
+
def initialize: (client: Dodopayments::Client) -> void
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|