dodopayments 2.3.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 +9 -0
- data/README.md +1 -1
- data/lib/dodopayments/client.rb +0 -8
- data/lib/dodopayments/models/customer_delete_payment_method_params.rb +26 -0
- 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.rb +2 -18
- data/lib/dodopayments/resources/customers.rb +25 -0
- data/lib/dodopayments/resources/invoices/payments.rb +0 -18
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +4 -29
- data/rbi/dodopayments/client.rbi +0 -6
- 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/{your_webhook_url_create_params.rbi → customer_delete_payment_method_params.rbi} +9 -19
- data/rbi/dodopayments/models/dispute.rbi +12 -4
- data/rbi/dodopayments/models/dispute_list_response.rbi +11 -3
- data/rbi/dodopayments/models/get_dispute.rbi +12 -4
- 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 +12 -10
- data/rbi/dodopayments/models/refund.rbi +4 -4
- data/rbi/dodopayments/models/refund_list_item.rbi +4 -4
- data/rbi/dodopayments/models/subscription.rbi +10 -8
- data/rbi/dodopayments/models.rbi +3 -25
- data/rbi/dodopayments/resources/customers.rbi +16 -0
- data/rbi/dodopayments/resources/invoices/payments.rbi +0 -9
- data/sig/dodopayments/client.rbs +0 -4
- data/sig/dodopayments/models/{product_collection_update_images_params.rbs → customer_delete_payment_method_params.rbs} +9 -9
- 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.rbs +2 -18
- data/sig/dodopayments/resources/customers.rbs +6 -0
- data/sig/dodopayments/resources/invoices/payments.rbs +0 -5
- metadata +4 -79
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +0 -22
- data/lib/dodopayments/models/product_collection_create_params.rb +0 -98
- data/lib/dodopayments/models/product_collection_create_response.rb +0 -226
- data/lib/dodopayments/models/product_collection_delete_params.rb +0 -20
- data/lib/dodopayments/models/product_collection_list_params.rb +0 -46
- data/lib/dodopayments/models/product_collection_list_response.rb +0 -65
- data/lib/dodopayments/models/product_collection_retrieve_params.rb +0 -20
- data/lib/dodopayments/models/product_collection_retrieve_response.rb +0 -226
- data/lib/dodopayments/models/product_collection_unarchive_params.rb +0 -20
- data/lib/dodopayments/models/product_collection_unarchive_response.rb +0 -33
- data/lib/dodopayments/models/product_collection_update_images_params.rb +0 -29
- data/lib/dodopayments/models/product_collection_update_images_response.rb +0 -25
- data/lib/dodopayments/models/product_collection_update_params.rb +0 -61
- data/lib/dodopayments/models/product_collections/group_create_params.rb +0 -71
- data/lib/dodopayments/models/product_collections/group_create_response.rb +0 -160
- data/lib/dodopayments/models/product_collections/group_delete_params.rb +0 -28
- data/lib/dodopayments/models/product_collections/group_update_params.rb +0 -59
- data/lib/dodopayments/models/product_collections/groups/item_create_params.rb +0 -60
- data/lib/dodopayments/models/product_collections/groups/item_create_response.rb +0 -136
- data/lib/dodopayments/models/product_collections/groups/item_delete_params.rb +0 -36
- data/lib/dodopayments/models/product_collections/groups/item_update_params.rb +0 -47
- data/lib/dodopayments/models/your_webhook_url_create_params.rb +0 -32
- data/lib/dodopayments/resources/product_collections/groups/items.rb +0 -111
- data/lib/dodopayments/resources/product_collections/groups.rb +0 -109
- data/lib/dodopayments/resources/product_collections.rb +0 -179
- data/lib/dodopayments/resources/your_webhook_url.rb +0 -56
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +0 -40
- data/rbi/dodopayments/models/product_collection_create_params.rbi +0 -180
- data/rbi/dodopayments/models/product_collection_create_response.rbi +0 -303
- data/rbi/dodopayments/models/product_collection_delete_params.rbi +0 -38
- data/rbi/dodopayments/models/product_collection_list_params.rbi +0 -82
- data/rbi/dodopayments/models/product_collection_list_response.rbi +0 -88
- data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +0 -38
- data/rbi/dodopayments/models/product_collection_retrieve_response.rbi +0 -305
- data/rbi/dodopayments/models/product_collection_unarchive_params.rbi +0 -38
- data/rbi/dodopayments/models/product_collection_unarchive_response.rbi +0 -56
- data/rbi/dodopayments/models/product_collection_update_images_params.rbi +0 -52
- data/rbi/dodopayments/models/product_collection_update_images_response.rbi +0 -40
- data/rbi/dodopayments/models/product_collection_update_params.rbi +0 -84
- data/rbi/dodopayments/models/product_collections/group_create_params.rbi +0 -123
- data/rbi/dodopayments/models/product_collections/group_create_response.rbi +0 -204
- data/rbi/dodopayments/models/product_collections/group_delete_params.rbi +0 -48
- data/rbi/dodopayments/models/product_collections/group_update_params.rbi +0 -80
- data/rbi/dodopayments/models/product_collections/groups/item_create_params.rbi +0 -113
- data/rbi/dodopayments/models/product_collections/groups/item_create_response.rbi +0 -156
- data/rbi/dodopayments/models/product_collections/groups/item_delete_params.rbi +0 -55
- data/rbi/dodopayments/models/product_collections/groups/item_update_params.rbi +0 -68
- data/rbi/dodopayments/resources/product_collections/groups/items.rbi +0 -83
- data/rbi/dodopayments/resources/product_collections/groups.rbi +0 -90
- data/rbi/dodopayments/resources/product_collections.rbi +0 -149
- data/rbi/dodopayments/resources/your_webhook_url.rbi +0 -53
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +0 -25
- data/sig/dodopayments/models/product_collection_create_params.rbs +0 -80
- data/sig/dodopayments/models/product_collection_create_response.rbs +0 -179
- data/sig/dodopayments/models/product_collection_delete_params.rbs +0 -23
- data/sig/dodopayments/models/product_collection_list_params.rbs +0 -49
- data/sig/dodopayments/models/product_collection_list_response.rbs +0 -50
- data/sig/dodopayments/models/product_collection_retrieve_params.rbs +0 -23
- data/sig/dodopayments/models/product_collection_retrieve_response.rbs +0 -179
- data/sig/dodopayments/models/product_collection_unarchive_params.rbs +0 -23
- data/sig/dodopayments/models/product_collection_unarchive_response.rbs +0 -30
- data/sig/dodopayments/models/product_collection_update_images_response.rbs +0 -16
- data/sig/dodopayments/models/product_collection_update_params.rbs +0 -51
- data/sig/dodopayments/models/product_collections/group_create_params.rbs +0 -55
- data/sig/dodopayments/models/product_collections/group_create_response.rbs +0 -129
- data/sig/dodopayments/models/product_collections/group_delete_params.rbs +0 -30
- data/sig/dodopayments/models/product_collections/group_update_params.rbs +0 -48
- data/sig/dodopayments/models/product_collections/groups/item_create_params.rbs +0 -52
- data/sig/dodopayments/models/product_collections/groups/item_create_response.rbs +0 -104
- data/sig/dodopayments/models/product_collections/groups/item_delete_params.rbs +0 -36
- data/sig/dodopayments/models/product_collections/groups/item_update_params.rbs +0 -40
- data/sig/dodopayments/models/your_webhook_url_create_params.rbs +0 -42
- data/sig/dodopayments/resources/product_collections/groups/items.rbs +0 -33
- data/sig/dodopayments/resources/product_collections/groups.rbs +0 -34
- data/sig/dodopayments/resources/product_collections.rbs +0 -56
- data/sig/dodopayments/resources/your_webhook_url.rbs +0 -18
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
class ProductCollectionRetrieveResponse < Dodopayments::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias do
|
|
8
|
-
T.any(
|
|
9
|
-
Dodopayments::Models::ProductCollectionRetrieveResponse,
|
|
10
|
-
Dodopayments::Internal::AnyHash
|
|
11
|
-
)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# Unique identifier for the product collection
|
|
15
|
-
sig { returns(String) }
|
|
16
|
-
attr_accessor :id
|
|
17
|
-
|
|
18
|
-
# Brand ID for the collection
|
|
19
|
-
sig { returns(String) }
|
|
20
|
-
attr_accessor :brand_id
|
|
21
|
-
|
|
22
|
-
# Timestamp when the collection was created
|
|
23
|
-
sig { returns(Time) }
|
|
24
|
-
attr_accessor :created_at
|
|
25
|
-
|
|
26
|
-
# Groups in this collection
|
|
27
|
-
sig do
|
|
28
|
-
returns(
|
|
29
|
-
T::Array[
|
|
30
|
-
Dodopayments::Models::ProductCollectionRetrieveResponse::Group
|
|
31
|
-
]
|
|
32
|
-
)
|
|
33
|
-
end
|
|
34
|
-
attr_accessor :groups
|
|
35
|
-
|
|
36
|
-
# Name of the collection
|
|
37
|
-
sig { returns(String) }
|
|
38
|
-
attr_accessor :name
|
|
39
|
-
|
|
40
|
-
# Timestamp when the collection was last updated
|
|
41
|
-
sig { returns(Time) }
|
|
42
|
-
attr_accessor :updated_at
|
|
43
|
-
|
|
44
|
-
# Description of the collection
|
|
45
|
-
sig { returns(T.nilable(String)) }
|
|
46
|
-
attr_accessor :description
|
|
47
|
-
|
|
48
|
-
# URL of the collection image
|
|
49
|
-
sig { returns(T.nilable(String)) }
|
|
50
|
-
attr_accessor :image
|
|
51
|
-
|
|
52
|
-
sig do
|
|
53
|
-
params(
|
|
54
|
-
id: String,
|
|
55
|
-
brand_id: String,
|
|
56
|
-
created_at: Time,
|
|
57
|
-
groups:
|
|
58
|
-
T::Array[
|
|
59
|
-
Dodopayments::Models::ProductCollectionRetrieveResponse::Group::OrHash
|
|
60
|
-
],
|
|
61
|
-
name: String,
|
|
62
|
-
updated_at: Time,
|
|
63
|
-
description: T.nilable(String),
|
|
64
|
-
image: T.nilable(String)
|
|
65
|
-
).returns(T.attached_class)
|
|
66
|
-
end
|
|
67
|
-
def self.new(
|
|
68
|
-
# Unique identifier for the product collection
|
|
69
|
-
id:,
|
|
70
|
-
# Brand ID for the collection
|
|
71
|
-
brand_id:,
|
|
72
|
-
# Timestamp when the collection was created
|
|
73
|
-
created_at:,
|
|
74
|
-
# Groups in this collection
|
|
75
|
-
groups:,
|
|
76
|
-
# Name of the collection
|
|
77
|
-
name:,
|
|
78
|
-
# Timestamp when the collection was last updated
|
|
79
|
-
updated_at:,
|
|
80
|
-
# Description of the collection
|
|
81
|
-
description: nil,
|
|
82
|
-
# URL of the collection image
|
|
83
|
-
image: nil
|
|
84
|
-
)
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
sig do
|
|
88
|
-
override.returns(
|
|
89
|
-
{
|
|
90
|
-
id: String,
|
|
91
|
-
brand_id: String,
|
|
92
|
-
created_at: Time,
|
|
93
|
-
groups:
|
|
94
|
-
T::Array[
|
|
95
|
-
Dodopayments::Models::ProductCollectionRetrieveResponse::Group
|
|
96
|
-
],
|
|
97
|
-
name: String,
|
|
98
|
-
updated_at: Time,
|
|
99
|
-
description: T.nilable(String),
|
|
100
|
-
image: T.nilable(String)
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
end
|
|
104
|
-
def to_hash
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
class Group < Dodopayments::Internal::Type::BaseModel
|
|
108
|
-
OrHash =
|
|
109
|
-
T.type_alias do
|
|
110
|
-
T.any(
|
|
111
|
-
Dodopayments::Models::ProductCollectionRetrieveResponse::Group,
|
|
112
|
-
Dodopayments::Internal::AnyHash
|
|
113
|
-
)
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
sig { returns(String) }
|
|
117
|
-
attr_accessor :group_id
|
|
118
|
-
|
|
119
|
-
sig do
|
|
120
|
-
returns(
|
|
121
|
-
T::Array[
|
|
122
|
-
Dodopayments::Models::ProductCollectionRetrieveResponse::Group::Product
|
|
123
|
-
]
|
|
124
|
-
)
|
|
125
|
-
end
|
|
126
|
-
attr_accessor :products
|
|
127
|
-
|
|
128
|
-
sig { returns(T::Boolean) }
|
|
129
|
-
attr_accessor :status
|
|
130
|
-
|
|
131
|
-
sig { returns(T.nilable(String)) }
|
|
132
|
-
attr_accessor :group_name
|
|
133
|
-
|
|
134
|
-
sig do
|
|
135
|
-
params(
|
|
136
|
-
group_id: String,
|
|
137
|
-
products:
|
|
138
|
-
T::Array[
|
|
139
|
-
Dodopayments::Models::ProductCollectionRetrieveResponse::Group::Product::OrHash
|
|
140
|
-
],
|
|
141
|
-
status: T::Boolean,
|
|
142
|
-
group_name: T.nilable(String)
|
|
143
|
-
).returns(T.attached_class)
|
|
144
|
-
end
|
|
145
|
-
def self.new(group_id:, products:, status:, group_name: nil)
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
sig do
|
|
149
|
-
override.returns(
|
|
150
|
-
{
|
|
151
|
-
group_id: String,
|
|
152
|
-
products:
|
|
153
|
-
T::Array[
|
|
154
|
-
Dodopayments::Models::ProductCollectionRetrieveResponse::Group::Product
|
|
155
|
-
],
|
|
156
|
-
status: T::Boolean,
|
|
157
|
-
group_name: T.nilable(String)
|
|
158
|
-
}
|
|
159
|
-
)
|
|
160
|
-
end
|
|
161
|
-
def to_hash
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
class Product < Dodopayments::Internal::Type::BaseModel
|
|
165
|
-
OrHash =
|
|
166
|
-
T.type_alias do
|
|
167
|
-
T.any(
|
|
168
|
-
Dodopayments::Models::ProductCollectionRetrieveResponse::Group::Product,
|
|
169
|
-
Dodopayments::Internal::AnyHash
|
|
170
|
-
)
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
sig { returns(String) }
|
|
174
|
-
attr_accessor :id
|
|
175
|
-
|
|
176
|
-
sig { returns(Integer) }
|
|
177
|
-
attr_accessor :addons_count
|
|
178
|
-
|
|
179
|
-
sig { returns(Integer) }
|
|
180
|
-
attr_accessor :files_count
|
|
181
|
-
|
|
182
|
-
# Whether this product has any credit entitlements attached
|
|
183
|
-
sig { returns(T::Boolean) }
|
|
184
|
-
attr_accessor :has_credit_entitlements
|
|
185
|
-
|
|
186
|
-
sig { returns(T::Boolean) }
|
|
187
|
-
attr_accessor :is_recurring
|
|
188
|
-
|
|
189
|
-
sig { returns(T::Boolean) }
|
|
190
|
-
attr_accessor :license_key_enabled
|
|
191
|
-
|
|
192
|
-
sig { returns(Integer) }
|
|
193
|
-
attr_accessor :meters_count
|
|
194
|
-
|
|
195
|
-
sig { returns(String) }
|
|
196
|
-
attr_accessor :product_id
|
|
197
|
-
|
|
198
|
-
sig { returns(T::Boolean) }
|
|
199
|
-
attr_accessor :status
|
|
200
|
-
|
|
201
|
-
sig { returns(T.nilable(Dodopayments::Currency::TaggedSymbol)) }
|
|
202
|
-
attr_accessor :currency
|
|
203
|
-
|
|
204
|
-
sig { returns(T.nilable(String)) }
|
|
205
|
-
attr_accessor :description
|
|
206
|
-
|
|
207
|
-
sig { returns(T.nilable(String)) }
|
|
208
|
-
attr_accessor :name
|
|
209
|
-
|
|
210
|
-
sig { returns(T.nilable(Integer)) }
|
|
211
|
-
attr_accessor :price
|
|
212
|
-
|
|
213
|
-
# One-time price details.
|
|
214
|
-
sig { returns(T.nilable(Dodopayments::Price::Variants)) }
|
|
215
|
-
attr_accessor :price_detail
|
|
216
|
-
|
|
217
|
-
# Represents the different categories of taxation applicable to various products
|
|
218
|
-
# and services.
|
|
219
|
-
sig { returns(T.nilable(Dodopayments::TaxCategory::TaggedSymbol)) }
|
|
220
|
-
attr_accessor :tax_category
|
|
221
|
-
|
|
222
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
223
|
-
attr_accessor :tax_inclusive
|
|
224
|
-
|
|
225
|
-
sig do
|
|
226
|
-
params(
|
|
227
|
-
id: String,
|
|
228
|
-
addons_count: Integer,
|
|
229
|
-
files_count: Integer,
|
|
230
|
-
has_credit_entitlements: T::Boolean,
|
|
231
|
-
is_recurring: T::Boolean,
|
|
232
|
-
license_key_enabled: T::Boolean,
|
|
233
|
-
meters_count: Integer,
|
|
234
|
-
product_id: String,
|
|
235
|
-
status: T::Boolean,
|
|
236
|
-
currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
237
|
-
description: T.nilable(String),
|
|
238
|
-
name: T.nilable(String),
|
|
239
|
-
price: T.nilable(Integer),
|
|
240
|
-
price_detail:
|
|
241
|
-
T.nilable(
|
|
242
|
-
T.any(
|
|
243
|
-
Dodopayments::Price::OneTimePrice::OrHash,
|
|
244
|
-
Dodopayments::Price::RecurringPrice::OrHash,
|
|
245
|
-
Dodopayments::Price::UsageBasedPrice::OrHash
|
|
246
|
-
)
|
|
247
|
-
),
|
|
248
|
-
tax_category: T.nilable(Dodopayments::TaxCategory::OrSymbol),
|
|
249
|
-
tax_inclusive: T.nilable(T::Boolean)
|
|
250
|
-
).returns(T.attached_class)
|
|
251
|
-
end
|
|
252
|
-
def self.new(
|
|
253
|
-
id:,
|
|
254
|
-
addons_count:,
|
|
255
|
-
files_count:,
|
|
256
|
-
# Whether this product has any credit entitlements attached
|
|
257
|
-
has_credit_entitlements:,
|
|
258
|
-
is_recurring:,
|
|
259
|
-
license_key_enabled:,
|
|
260
|
-
meters_count:,
|
|
261
|
-
product_id:,
|
|
262
|
-
status:,
|
|
263
|
-
currency: nil,
|
|
264
|
-
description: nil,
|
|
265
|
-
name: nil,
|
|
266
|
-
price: nil,
|
|
267
|
-
# One-time price details.
|
|
268
|
-
price_detail: nil,
|
|
269
|
-
# Represents the different categories of taxation applicable to various products
|
|
270
|
-
# and services.
|
|
271
|
-
tax_category: nil,
|
|
272
|
-
tax_inclusive: nil
|
|
273
|
-
)
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
sig do
|
|
277
|
-
override.returns(
|
|
278
|
-
{
|
|
279
|
-
id: String,
|
|
280
|
-
addons_count: Integer,
|
|
281
|
-
files_count: Integer,
|
|
282
|
-
has_credit_entitlements: T::Boolean,
|
|
283
|
-
is_recurring: T::Boolean,
|
|
284
|
-
license_key_enabled: T::Boolean,
|
|
285
|
-
meters_count: Integer,
|
|
286
|
-
product_id: String,
|
|
287
|
-
status: T::Boolean,
|
|
288
|
-
currency: T.nilable(Dodopayments::Currency::TaggedSymbol),
|
|
289
|
-
description: T.nilable(String),
|
|
290
|
-
name: T.nilable(String),
|
|
291
|
-
price: T.nilable(Integer),
|
|
292
|
-
price_detail: T.nilable(Dodopayments::Price::Variants),
|
|
293
|
-
tax_category:
|
|
294
|
-
T.nilable(Dodopayments::TaxCategory::TaggedSymbol),
|
|
295
|
-
tax_inclusive: T.nilable(T::Boolean)
|
|
296
|
-
}
|
|
297
|
-
)
|
|
298
|
-
end
|
|
299
|
-
def to_hash
|
|
300
|
-
end
|
|
301
|
-
end
|
|
302
|
-
end
|
|
303
|
-
end
|
|
304
|
-
end
|
|
305
|
-
end
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
class ProductCollectionUnarchiveParams < Dodopayments::Internal::Type::BaseModel
|
|
6
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
7
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
8
|
-
|
|
9
|
-
OrHash =
|
|
10
|
-
T.type_alias do
|
|
11
|
-
T.any(
|
|
12
|
-
Dodopayments::ProductCollectionUnarchiveParams,
|
|
13
|
-
Dodopayments::Internal::AnyHash
|
|
14
|
-
)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
sig { returns(String) }
|
|
18
|
-
attr_accessor :id
|
|
19
|
-
|
|
20
|
-
sig do
|
|
21
|
-
params(
|
|
22
|
-
id: String,
|
|
23
|
-
request_options: Dodopayments::RequestOptions::OrHash
|
|
24
|
-
).returns(T.attached_class)
|
|
25
|
-
end
|
|
26
|
-
def self.new(id:, request_options: {})
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
sig do
|
|
30
|
-
override.returns(
|
|
31
|
-
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
32
|
-
)
|
|
33
|
-
end
|
|
34
|
-
def to_hash
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
class ProductCollectionUnarchiveResponse < Dodopayments::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias do
|
|
8
|
-
T.any(
|
|
9
|
-
Dodopayments::Models::ProductCollectionUnarchiveResponse,
|
|
10
|
-
Dodopayments::Internal::AnyHash
|
|
11
|
-
)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# Collection ID that was unarchived
|
|
15
|
-
sig { returns(String) }
|
|
16
|
-
attr_accessor :collection_id
|
|
17
|
-
|
|
18
|
-
# Product IDs that were excluded because they are archived
|
|
19
|
-
sig { returns(T::Array[String]) }
|
|
20
|
-
attr_accessor :excluded_product_ids
|
|
21
|
-
|
|
22
|
-
# Success message
|
|
23
|
-
sig { returns(String) }
|
|
24
|
-
attr_accessor :message
|
|
25
|
-
|
|
26
|
-
sig do
|
|
27
|
-
params(
|
|
28
|
-
collection_id: String,
|
|
29
|
-
excluded_product_ids: T::Array[String],
|
|
30
|
-
message: String
|
|
31
|
-
).returns(T.attached_class)
|
|
32
|
-
end
|
|
33
|
-
def self.new(
|
|
34
|
-
# Collection ID that was unarchived
|
|
35
|
-
collection_id:,
|
|
36
|
-
# Product IDs that were excluded because they are archived
|
|
37
|
-
excluded_product_ids:,
|
|
38
|
-
# Success message
|
|
39
|
-
message:
|
|
40
|
-
)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
sig do
|
|
44
|
-
override.returns(
|
|
45
|
-
{
|
|
46
|
-
collection_id: String,
|
|
47
|
-
excluded_product_ids: T::Array[String],
|
|
48
|
-
message: String
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
end
|
|
52
|
-
def to_hash
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
class ProductCollectionUpdateImagesParams < Dodopayments::Internal::Type::BaseModel
|
|
6
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
7
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
8
|
-
|
|
9
|
-
OrHash =
|
|
10
|
-
T.type_alias do
|
|
11
|
-
T.any(
|
|
12
|
-
Dodopayments::ProductCollectionUpdateImagesParams,
|
|
13
|
-
Dodopayments::Internal::AnyHash
|
|
14
|
-
)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
sig { returns(String) }
|
|
18
|
-
attr_accessor :id
|
|
19
|
-
|
|
20
|
-
# If true, generates a new image ID to force cache invalidation
|
|
21
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
22
|
-
attr_accessor :force_update
|
|
23
|
-
|
|
24
|
-
sig do
|
|
25
|
-
params(
|
|
26
|
-
id: String,
|
|
27
|
-
force_update: T.nilable(T::Boolean),
|
|
28
|
-
request_options: Dodopayments::RequestOptions::OrHash
|
|
29
|
-
).returns(T.attached_class)
|
|
30
|
-
end
|
|
31
|
-
def self.new(
|
|
32
|
-
id:,
|
|
33
|
-
# If true, generates a new image ID to force cache invalidation
|
|
34
|
-
force_update: nil,
|
|
35
|
-
request_options: {}
|
|
36
|
-
)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
sig do
|
|
40
|
-
override.returns(
|
|
41
|
-
{
|
|
42
|
-
id: String,
|
|
43
|
-
force_update: T.nilable(T::Boolean),
|
|
44
|
-
request_options: Dodopayments::RequestOptions
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
end
|
|
48
|
-
def to_hash
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
class ProductCollectionUpdateImagesResponse < Dodopayments::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias do
|
|
8
|
-
T.any(
|
|
9
|
-
Dodopayments::Models::ProductCollectionUpdateImagesResponse,
|
|
10
|
-
Dodopayments::Internal::AnyHash
|
|
11
|
-
)
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# Presigned S3 URL for uploading the image
|
|
15
|
-
sig { returns(String) }
|
|
16
|
-
attr_accessor :url
|
|
17
|
-
|
|
18
|
-
# Optional image ID (present when force_update is true)
|
|
19
|
-
sig { returns(T.nilable(String)) }
|
|
20
|
-
attr_accessor :image_id
|
|
21
|
-
|
|
22
|
-
sig do
|
|
23
|
-
params(url: String, image_id: T.nilable(String)).returns(
|
|
24
|
-
T.attached_class
|
|
25
|
-
)
|
|
26
|
-
end
|
|
27
|
-
def self.new(
|
|
28
|
-
# Presigned S3 URL for uploading the image
|
|
29
|
-
url:,
|
|
30
|
-
# Optional image ID (present when force_update is true)
|
|
31
|
-
image_id: nil
|
|
32
|
-
)
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
sig { override.returns({ url: String, image_id: T.nilable(String) }) }
|
|
36
|
-
def to_hash
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
class ProductCollectionUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
6
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
7
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
8
|
-
|
|
9
|
-
OrHash =
|
|
10
|
-
T.type_alias do
|
|
11
|
-
T.any(
|
|
12
|
-
Dodopayments::ProductCollectionUpdateParams,
|
|
13
|
-
Dodopayments::Internal::AnyHash
|
|
14
|
-
)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
sig { returns(String) }
|
|
18
|
-
attr_accessor :id
|
|
19
|
-
|
|
20
|
-
# Optional brand_id update
|
|
21
|
-
sig { returns(T.nilable(String)) }
|
|
22
|
-
attr_accessor :brand_id
|
|
23
|
-
|
|
24
|
-
# Optional description update - pass null to remove, omit to keep unchanged
|
|
25
|
-
sig { returns(T.nilable(String)) }
|
|
26
|
-
attr_accessor :description
|
|
27
|
-
|
|
28
|
-
# Optional new order for groups (array of group UUIDs in desired order)
|
|
29
|
-
sig { returns(T.nilable(T::Array[String])) }
|
|
30
|
-
attr_accessor :group_order
|
|
31
|
-
|
|
32
|
-
# Optional image update - pass null to remove, omit to keep unchanged
|
|
33
|
-
sig { returns(T.nilable(String)) }
|
|
34
|
-
attr_accessor :image_id
|
|
35
|
-
|
|
36
|
-
# Optional new name for the collection
|
|
37
|
-
sig { returns(T.nilable(String)) }
|
|
38
|
-
attr_accessor :name
|
|
39
|
-
|
|
40
|
-
sig do
|
|
41
|
-
params(
|
|
42
|
-
id: String,
|
|
43
|
-
brand_id: T.nilable(String),
|
|
44
|
-
description: T.nilable(String),
|
|
45
|
-
group_order: T.nilable(T::Array[String]),
|
|
46
|
-
image_id: T.nilable(String),
|
|
47
|
-
name: T.nilable(String),
|
|
48
|
-
request_options: Dodopayments::RequestOptions::OrHash
|
|
49
|
-
).returns(T.attached_class)
|
|
50
|
-
end
|
|
51
|
-
def self.new(
|
|
52
|
-
id:,
|
|
53
|
-
# Optional brand_id update
|
|
54
|
-
brand_id: nil,
|
|
55
|
-
# Optional description update - pass null to remove, omit to keep unchanged
|
|
56
|
-
description: nil,
|
|
57
|
-
# Optional new order for groups (array of group UUIDs in desired order)
|
|
58
|
-
group_order: nil,
|
|
59
|
-
# Optional image update - pass null to remove, omit to keep unchanged
|
|
60
|
-
image_id: nil,
|
|
61
|
-
# Optional new name for the collection
|
|
62
|
-
name: nil,
|
|
63
|
-
request_options: {}
|
|
64
|
-
)
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
sig do
|
|
68
|
-
override.returns(
|
|
69
|
-
{
|
|
70
|
-
id: String,
|
|
71
|
-
brand_id: T.nilable(String),
|
|
72
|
-
description: T.nilable(String),
|
|
73
|
-
group_order: T.nilable(T::Array[String]),
|
|
74
|
-
image_id: T.nilable(String),
|
|
75
|
-
name: T.nilable(String),
|
|
76
|
-
request_options: Dodopayments::RequestOptions
|
|
77
|
-
}
|
|
78
|
-
)
|
|
79
|
-
end
|
|
80
|
-
def to_hash
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Dodopayments
|
|
4
|
-
module Models
|
|
5
|
-
module ProductCollections
|
|
6
|
-
class GroupCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
OrHash =
|
|
11
|
-
T.type_alias do
|
|
12
|
-
T.any(
|
|
13
|
-
Dodopayments::ProductCollections::GroupCreateParams,
|
|
14
|
-
Dodopayments::Internal::AnyHash
|
|
15
|
-
)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
sig { returns(String) }
|
|
19
|
-
attr_accessor :id
|
|
20
|
-
|
|
21
|
-
# Products in this group
|
|
22
|
-
sig do
|
|
23
|
-
returns(
|
|
24
|
-
T::Array[
|
|
25
|
-
Dodopayments::ProductCollections::GroupCreateParams::Product
|
|
26
|
-
]
|
|
27
|
-
)
|
|
28
|
-
end
|
|
29
|
-
attr_accessor :products
|
|
30
|
-
|
|
31
|
-
# Optional group name. Multiple groups can have null names, but named groups must
|
|
32
|
-
# be unique per collection
|
|
33
|
-
sig { returns(T.nilable(String)) }
|
|
34
|
-
attr_accessor :group_name
|
|
35
|
-
|
|
36
|
-
# Status of the group (defaults to true if not provided)
|
|
37
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
38
|
-
attr_accessor :status
|
|
39
|
-
|
|
40
|
-
sig do
|
|
41
|
-
params(
|
|
42
|
-
id: String,
|
|
43
|
-
products:
|
|
44
|
-
T::Array[
|
|
45
|
-
Dodopayments::ProductCollections::GroupCreateParams::Product::OrHash
|
|
46
|
-
],
|
|
47
|
-
group_name: T.nilable(String),
|
|
48
|
-
status: T.nilable(T::Boolean),
|
|
49
|
-
request_options: Dodopayments::RequestOptions::OrHash
|
|
50
|
-
).returns(T.attached_class)
|
|
51
|
-
end
|
|
52
|
-
def self.new(
|
|
53
|
-
id:,
|
|
54
|
-
# Products in this group
|
|
55
|
-
products:,
|
|
56
|
-
# Optional group name. Multiple groups can have null names, but named groups must
|
|
57
|
-
# be unique per collection
|
|
58
|
-
group_name: nil,
|
|
59
|
-
# Status of the group (defaults to true if not provided)
|
|
60
|
-
status: nil,
|
|
61
|
-
request_options: {}
|
|
62
|
-
)
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
sig do
|
|
66
|
-
override.returns(
|
|
67
|
-
{
|
|
68
|
-
id: String,
|
|
69
|
-
products:
|
|
70
|
-
T::Array[
|
|
71
|
-
Dodopayments::ProductCollections::GroupCreateParams::Product
|
|
72
|
-
],
|
|
73
|
-
group_name: T.nilable(String),
|
|
74
|
-
status: T.nilable(T::Boolean),
|
|
75
|
-
request_options: Dodopayments::RequestOptions
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
end
|
|
79
|
-
def to_hash
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
class Product < Dodopayments::Internal::Type::BaseModel
|
|
83
|
-
OrHash =
|
|
84
|
-
T.type_alias do
|
|
85
|
-
T.any(
|
|
86
|
-
Dodopayments::ProductCollections::GroupCreateParams::Product,
|
|
87
|
-
Dodopayments::Internal::AnyHash
|
|
88
|
-
)
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Product ID to include in the group
|
|
92
|
-
sig { returns(String) }
|
|
93
|
-
attr_accessor :product_id
|
|
94
|
-
|
|
95
|
-
# Status of the product in this group (defaults to true if not provided)
|
|
96
|
-
sig { returns(T.nilable(T::Boolean)) }
|
|
97
|
-
attr_accessor :status
|
|
98
|
-
|
|
99
|
-
sig do
|
|
100
|
-
params(product_id: String, status: T.nilable(T::Boolean)).returns(
|
|
101
|
-
T.attached_class
|
|
102
|
-
)
|
|
103
|
-
end
|
|
104
|
-
def self.new(
|
|
105
|
-
# Product ID to include in the group
|
|
106
|
-
product_id:,
|
|
107
|
-
# Status of the product in this group (defaults to true if not provided)
|
|
108
|
-
status: nil
|
|
109
|
-
)
|
|
110
|
-
end
|
|
111
|
-
|
|
112
|
-
sig do
|
|
113
|
-
override.returns(
|
|
114
|
-
{ product_id: String, status: T.nilable(T::Boolean) }
|
|
115
|
-
)
|
|
116
|
-
end
|
|
117
|
-
def to_hash
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
end
|
|
121
|
-
end
|
|
122
|
-
end
|
|
123
|
-
end
|