dodopayments 2.10.0 → 2.11.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 +10 -0
- data/README.md +9 -9
- data/lib/dodopayments/client.rb +4 -0
- data/lib/dodopayments/models/checkout_session_flags.rb +15 -1
- data/lib/dodopayments/models/checkout_session_request.rb +11 -1
- data/lib/dodopayments/models/checkout_session_response.rb +33 -1
- data/lib/dodopayments/models/discount_detail.rb +143 -0
- data/lib/dodopayments/models/filter_type.rb +71 -0
- data/lib/dodopayments/models/github_permission.rb +19 -0
- data/lib/dodopayments/models/integration_config.rb +3 -19
- data/lib/dodopayments/models/integration_config_response.rb +3 -19
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +22 -0
- data/lib/dodopayments/models/meter_filter.rb +3 -331
- data/lib/dodopayments/models/payment.rb +3 -141
- data/lib/dodopayments/models/payment_create_params.rb +11 -1
- data/lib/dodopayments/models/payment_method_types.rb +1 -0
- data/lib/dodopayments/models/product_collection.rb +74 -0
- data/lib/dodopayments/models/product_collection_create_params.rb +47 -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_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 +22 -0
- data/lib/dodopayments/models/product_collections/group_delete_params.rb +28 -0
- data/lib/dodopayments/models/product_collections/group_product.rb +26 -0
- data/lib/dodopayments/models/product_collections/group_update_params.rb +59 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_params.rb +41 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_response.rb +15 -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/product_collections/groups/product_collection_product.rb +132 -0
- data/lib/dodopayments/models/product_collections/product_collection_group_details.rb +42 -0
- data/lib/dodopayments/models/product_collections/product_collection_group_response.rb +39 -0
- data/lib/dodopayments/models/subscription.rb +13 -142
- data/lib/dodopayments/models/subscription_create_params.rb +11 -1
- data/lib/dodopayments/models/subscription_list_response.rb +10 -1
- data/lib/dodopayments/models/subscription_update_params.rb +12 -1
- data/lib/dodopayments/models/subscription_update_payment_method_params.rb +9 -9
- data/lib/dodopayments/models/webhook_event_type.rb +1 -5
- data/lib/dodopayments/models.rb +24 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/invoices/payments.rb +18 -0
- data/lib/dodopayments/resources/payments.rb +3 -1
- 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 +9 -5
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +29 -0
- data/rbi/dodopayments/client.rbi +3 -0
- data/rbi/dodopayments/models/checkout_session_flags.rbi +23 -0
- data/rbi/dodopayments/models/checkout_session_request.rbi +12 -0
- data/rbi/dodopayments/models/checkout_session_response.rbi +43 -5
- data/rbi/dodopayments/models/discount_detail.rbi +161 -0
- data/rbi/dodopayments/models/filter_type.rbi +112 -0
- data/rbi/dodopayments/models/github_permission.rbi +26 -0
- data/rbi/dodopayments/models/integration_config.rbi +3 -59
- data/rbi/dodopayments/models/integration_config_response.rbi +3 -59
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +40 -0
- data/rbi/dodopayments/models/meter_filter.rbi +3 -572
- data/rbi/dodopayments/models/payment.rbi +3 -163
- data/rbi/dodopayments/models/payment_create_params.rbi +12 -0
- data/rbi/dodopayments/models/payment_method_types.rbi +1 -0
- data/rbi/dodopayments/models/product_collection.rbi +108 -0
- data/rbi/dodopayments/models/product_collection_create_params.rbi +82 -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_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 +40 -0
- data/rbi/dodopayments/models/product_collections/group_delete_params.rbi +48 -0
- data/rbi/dodopayments/models/product_collections/group_product.rbi +46 -0
- data/rbi/dodopayments/models/product_collections/group_update_params.rbi +80 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_params.rbi +68 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_response.rbi +17 -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/product_collections/groups/product_collection_product.rbi +148 -0
- data/rbi/dodopayments/models/product_collections/product_collection_group_details.rbi +67 -0
- data/rbi/dodopayments/models/product_collections/product_collection_group_response.rbi +68 -0
- data/rbi/dodopayments/models/subscription.rbi +13 -164
- data/rbi/dodopayments/models/subscription_create_params.rbi +12 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +10 -0
- data/rbi/dodopayments/models/subscription_update_params.rbi +14 -0
- data/rbi/dodopayments/models/subscription_update_payment_method_params.rbi +16 -16
- data/rbi/dodopayments/models/webhook_event_type.rbi +4 -18
- data/rbi/dodopayments/models.rbi +31 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +10 -0
- data/rbi/dodopayments/resources/invoices/payments.rbi +9 -0
- data/rbi/dodopayments/resources/payments.rbi +5 -0
- data/rbi/dodopayments/resources/product_collections/groups/items.rbi +83 -0
- data/rbi/dodopayments/resources/product_collections/groups.rbi +88 -0
- data/rbi/dodopayments/resources/product_collections.rbi +149 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +15 -4
- data/sig/dodopayments/client.rbs +2 -0
- data/sig/dodopayments/models/checkout_session_flags.rbs +7 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/checkout_session_response.rbs +27 -3
- data/sig/dodopayments/models/discount_detail.rbs +95 -0
- data/sig/dodopayments/models/filter_type.rbs +52 -0
- data/sig/dodopayments/models/github_permission.rbs +17 -0
- data/sig/dodopayments/models/integration_config.rbs +4 -18
- data/sig/dodopayments/models/integration_config_response.rbs +4 -18
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +25 -0
- data/sig/dodopayments/models/meter_filter.rbs +4 -252
- data/sig/dodopayments/models/payment.rbs +4 -96
- data/sig/dodopayments/models/payment_create_params.rbs +5 -0
- data/sig/dodopayments/models/payment_method_types.rbs +2 -0
- data/sig/dodopayments/models/product_collection.rbs +55 -0
- data/sig/dodopayments/models/product_collection_create_params.rbs +41 -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_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 +27 -0
- data/sig/dodopayments/models/product_collections/group_delete_params.rbs +30 -0
- data/sig/dodopayments/models/product_collections/group_product.rbs +17 -0
- data/sig/dodopayments/models/product_collections/group_update_params.rbs +48 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_params.rbs +40 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_response.rbs +12 -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/product_collections/groups/product_collection_product.rbs +99 -0
- data/sig/dodopayments/models/product_collections/product_collection_group_details.rbs +34 -0
- data/sig/dodopayments/models/product_collections/product_collection_group_response.rbs +39 -0
- data/sig/dodopayments/models/subscription.rbs +9 -96
- data/sig/dodopayments/models/subscription_create_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +5 -0
- data/sig/dodopayments/models/subscription_update_params.rbs +5 -0
- data/sig/dodopayments/models/subscription_update_payment_method_params.rbs +9 -9
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -10
- data/sig/dodopayments/models.rbs +24 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/invoices/payments.rbs +5 -0
- data/sig/dodopayments/resources/payments.rbs +1 -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 +3 -1
- metadata +89 -2
|
@@ -0,0 +1,38 @@
|
|
|
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
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
class GroupCreateParams < Dodopayments::Models::ProductCollections::ProductCollectionGroupDetails
|
|
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
|
+
sig do
|
|
22
|
+
params(
|
|
23
|
+
id: String,
|
|
24
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
25
|
+
).returns(T.attached_class)
|
|
26
|
+
end
|
|
27
|
+
def self.new(id:, request_options: {})
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig do
|
|
31
|
+
override.returns(
|
|
32
|
+
{ id: String, request_options: Dodopayments::RequestOptions }
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
def to_hash
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
class GroupDeleteParams < 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::GroupDeleteParams,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :group_id
|
|
23
|
+
|
|
24
|
+
sig do
|
|
25
|
+
params(
|
|
26
|
+
id: String,
|
|
27
|
+
group_id: String,
|
|
28
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
29
|
+
).returns(T.attached_class)
|
|
30
|
+
end
|
|
31
|
+
def self.new(id:, group_id:, request_options: {})
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
override.returns(
|
|
36
|
+
{
|
|
37
|
+
id: String,
|
|
38
|
+
group_id: String,
|
|
39
|
+
request_options: Dodopayments::RequestOptions
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
end
|
|
43
|
+
def to_hash
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
class GroupProduct < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Dodopayments::ProductCollections::GroupProduct,
|
|
11
|
+
Dodopayments::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Product ID to include in the group
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :product_id
|
|
18
|
+
|
|
19
|
+
# Status of the product in this group (defaults to true if not provided)
|
|
20
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
21
|
+
attr_accessor :status
|
|
22
|
+
|
|
23
|
+
sig do
|
|
24
|
+
params(product_id: String, status: T.nilable(T::Boolean)).returns(
|
|
25
|
+
T.attached_class
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
def self.new(
|
|
29
|
+
# Product ID to include in the group
|
|
30
|
+
product_id:,
|
|
31
|
+
# Status of the product in this group (defaults to true if not provided)
|
|
32
|
+
status: nil
|
|
33
|
+
)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
sig do
|
|
37
|
+
override.returns(
|
|
38
|
+
{ product_id: String, status: T.nilable(T::Boolean) }
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
def to_hash
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
class GroupUpdateParams < 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::GroupUpdateParams,
|
|
14
|
+
Dodopayments::Internal::AnyHash
|
|
15
|
+
)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
sig { returns(String) }
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
sig { returns(String) }
|
|
22
|
+
attr_accessor :group_id
|
|
23
|
+
|
|
24
|
+
# Optional group name update: Some(Some(name)) = set name, Some(None) = clear
|
|
25
|
+
# name, None = no change
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_accessor :group_name
|
|
28
|
+
|
|
29
|
+
# Optional new order for products in this group (array of
|
|
30
|
+
# product_collection_group_pdts UUIDs)
|
|
31
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
32
|
+
attr_accessor :product_order
|
|
33
|
+
|
|
34
|
+
# Optional status update
|
|
35
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
36
|
+
attr_accessor :status
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
id: String,
|
|
41
|
+
group_id: String,
|
|
42
|
+
group_name: T.nilable(String),
|
|
43
|
+
product_order: T.nilable(T::Array[String]),
|
|
44
|
+
status: T.nilable(T::Boolean),
|
|
45
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
46
|
+
).returns(T.attached_class)
|
|
47
|
+
end
|
|
48
|
+
def self.new(
|
|
49
|
+
id:,
|
|
50
|
+
group_id:,
|
|
51
|
+
# Optional group name update: Some(Some(name)) = set name, Some(None) = clear
|
|
52
|
+
# name, None = no change
|
|
53
|
+
group_name: nil,
|
|
54
|
+
# Optional new order for products in this group (array of
|
|
55
|
+
# product_collection_group_pdts UUIDs)
|
|
56
|
+
product_order: nil,
|
|
57
|
+
# Optional status update
|
|
58
|
+
status: nil,
|
|
59
|
+
request_options: {}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
sig do
|
|
64
|
+
override.returns(
|
|
65
|
+
{
|
|
66
|
+
id: String,
|
|
67
|
+
group_id: String,
|
|
68
|
+
group_name: T.nilable(String),
|
|
69
|
+
product_order: T.nilable(T::Array[String]),
|
|
70
|
+
status: T.nilable(T::Boolean),
|
|
71
|
+
request_options: Dodopayments::RequestOptions
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
def to_hash
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
module Groups
|
|
7
|
+
class ItemCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Dodopayments::ProductCollections::Groups::ItemCreateParams,
|
|
15
|
+
Dodopayments::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :group_id
|
|
24
|
+
|
|
25
|
+
# Products to add to the group
|
|
26
|
+
sig do
|
|
27
|
+
returns(T::Array[Dodopayments::ProductCollections::GroupProduct])
|
|
28
|
+
end
|
|
29
|
+
attr_accessor :products
|
|
30
|
+
|
|
31
|
+
sig do
|
|
32
|
+
params(
|
|
33
|
+
id: String,
|
|
34
|
+
group_id: String,
|
|
35
|
+
products:
|
|
36
|
+
T::Array[
|
|
37
|
+
Dodopayments::ProductCollections::GroupProduct::OrHash
|
|
38
|
+
],
|
|
39
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
40
|
+
).returns(T.attached_class)
|
|
41
|
+
end
|
|
42
|
+
def self.new(
|
|
43
|
+
id:,
|
|
44
|
+
group_id:,
|
|
45
|
+
# Products to add to the group
|
|
46
|
+
products:,
|
|
47
|
+
request_options: {}
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
sig do
|
|
52
|
+
override.returns(
|
|
53
|
+
{
|
|
54
|
+
id: String,
|
|
55
|
+
group_id: String,
|
|
56
|
+
products:
|
|
57
|
+
T::Array[Dodopayments::ProductCollections::GroupProduct],
|
|
58
|
+
request_options: Dodopayments::RequestOptions
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
def to_hash
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
module Groups
|
|
7
|
+
ItemCreateResponse =
|
|
8
|
+
T.let(
|
|
9
|
+
Dodopayments::Internal::Type::ArrayOf[
|
|
10
|
+
Dodopayments::ProductCollections::Groups::ProductCollectionProduct
|
|
11
|
+
],
|
|
12
|
+
Dodopayments::Internal::Type::Converter
|
|
13
|
+
)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
module Groups
|
|
7
|
+
class ItemDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Dodopayments::ProductCollections::Groups::ItemDeleteParams,
|
|
15
|
+
Dodopayments::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :group_id
|
|
24
|
+
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
attr_accessor :item_id
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
id: String,
|
|
31
|
+
group_id: String,
|
|
32
|
+
item_id: String,
|
|
33
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
34
|
+
).returns(T.attached_class)
|
|
35
|
+
end
|
|
36
|
+
def self.new(id:, group_id:, item_id:, request_options: {})
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
sig do
|
|
40
|
+
override.returns(
|
|
41
|
+
{
|
|
42
|
+
id: String,
|
|
43
|
+
group_id: String,
|
|
44
|
+
item_id: String,
|
|
45
|
+
request_options: Dodopayments::RequestOptions
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
def to_hash
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
module Groups
|
|
7
|
+
class ItemUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
OrHash =
|
|
12
|
+
T.type_alias do
|
|
13
|
+
T.any(
|
|
14
|
+
Dodopayments::ProductCollections::Groups::ItemUpdateParams,
|
|
15
|
+
Dodopayments::Internal::AnyHash
|
|
16
|
+
)
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
sig { returns(String) }
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
sig { returns(String) }
|
|
23
|
+
attr_accessor :group_id
|
|
24
|
+
|
|
25
|
+
sig { returns(String) }
|
|
26
|
+
attr_accessor :item_id
|
|
27
|
+
|
|
28
|
+
# Status of the product in the group
|
|
29
|
+
sig { returns(T::Boolean) }
|
|
30
|
+
attr_accessor :status
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
id: String,
|
|
35
|
+
group_id: String,
|
|
36
|
+
item_id: String,
|
|
37
|
+
status: T::Boolean,
|
|
38
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
39
|
+
).returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
id:,
|
|
43
|
+
group_id:,
|
|
44
|
+
item_id:,
|
|
45
|
+
# Status of the product in the group
|
|
46
|
+
status:,
|
|
47
|
+
request_options: {}
|
|
48
|
+
)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
sig do
|
|
52
|
+
override.returns(
|
|
53
|
+
{
|
|
54
|
+
id: String,
|
|
55
|
+
group_id: String,
|
|
56
|
+
item_id: String,
|
|
57
|
+
status: T::Boolean,
|
|
58
|
+
request_options: Dodopayments::RequestOptions
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
def to_hash
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|