dodopayments 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +3 -3
- data/lib/dodopayments/client.rb +8 -0
- data/lib/dodopayments/models/checkout_session_customization.rb +4 -4
- data/lib/dodopayments/models/checkout_session_request.rb +10 -1
- data/lib/dodopayments/models/customer_retrieve_payment_methods_response.rb +13 -1
- data/lib/dodopayments/models/customers/customer_portal_create_params.rb +13 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +22 -0
- data/lib/dodopayments/models/payment_method_types.rb +3 -0
- data/lib/dodopayments/models/product_collection_create_params.rb +98 -0
- data/lib/dodopayments/models/product_collection_create_response.rb +226 -0
- data/lib/dodopayments/models/product_collection_delete_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_list_params.rb +46 -0
- data/lib/dodopayments/models/product_collection_list_response.rb +65 -0
- data/lib/dodopayments/models/product_collection_retrieve_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_retrieve_response.rb +226 -0
- data/lib/dodopayments/models/product_collection_unarchive_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_unarchive_response.rb +33 -0
- data/lib/dodopayments/models/product_collection_update_images_params.rb +29 -0
- data/lib/dodopayments/models/product_collection_update_images_response.rb +25 -0
- data/lib/dodopayments/models/product_collection_update_params.rb +61 -0
- data/lib/dodopayments/models/product_collections/group_create_params.rb +71 -0
- data/lib/dodopayments/models/product_collections/group_create_response.rb +160 -0
- data/lib/dodopayments/models/product_collections/group_delete_params.rb +28 -0
- data/lib/dodopayments/models/product_collections/group_update_params.rb +59 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_params.rb +60 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_response.rb +136 -0
- data/lib/dodopayments/models/product_collections/groups/item_delete_params.rb +36 -0
- data/lib/dodopayments/models/product_collections/groups/item_update_params.rb +47 -0
- data/lib/dodopayments/models/subscription.rb +107 -1
- data/lib/dodopayments/models/subscription_cancel_change_plan_params.rb +20 -0
- data/lib/dodopayments/models/subscription_list_response.rb +109 -1
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +10 -1
- data/lib/dodopayments/models/update_subscription_plan_req.rb +29 -1
- data/lib/dodopayments/models/your_webhook_url_create_params.rb +32 -0
- data/lib/dodopayments/models.rb +20 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/customers/customer_portal.rb +6 -1
- data/lib/dodopayments/resources/invoices/payments.rb +18 -0
- data/lib/dodopayments/resources/product_collections/groups/items.rb +111 -0
- data/lib/dodopayments/resources/product_collections/groups.rb +109 -0
- data/lib/dodopayments/resources/product_collections.rb +179 -0
- data/lib/dodopayments/resources/subscriptions.rb +24 -2
- data/lib/dodopayments/resources/your_webhook_url.rb +56 -0
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +30 -3
- data/rbi/dodopayments/client.rbi +6 -0
- data/rbi/dodopayments/models/checkout_session_customization.rbi +12 -13
- data/rbi/dodopayments/models/checkout_session_request.rbi +10 -0
- data/rbi/dodopayments/models/credit_entitlement_cart_response.rbi +4 -4
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +2 -2
- data/rbi/dodopayments/models/customer_retrieve_payment_methods_response.rbi +6 -0
- data/rbi/dodopayments/models/customers/customer_portal_create_params.rbi +13 -0
- data/rbi/dodopayments/models/dispute.rbi +4 -4
- data/rbi/dodopayments/models/get_dispute.rbi +4 -4
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +40 -0
- data/rbi/dodopayments/models/license_key.rbi +2 -2
- data/rbi/dodopayments/models/meter_cart_response_item.rbi +2 -2
- data/rbi/dodopayments/models/payment.rbi +10 -12
- data/rbi/dodopayments/models/payment_method_types.rbi +3 -0
- data/rbi/dodopayments/models/product_collection_create_params.rbi +180 -0
- data/rbi/dodopayments/models/product_collection_create_response.rbi +303 -0
- data/rbi/dodopayments/models/product_collection_delete_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_list_params.rbi +82 -0
- data/rbi/dodopayments/models/product_collection_list_response.rbi +88 -0
- data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_retrieve_response.rbi +305 -0
- data/rbi/dodopayments/models/product_collection_unarchive_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_unarchive_response.rbi +56 -0
- data/rbi/dodopayments/models/product_collection_update_images_params.rbi +52 -0
- data/rbi/dodopayments/models/product_collection_update_images_response.rbi +40 -0
- data/rbi/dodopayments/models/product_collection_update_params.rbi +84 -0
- data/rbi/dodopayments/models/product_collections/group_create_params.rbi +123 -0
- data/rbi/dodopayments/models/product_collections/group_create_response.rbi +204 -0
- data/rbi/dodopayments/models/product_collections/group_delete_params.rbi +48 -0
- data/rbi/dodopayments/models/product_collections/group_update_params.rbi +80 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_params.rbi +113 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_response.rbi +156 -0
- data/rbi/dodopayments/models/product_collections/groups/item_delete_params.rbi +55 -0
- data/rbi/dodopayments/models/product_collections/groups/item_update_params.rbi +68 -0
- data/rbi/dodopayments/models/refund.rbi +4 -4
- data/rbi/dodopayments/models/refund_list_item.rbi +4 -4
- data/rbi/dodopayments/models/subscription.rbi +169 -10
- data/rbi/dodopayments/models/subscription_cancel_change_plan_params.rbi +41 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +179 -0
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +12 -1
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +70 -0
- data/rbi/dodopayments/models/your_webhook_url_create_params.rbi +56 -0
- data/rbi/dodopayments/models.rbi +28 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +8 -0
- data/rbi/dodopayments/resources/customers/customer_portal.rbi +4 -0
- data/rbi/dodopayments/resources/invoices/payments.rbi +9 -0
- data/rbi/dodopayments/resources/product_collections/groups/items.rbi +83 -0
- data/rbi/dodopayments/resources/product_collections/groups.rbi +90 -0
- data/rbi/dodopayments/resources/product_collections.rbi +149 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +27 -0
- data/rbi/dodopayments/resources/your_webhook_url.rbi +53 -0
- data/sig/dodopayments/client.rbs +4 -0
- data/sig/dodopayments/models/checkout_session_customization.rbs +4 -8
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/customers/customer_portal_create_params.rbs +7 -1
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +25 -0
- data/sig/dodopayments/models/product_collection_create_params.rbs +80 -0
- data/sig/dodopayments/models/product_collection_create_response.rbs +179 -0
- data/sig/dodopayments/models/product_collection_delete_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_list_params.rbs +49 -0
- data/sig/dodopayments/models/product_collection_list_response.rbs +50 -0
- data/sig/dodopayments/models/product_collection_retrieve_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_retrieve_response.rbs +179 -0
- data/sig/dodopayments/models/product_collection_unarchive_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_unarchive_response.rbs +30 -0
- data/sig/dodopayments/models/product_collection_update_images_params.rbs +28 -0
- data/sig/dodopayments/models/product_collection_update_images_response.rbs +16 -0
- data/sig/dodopayments/models/product_collection_update_params.rbs +51 -0
- data/sig/dodopayments/models/product_collections/group_create_params.rbs +55 -0
- data/sig/dodopayments/models/product_collections/group_create_response.rbs +129 -0
- data/sig/dodopayments/models/product_collections/group_delete_params.rbs +30 -0
- data/sig/dodopayments/models/product_collections/group_update_params.rbs +48 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_params.rbs +52 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_response.rbs +104 -0
- data/sig/dodopayments/models/product_collections/groups/item_delete_params.rbs +36 -0
- data/sig/dodopayments/models/product_collections/groups/item_update_params.rbs +40 -0
- data/sig/dodopayments/models/subscription.rbs +75 -0
- data/sig/dodopayments/models/subscription_cancel_change_plan_params.rbs +24 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +75 -0
- data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +5 -0
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +25 -1
- data/sig/dodopayments/models/your_webhook_url_create_params.rbs +42 -0
- data/sig/dodopayments/models.rbs +20 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/customers/customer_portal.rbs +1 -0
- data/sig/dodopayments/resources/invoices/payments.rbs +5 -0
- data/sig/dodopayments/resources/product_collections/groups/items.rbs +33 -0
- data/sig/dodopayments/resources/product_collections/groups.rbs +34 -0
- data/sig/dodopayments/resources/product_collections.rbs +56 -0
- data/sig/dodopayments/resources/subscriptions.rbs +7 -0
- data/sig/dodopayments/resources/your_webhook_url.rbs +18 -0
- metadata +83 -2
|
@@ -39,11 +39,11 @@ module Dodopayments
|
|
|
39
39
|
attr_accessor :dispute_id
|
|
40
40
|
|
|
41
41
|
# The current stage of the dispute process.
|
|
42
|
-
sig { returns(Dodopayments::DisputeStage::
|
|
42
|
+
sig { returns(Dodopayments::DisputeStage::OrSymbol) }
|
|
43
43
|
attr_accessor :dispute_stage
|
|
44
44
|
|
|
45
45
|
# The current status of the dispute.
|
|
46
|
-
sig { returns(Dodopayments::DisputeStatus::
|
|
46
|
+
sig { returns(Dodopayments::DisputeStatus::OrSymbol) }
|
|
47
47
|
attr_accessor :dispute_status
|
|
48
48
|
|
|
49
49
|
# The unique identifier of the payment associated with the dispute.
|
|
@@ -109,8 +109,8 @@ module Dodopayments
|
|
|
109
109
|
currency: String,
|
|
110
110
|
customer: Dodopayments::CustomerLimitedDetails,
|
|
111
111
|
dispute_id: String,
|
|
112
|
-
dispute_stage: Dodopayments::DisputeStage::
|
|
113
|
-
dispute_status: Dodopayments::DisputeStatus::
|
|
112
|
+
dispute_stage: Dodopayments::DisputeStage::OrSymbol,
|
|
113
|
+
dispute_status: Dodopayments::DisputeStatus::OrSymbol,
|
|
114
114
|
payment_id: String,
|
|
115
115
|
reason: T.nilable(String),
|
|
116
116
|
remarks: T.nilable(String)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module Invoices
|
|
6
|
+
class PaymentRetrievePayoutParams < 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::Invoices::PaymentRetrievePayoutParams,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :payout_id
|
|
20
|
+
|
|
21
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
payout_id: String,
|
|
24
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(payout_id:, request_options: {})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ payout_id: String, request_options: Dodopayments::RequestOptions }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -41,7 +41,7 @@ module Dodopayments
|
|
|
41
41
|
attr_accessor :product_id
|
|
42
42
|
|
|
43
43
|
# The current status of the license key (e.g., active, inactive, expired).
|
|
44
|
-
sig { returns(Dodopayments::LicenseKeyStatus::
|
|
44
|
+
sig { returns(Dodopayments::LicenseKeyStatus::OrSymbol) }
|
|
45
45
|
attr_accessor :status
|
|
46
46
|
|
|
47
47
|
# The maximum number of activations allowed for this license key.
|
|
@@ -113,7 +113,7 @@ module Dodopayments
|
|
|
113
113
|
key: String,
|
|
114
114
|
payment_id: String,
|
|
115
115
|
product_id: String,
|
|
116
|
-
status: Dodopayments::LicenseKeyStatus::
|
|
116
|
+
status: Dodopayments::LicenseKeyStatus::OrSymbol,
|
|
117
117
|
activations_limit: T.nilable(Integer),
|
|
118
118
|
expires_at: T.nilable(Time),
|
|
119
119
|
subscription_id: T.nilable(String)
|
|
@@ -11,7 +11,7 @@ module Dodopayments
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
sig { returns(Dodopayments::Currency::
|
|
14
|
+
sig { returns(Dodopayments::Currency::OrSymbol) }
|
|
15
15
|
attr_accessor :currency
|
|
16
16
|
|
|
17
17
|
sig { returns(Integer) }
|
|
@@ -58,7 +58,7 @@ module Dodopayments
|
|
|
58
58
|
sig do
|
|
59
59
|
override.returns(
|
|
60
60
|
{
|
|
61
|
-
currency: Dodopayments::Currency::
|
|
61
|
+
currency: Dodopayments::Currency::OrSymbol,
|
|
62
62
|
free_threshold: Integer,
|
|
63
63
|
measurement_unit: String,
|
|
64
64
|
meter_id: String,
|
|
@@ -28,7 +28,7 @@ module Dodopayments
|
|
|
28
28
|
attr_accessor :created_at
|
|
29
29
|
|
|
30
30
|
# Currency used for the payment
|
|
31
|
-
sig { returns(Dodopayments::Currency::
|
|
31
|
+
sig { returns(Dodopayments::Currency::OrSymbol) }
|
|
32
32
|
attr_accessor :currency
|
|
33
33
|
|
|
34
34
|
# Details about the customer who made the payment
|
|
@@ -69,7 +69,7 @@ module Dodopayments
|
|
|
69
69
|
# The currency in which the settlement_amount will be credited to your Dodo
|
|
70
70
|
# balance. This may differ from the customer's payment currency in adaptive
|
|
71
71
|
# pricing scenarios.
|
|
72
|
-
sig { returns(Dodopayments::Currency::
|
|
72
|
+
sig { returns(Dodopayments::Currency::OrSymbol) }
|
|
73
73
|
attr_accessor :settlement_currency
|
|
74
74
|
|
|
75
75
|
# Total amount charged to the customer including tax, in smallest currency unit
|
|
@@ -82,7 +82,7 @@ module Dodopayments
|
|
|
82
82
|
attr_accessor :card_holder_name
|
|
83
83
|
|
|
84
84
|
# ISO2 country code of the card
|
|
85
|
-
sig { returns(T.nilable(Dodopayments::CountryCode::
|
|
85
|
+
sig { returns(T.nilable(Dodopayments::CountryCode::OrSymbol)) }
|
|
86
86
|
attr_accessor :card_issuing_country
|
|
87
87
|
|
|
88
88
|
# The last four digits of the card
|
|
@@ -144,9 +144,7 @@ module Dodopayments
|
|
|
144
144
|
|
|
145
145
|
# Summary of the refund status for this payment. None if no succeeded refunds
|
|
146
146
|
# exist.
|
|
147
|
-
sig
|
|
148
|
-
returns(T.nilable(Dodopayments::PaymentRefundStatus::TaggedSymbol))
|
|
149
|
-
end
|
|
147
|
+
sig { returns(T.nilable(Dodopayments::PaymentRefundStatus::OrSymbol)) }
|
|
150
148
|
attr_accessor :refund_status
|
|
151
149
|
|
|
152
150
|
# This represents the portion of settlement_amount that corresponds to taxes
|
|
@@ -156,7 +154,7 @@ module Dodopayments
|
|
|
156
154
|
attr_accessor :settlement_tax
|
|
157
155
|
|
|
158
156
|
# Current status of the payment intent
|
|
159
|
-
sig { returns(T.nilable(Dodopayments::IntentStatus::
|
|
157
|
+
sig { returns(T.nilable(Dodopayments::IntentStatus::OrSymbol)) }
|
|
160
158
|
attr_accessor :status
|
|
161
159
|
|
|
162
160
|
# Identifier of the subscription if payment is part of a subscription
|
|
@@ -305,7 +303,7 @@ module Dodopayments
|
|
|
305
303
|
brand_id: String,
|
|
306
304
|
business_id: String,
|
|
307
305
|
created_at: Time,
|
|
308
|
-
currency: Dodopayments::Currency::
|
|
306
|
+
currency: Dodopayments::Currency::OrSymbol,
|
|
309
307
|
customer: Dodopayments::CustomerLimitedDetails,
|
|
310
308
|
digital_products_delivered: T::Boolean,
|
|
311
309
|
disputes: T::Array[Dodopayments::Dispute],
|
|
@@ -313,11 +311,11 @@ module Dodopayments
|
|
|
313
311
|
payment_id: String,
|
|
314
312
|
refunds: T::Array[Dodopayments::RefundListItem],
|
|
315
313
|
settlement_amount: Integer,
|
|
316
|
-
settlement_currency: Dodopayments::Currency::
|
|
314
|
+
settlement_currency: Dodopayments::Currency::OrSymbol,
|
|
317
315
|
total_amount: Integer,
|
|
318
316
|
card_holder_name: T.nilable(String),
|
|
319
317
|
card_issuing_country:
|
|
320
|
-
T.nilable(Dodopayments::CountryCode::
|
|
318
|
+
T.nilable(Dodopayments::CountryCode::OrSymbol),
|
|
321
319
|
card_last_four: T.nilable(String),
|
|
322
320
|
card_network: T.nilable(String),
|
|
323
321
|
card_type: T.nilable(String),
|
|
@@ -335,9 +333,9 @@ module Dodopayments
|
|
|
335
333
|
product_cart:
|
|
336
334
|
T.nilable(T::Array[Dodopayments::OneTimeProductCartItem]),
|
|
337
335
|
refund_status:
|
|
338
|
-
T.nilable(Dodopayments::PaymentRefundStatus::
|
|
336
|
+
T.nilable(Dodopayments::PaymentRefundStatus::OrSymbol),
|
|
339
337
|
settlement_tax: T.nilable(Integer),
|
|
340
|
-
status: T.nilable(Dodopayments::IntentStatus::
|
|
338
|
+
status: T.nilable(Dodopayments::IntentStatus::OrSymbol),
|
|
341
339
|
subscription_id: T.nilable(String),
|
|
342
340
|
tax: T.nilable(Integer),
|
|
343
341
|
updated_at: T.nilable(Time)
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class ProductCollectionCreateParams < 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::ProductCollectionCreateParams,
|
|
13
|
+
Dodopayments::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Groups of products in this collection
|
|
18
|
+
sig do
|
|
19
|
+
returns(T::Array[Dodopayments::ProductCollectionCreateParams::Group])
|
|
20
|
+
end
|
|
21
|
+
attr_accessor :groups
|
|
22
|
+
|
|
23
|
+
# Name of the product collection
|
|
24
|
+
sig { returns(String) }
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# Brand id for the collection, if not provided will default to primary brand
|
|
28
|
+
sig { returns(T.nilable(String)) }
|
|
29
|
+
attr_accessor :brand_id
|
|
30
|
+
|
|
31
|
+
# Optional description of the product collection
|
|
32
|
+
sig { returns(T.nilable(String)) }
|
|
33
|
+
attr_accessor :description
|
|
34
|
+
|
|
35
|
+
sig do
|
|
36
|
+
params(
|
|
37
|
+
groups:
|
|
38
|
+
T::Array[
|
|
39
|
+
Dodopayments::ProductCollectionCreateParams::Group::OrHash
|
|
40
|
+
],
|
|
41
|
+
name: String,
|
|
42
|
+
brand_id: T.nilable(String),
|
|
43
|
+
description: T.nilable(String),
|
|
44
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
45
|
+
).returns(T.attached_class)
|
|
46
|
+
end
|
|
47
|
+
def self.new(
|
|
48
|
+
# Groups of products in this collection
|
|
49
|
+
groups:,
|
|
50
|
+
# Name of the product collection
|
|
51
|
+
name:,
|
|
52
|
+
# Brand id for the collection, if not provided will default to primary brand
|
|
53
|
+
brand_id: nil,
|
|
54
|
+
# Optional description of the product collection
|
|
55
|
+
description: nil,
|
|
56
|
+
request_options: {}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
sig do
|
|
61
|
+
override.returns(
|
|
62
|
+
{
|
|
63
|
+
groups:
|
|
64
|
+
T::Array[Dodopayments::ProductCollectionCreateParams::Group],
|
|
65
|
+
name: String,
|
|
66
|
+
brand_id: T.nilable(String),
|
|
67
|
+
description: T.nilable(String),
|
|
68
|
+
request_options: Dodopayments::RequestOptions
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
def to_hash
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
class Group < Dodopayments::Internal::Type::BaseModel
|
|
76
|
+
OrHash =
|
|
77
|
+
T.type_alias do
|
|
78
|
+
T.any(
|
|
79
|
+
Dodopayments::ProductCollectionCreateParams::Group,
|
|
80
|
+
Dodopayments::Internal::AnyHash
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Products in this group
|
|
85
|
+
sig do
|
|
86
|
+
returns(
|
|
87
|
+
T::Array[
|
|
88
|
+
Dodopayments::ProductCollectionCreateParams::Group::Product
|
|
89
|
+
]
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
attr_accessor :products
|
|
93
|
+
|
|
94
|
+
# Optional group name. Multiple groups can have null names, but named groups must
|
|
95
|
+
# be unique per collection
|
|
96
|
+
sig { returns(T.nilable(String)) }
|
|
97
|
+
attr_accessor :group_name
|
|
98
|
+
|
|
99
|
+
# Status of the group (defaults to true if not provided)
|
|
100
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
101
|
+
attr_accessor :status
|
|
102
|
+
|
|
103
|
+
sig do
|
|
104
|
+
params(
|
|
105
|
+
products:
|
|
106
|
+
T::Array[
|
|
107
|
+
Dodopayments::ProductCollectionCreateParams::Group::Product::OrHash
|
|
108
|
+
],
|
|
109
|
+
group_name: T.nilable(String),
|
|
110
|
+
status: T.nilable(T::Boolean)
|
|
111
|
+
).returns(T.attached_class)
|
|
112
|
+
end
|
|
113
|
+
def self.new(
|
|
114
|
+
# Products in this group
|
|
115
|
+
products:,
|
|
116
|
+
# Optional group name. Multiple groups can have null names, but named groups must
|
|
117
|
+
# be unique per collection
|
|
118
|
+
group_name: nil,
|
|
119
|
+
# Status of the group (defaults to true if not provided)
|
|
120
|
+
status: nil
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
sig do
|
|
125
|
+
override.returns(
|
|
126
|
+
{
|
|
127
|
+
products:
|
|
128
|
+
T::Array[
|
|
129
|
+
Dodopayments::ProductCollectionCreateParams::Group::Product
|
|
130
|
+
],
|
|
131
|
+
group_name: T.nilable(String),
|
|
132
|
+
status: T.nilable(T::Boolean)
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
def to_hash
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
class Product < Dodopayments::Internal::Type::BaseModel
|
|
140
|
+
OrHash =
|
|
141
|
+
T.type_alias do
|
|
142
|
+
T.any(
|
|
143
|
+
Dodopayments::ProductCollectionCreateParams::Group::Product,
|
|
144
|
+
Dodopayments::Internal::AnyHash
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Product ID to include in the group
|
|
149
|
+
sig { returns(String) }
|
|
150
|
+
attr_accessor :product_id
|
|
151
|
+
|
|
152
|
+
# Status of the product in this group (defaults to true if not provided)
|
|
153
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
154
|
+
attr_accessor :status
|
|
155
|
+
|
|
156
|
+
sig do
|
|
157
|
+
params(product_id: String, status: T.nilable(T::Boolean)).returns(
|
|
158
|
+
T.attached_class
|
|
159
|
+
)
|
|
160
|
+
end
|
|
161
|
+
def self.new(
|
|
162
|
+
# Product ID to include in the group
|
|
163
|
+
product_id:,
|
|
164
|
+
# Status of the product in this group (defaults to true if not provided)
|
|
165
|
+
status: nil
|
|
166
|
+
)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
sig do
|
|
170
|
+
override.returns(
|
|
171
|
+
{ product_id: String, status: T.nilable(T::Boolean) }
|
|
172
|
+
)
|
|
173
|
+
end
|
|
174
|
+
def to_hash
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
end
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
class ProductCollectionCreateResponse < Dodopayments::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
Dodopayments::Models::ProductCollectionCreateResponse,
|
|
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[Dodopayments::Models::ProductCollectionCreateResponse::Group]
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
attr_accessor :groups
|
|
33
|
+
|
|
34
|
+
# Name of the collection
|
|
35
|
+
sig { returns(String) }
|
|
36
|
+
attr_accessor :name
|
|
37
|
+
|
|
38
|
+
# Timestamp when the collection was last updated
|
|
39
|
+
sig { returns(Time) }
|
|
40
|
+
attr_accessor :updated_at
|
|
41
|
+
|
|
42
|
+
# Description of the collection
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_accessor :description
|
|
45
|
+
|
|
46
|
+
# URL of the collection image
|
|
47
|
+
sig { returns(T.nilable(String)) }
|
|
48
|
+
attr_accessor :image
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
params(
|
|
52
|
+
id: String,
|
|
53
|
+
brand_id: String,
|
|
54
|
+
created_at: Time,
|
|
55
|
+
groups:
|
|
56
|
+
T::Array[
|
|
57
|
+
Dodopayments::Models::ProductCollectionCreateResponse::Group::OrHash
|
|
58
|
+
],
|
|
59
|
+
name: String,
|
|
60
|
+
updated_at: Time,
|
|
61
|
+
description: T.nilable(String),
|
|
62
|
+
image: T.nilable(String)
|
|
63
|
+
).returns(T.attached_class)
|
|
64
|
+
end
|
|
65
|
+
def self.new(
|
|
66
|
+
# Unique identifier for the product collection
|
|
67
|
+
id:,
|
|
68
|
+
# Brand ID for the collection
|
|
69
|
+
brand_id:,
|
|
70
|
+
# Timestamp when the collection was created
|
|
71
|
+
created_at:,
|
|
72
|
+
# Groups in this collection
|
|
73
|
+
groups:,
|
|
74
|
+
# Name of the collection
|
|
75
|
+
name:,
|
|
76
|
+
# Timestamp when the collection was last updated
|
|
77
|
+
updated_at:,
|
|
78
|
+
# Description of the collection
|
|
79
|
+
description: nil,
|
|
80
|
+
# URL of the collection image
|
|
81
|
+
image: nil
|
|
82
|
+
)
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
sig do
|
|
86
|
+
override.returns(
|
|
87
|
+
{
|
|
88
|
+
id: String,
|
|
89
|
+
brand_id: String,
|
|
90
|
+
created_at: Time,
|
|
91
|
+
groups:
|
|
92
|
+
T::Array[
|
|
93
|
+
Dodopayments::Models::ProductCollectionCreateResponse::Group
|
|
94
|
+
],
|
|
95
|
+
name: String,
|
|
96
|
+
updated_at: Time,
|
|
97
|
+
description: T.nilable(String),
|
|
98
|
+
image: T.nilable(String)
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
end
|
|
102
|
+
def to_hash
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
class Group < Dodopayments::Internal::Type::BaseModel
|
|
106
|
+
OrHash =
|
|
107
|
+
T.type_alias do
|
|
108
|
+
T.any(
|
|
109
|
+
Dodopayments::Models::ProductCollectionCreateResponse::Group,
|
|
110
|
+
Dodopayments::Internal::AnyHash
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
sig { returns(String) }
|
|
115
|
+
attr_accessor :group_id
|
|
116
|
+
|
|
117
|
+
sig do
|
|
118
|
+
returns(
|
|
119
|
+
T::Array[
|
|
120
|
+
Dodopayments::Models::ProductCollectionCreateResponse::Group::Product
|
|
121
|
+
]
|
|
122
|
+
)
|
|
123
|
+
end
|
|
124
|
+
attr_accessor :products
|
|
125
|
+
|
|
126
|
+
sig { returns(T::Boolean) }
|
|
127
|
+
attr_accessor :status
|
|
128
|
+
|
|
129
|
+
sig { returns(T.nilable(String)) }
|
|
130
|
+
attr_accessor :group_name
|
|
131
|
+
|
|
132
|
+
sig do
|
|
133
|
+
params(
|
|
134
|
+
group_id: String,
|
|
135
|
+
products:
|
|
136
|
+
T::Array[
|
|
137
|
+
Dodopayments::Models::ProductCollectionCreateResponse::Group::Product::OrHash
|
|
138
|
+
],
|
|
139
|
+
status: T::Boolean,
|
|
140
|
+
group_name: T.nilable(String)
|
|
141
|
+
).returns(T.attached_class)
|
|
142
|
+
end
|
|
143
|
+
def self.new(group_id:, products:, status:, group_name: nil)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
sig do
|
|
147
|
+
override.returns(
|
|
148
|
+
{
|
|
149
|
+
group_id: String,
|
|
150
|
+
products:
|
|
151
|
+
T::Array[
|
|
152
|
+
Dodopayments::Models::ProductCollectionCreateResponse::Group::Product
|
|
153
|
+
],
|
|
154
|
+
status: T::Boolean,
|
|
155
|
+
group_name: T.nilable(String)
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
end
|
|
159
|
+
def to_hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
class Product < Dodopayments::Internal::Type::BaseModel
|
|
163
|
+
OrHash =
|
|
164
|
+
T.type_alias do
|
|
165
|
+
T.any(
|
|
166
|
+
Dodopayments::Models::ProductCollectionCreateResponse::Group::Product,
|
|
167
|
+
Dodopayments::Internal::AnyHash
|
|
168
|
+
)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
sig { returns(String) }
|
|
172
|
+
attr_accessor :id
|
|
173
|
+
|
|
174
|
+
sig { returns(Integer) }
|
|
175
|
+
attr_accessor :addons_count
|
|
176
|
+
|
|
177
|
+
sig { returns(Integer) }
|
|
178
|
+
attr_accessor :files_count
|
|
179
|
+
|
|
180
|
+
# Whether this product has any credit entitlements attached
|
|
181
|
+
sig { returns(T::Boolean) }
|
|
182
|
+
attr_accessor :has_credit_entitlements
|
|
183
|
+
|
|
184
|
+
sig { returns(T::Boolean) }
|
|
185
|
+
attr_accessor :is_recurring
|
|
186
|
+
|
|
187
|
+
sig { returns(T::Boolean) }
|
|
188
|
+
attr_accessor :license_key_enabled
|
|
189
|
+
|
|
190
|
+
sig { returns(Integer) }
|
|
191
|
+
attr_accessor :meters_count
|
|
192
|
+
|
|
193
|
+
sig { returns(String) }
|
|
194
|
+
attr_accessor :product_id
|
|
195
|
+
|
|
196
|
+
sig { returns(T::Boolean) }
|
|
197
|
+
attr_accessor :status
|
|
198
|
+
|
|
199
|
+
sig { returns(T.nilable(Dodopayments::Currency::TaggedSymbol)) }
|
|
200
|
+
attr_accessor :currency
|
|
201
|
+
|
|
202
|
+
sig { returns(T.nilable(String)) }
|
|
203
|
+
attr_accessor :description
|
|
204
|
+
|
|
205
|
+
sig { returns(T.nilable(String)) }
|
|
206
|
+
attr_accessor :name
|
|
207
|
+
|
|
208
|
+
sig { returns(T.nilable(Integer)) }
|
|
209
|
+
attr_accessor :price
|
|
210
|
+
|
|
211
|
+
# One-time price details.
|
|
212
|
+
sig { returns(T.nilable(Dodopayments::Price::Variants)) }
|
|
213
|
+
attr_accessor :price_detail
|
|
214
|
+
|
|
215
|
+
# Represents the different categories of taxation applicable to various products
|
|
216
|
+
# and services.
|
|
217
|
+
sig { returns(T.nilable(Dodopayments::TaxCategory::TaggedSymbol)) }
|
|
218
|
+
attr_accessor :tax_category
|
|
219
|
+
|
|
220
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
221
|
+
attr_accessor :tax_inclusive
|
|
222
|
+
|
|
223
|
+
sig do
|
|
224
|
+
params(
|
|
225
|
+
id: String,
|
|
226
|
+
addons_count: Integer,
|
|
227
|
+
files_count: Integer,
|
|
228
|
+
has_credit_entitlements: T::Boolean,
|
|
229
|
+
is_recurring: T::Boolean,
|
|
230
|
+
license_key_enabled: T::Boolean,
|
|
231
|
+
meters_count: Integer,
|
|
232
|
+
product_id: String,
|
|
233
|
+
status: T::Boolean,
|
|
234
|
+
currency: T.nilable(Dodopayments::Currency::OrSymbol),
|
|
235
|
+
description: T.nilable(String),
|
|
236
|
+
name: T.nilable(String),
|
|
237
|
+
price: T.nilable(Integer),
|
|
238
|
+
price_detail:
|
|
239
|
+
T.nilable(
|
|
240
|
+
T.any(
|
|
241
|
+
Dodopayments::Price::OneTimePrice::OrHash,
|
|
242
|
+
Dodopayments::Price::RecurringPrice::OrHash,
|
|
243
|
+
Dodopayments::Price::UsageBasedPrice::OrHash
|
|
244
|
+
)
|
|
245
|
+
),
|
|
246
|
+
tax_category: T.nilable(Dodopayments::TaxCategory::OrSymbol),
|
|
247
|
+
tax_inclusive: T.nilable(T::Boolean)
|
|
248
|
+
).returns(T.attached_class)
|
|
249
|
+
end
|
|
250
|
+
def self.new(
|
|
251
|
+
id:,
|
|
252
|
+
addons_count:,
|
|
253
|
+
files_count:,
|
|
254
|
+
# Whether this product has any credit entitlements attached
|
|
255
|
+
has_credit_entitlements:,
|
|
256
|
+
is_recurring:,
|
|
257
|
+
license_key_enabled:,
|
|
258
|
+
meters_count:,
|
|
259
|
+
product_id:,
|
|
260
|
+
status:,
|
|
261
|
+
currency: nil,
|
|
262
|
+
description: nil,
|
|
263
|
+
name: nil,
|
|
264
|
+
price: nil,
|
|
265
|
+
# One-time price details.
|
|
266
|
+
price_detail: nil,
|
|
267
|
+
# Represents the different categories of taxation applicable to various products
|
|
268
|
+
# and services.
|
|
269
|
+
tax_category: nil,
|
|
270
|
+
tax_inclusive: nil
|
|
271
|
+
)
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
sig do
|
|
275
|
+
override.returns(
|
|
276
|
+
{
|
|
277
|
+
id: String,
|
|
278
|
+
addons_count: Integer,
|
|
279
|
+
files_count: Integer,
|
|
280
|
+
has_credit_entitlements: T::Boolean,
|
|
281
|
+
is_recurring: T::Boolean,
|
|
282
|
+
license_key_enabled: T::Boolean,
|
|
283
|
+
meters_count: Integer,
|
|
284
|
+
product_id: String,
|
|
285
|
+
status: T::Boolean,
|
|
286
|
+
currency: T.nilable(Dodopayments::Currency::TaggedSymbol),
|
|
287
|
+
description: T.nilable(String),
|
|
288
|
+
name: T.nilable(String),
|
|
289
|
+
price: T.nilable(Integer),
|
|
290
|
+
price_detail: T.nilable(Dodopayments::Price::Variants),
|
|
291
|
+
tax_category:
|
|
292
|
+
T.nilable(Dodopayments::TaxCategory::TaggedSymbol),
|
|
293
|
+
tax_inclusive: T.nilable(T::Boolean)
|
|
294
|
+
}
|
|
295
|
+
)
|
|
296
|
+
end
|
|
297
|
+
def to_hash
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
end
|
|
303
|
+
end
|