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,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#delete
|
|
6
|
+
class ProductCollectionDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#list
|
|
6
|
+
class ProductCollectionListParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute archived
|
|
11
|
+
# List archived collections
|
|
12
|
+
#
|
|
13
|
+
# @return [Boolean, nil]
|
|
14
|
+
optional :archived, Dodopayments::Internal::Type::Boolean
|
|
15
|
+
|
|
16
|
+
# @!attribute brand_id
|
|
17
|
+
# Filter by Brand id
|
|
18
|
+
#
|
|
19
|
+
# @return [String, nil]
|
|
20
|
+
optional :brand_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute page_number
|
|
23
|
+
# Page number default is 0
|
|
24
|
+
#
|
|
25
|
+
# @return [Integer, nil]
|
|
26
|
+
optional :page_number, Integer
|
|
27
|
+
|
|
28
|
+
# @!attribute page_size
|
|
29
|
+
# Page size default is 10 max is 100
|
|
30
|
+
#
|
|
31
|
+
# @return [Integer, nil]
|
|
32
|
+
optional :page_size, Integer
|
|
33
|
+
|
|
34
|
+
# @!method initialize(archived: nil, brand_id: nil, page_number: nil, page_size: nil, request_options: {})
|
|
35
|
+
# @param archived [Boolean] List archived collections
|
|
36
|
+
#
|
|
37
|
+
# @param brand_id [String] Filter by Brand id
|
|
38
|
+
#
|
|
39
|
+
# @param page_number [Integer] Page number default is 0
|
|
40
|
+
#
|
|
41
|
+
# @param page_size [Integer] Page size default is 10 max is 100
|
|
42
|
+
#
|
|
43
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#list
|
|
6
|
+
class ProductCollectionListResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Collection ID
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute created_at
|
|
14
|
+
# Timestamp when created
|
|
15
|
+
#
|
|
16
|
+
# @return [Time]
|
|
17
|
+
required :created_at, Time
|
|
18
|
+
|
|
19
|
+
# @!attribute name
|
|
20
|
+
# Collection name
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :name, String
|
|
24
|
+
|
|
25
|
+
# @!attribute products_count
|
|
26
|
+
# Number of products in the collection
|
|
27
|
+
#
|
|
28
|
+
# @return [Integer]
|
|
29
|
+
required :products_count, Integer
|
|
30
|
+
|
|
31
|
+
# @!attribute updated_at
|
|
32
|
+
# Timestamp when last updated
|
|
33
|
+
#
|
|
34
|
+
# @return [Time]
|
|
35
|
+
required :updated_at, Time
|
|
36
|
+
|
|
37
|
+
# @!attribute description
|
|
38
|
+
# Collection description
|
|
39
|
+
#
|
|
40
|
+
# @return [String, nil]
|
|
41
|
+
optional :description, String, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute image
|
|
44
|
+
# Collection image URL
|
|
45
|
+
#
|
|
46
|
+
# @return [String, nil]
|
|
47
|
+
optional :image, String, nil?: true
|
|
48
|
+
|
|
49
|
+
# @!method initialize(id:, created_at:, name:, products_count:, updated_at:, description: nil, image: nil)
|
|
50
|
+
# @param id [String] Collection ID
|
|
51
|
+
#
|
|
52
|
+
# @param created_at [Time] Timestamp when created
|
|
53
|
+
#
|
|
54
|
+
# @param name [String] Collection name
|
|
55
|
+
#
|
|
56
|
+
# @param products_count [Integer] Number of products in the collection
|
|
57
|
+
#
|
|
58
|
+
# @param updated_at [Time] Timestamp when last updated
|
|
59
|
+
#
|
|
60
|
+
# @param description [String, nil] Collection description
|
|
61
|
+
#
|
|
62
|
+
# @param image [String, nil] Collection image URL
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#retrieve
|
|
6
|
+
class ProductCollectionRetrieveParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#unarchive
|
|
6
|
+
class ProductCollectionUnarchiveParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(id:, request_options: {})
|
|
16
|
+
# @param id [String]
|
|
17
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#unarchive
|
|
6
|
+
class ProductCollectionUnarchiveResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute collection_id
|
|
8
|
+
# Collection ID that was unarchived
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :collection_id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute excluded_product_ids
|
|
14
|
+
# Product IDs that were excluded because they are archived
|
|
15
|
+
#
|
|
16
|
+
# @return [Array<String>]
|
|
17
|
+
required :excluded_product_ids, Dodopayments::Internal::Type::ArrayOf[String]
|
|
18
|
+
|
|
19
|
+
# @!attribute message
|
|
20
|
+
# Success message
|
|
21
|
+
#
|
|
22
|
+
# @return [String]
|
|
23
|
+
required :message, String
|
|
24
|
+
|
|
25
|
+
# @!method initialize(collection_id:, excluded_product_ids:, message:)
|
|
26
|
+
# @param collection_id [String] Collection ID that was unarchived
|
|
27
|
+
#
|
|
28
|
+
# @param excluded_product_ids [Array<String>] Product IDs that were excluded because they are archived
|
|
29
|
+
#
|
|
30
|
+
# @param message [String] Success message
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#update_images
|
|
6
|
+
class ProductCollectionUpdateImagesParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute force_update
|
|
16
|
+
# If true, generates a new image ID to force cache invalidation
|
|
17
|
+
#
|
|
18
|
+
# @return [Boolean, nil]
|
|
19
|
+
optional :force_update, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
20
|
+
|
|
21
|
+
# @!method initialize(id:, force_update: nil, request_options: {})
|
|
22
|
+
# @param id [String]
|
|
23
|
+
#
|
|
24
|
+
# @param force_update [Boolean, nil] If true, generates a new image ID to force cache invalidation
|
|
25
|
+
#
|
|
26
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#update_images
|
|
6
|
+
class ProductCollectionUpdateImagesResponse < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute url
|
|
8
|
+
# Presigned S3 URL for uploading the image
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :url, String
|
|
12
|
+
|
|
13
|
+
# @!attribute image_id
|
|
14
|
+
# Optional image ID (present when force_update is true)
|
|
15
|
+
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
optional :image_id, String, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!method initialize(url:, image_id: nil)
|
|
20
|
+
# @param url [String] Presigned S3 URL for uploading the image
|
|
21
|
+
#
|
|
22
|
+
# @param image_id [String, nil] Optional image ID (present when force_update is true)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#update
|
|
6
|
+
class ProductCollectionUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute brand_id
|
|
16
|
+
# Optional brand_id update
|
|
17
|
+
#
|
|
18
|
+
# @return [String, nil]
|
|
19
|
+
optional :brand_id, String, nil?: true
|
|
20
|
+
|
|
21
|
+
# @!attribute description
|
|
22
|
+
# Optional description update - pass null to remove, omit to keep unchanged
|
|
23
|
+
#
|
|
24
|
+
# @return [String, nil]
|
|
25
|
+
optional :description, String, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!attribute group_order
|
|
28
|
+
# Optional new order for groups (array of group UUIDs in desired order)
|
|
29
|
+
#
|
|
30
|
+
# @return [Array<String>, nil]
|
|
31
|
+
optional :group_order, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
|
|
32
|
+
|
|
33
|
+
# @!attribute image_id
|
|
34
|
+
# Optional image update - pass null to remove, omit to keep unchanged
|
|
35
|
+
#
|
|
36
|
+
# @return [String, nil]
|
|
37
|
+
optional :image_id, String, nil?: true
|
|
38
|
+
|
|
39
|
+
# @!attribute name
|
|
40
|
+
# Optional new name for the collection
|
|
41
|
+
#
|
|
42
|
+
# @return [String, nil]
|
|
43
|
+
optional :name, String, nil?: true
|
|
44
|
+
|
|
45
|
+
# @!method initialize(id:, brand_id: nil, description: nil, group_order: nil, image_id: nil, name: nil, request_options: {})
|
|
46
|
+
# @param id [String]
|
|
47
|
+
#
|
|
48
|
+
# @param brand_id [String, nil] Optional brand_id update
|
|
49
|
+
#
|
|
50
|
+
# @param description [String, nil] Optional description update - pass null to remove, omit to keep unchanged
|
|
51
|
+
#
|
|
52
|
+
# @param group_order [Array<String>, nil] Optional new order for groups (array of group UUIDs in desired order)
|
|
53
|
+
#
|
|
54
|
+
# @param image_id [String, nil] Optional image update - pass null to remove, omit to keep unchanged
|
|
55
|
+
#
|
|
56
|
+
# @param name [String, nil] Optional new name for the collection
|
|
57
|
+
#
|
|
58
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
# @see Dodopayments::Resources::ProductCollections::Groups#create
|
|
7
|
+
class GroupCreateParams < Dodopayments::Models::ProductCollections::ProductCollectionGroupDetails
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!method initialize(id:, request_options: {})
|
|
17
|
+
# @param id [String]
|
|
18
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
# @see Dodopayments::Resources::ProductCollections::Groups#delete
|
|
7
|
+
class GroupDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute group_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :group_id, String
|
|
20
|
+
|
|
21
|
+
# @!method initialize(id:, group_id:, request_options: {})
|
|
22
|
+
# @param id [String]
|
|
23
|
+
# @param group_id [String]
|
|
24
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
class GroupProduct < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute product_id
|
|
8
|
+
# Product ID to include in the group
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :product_id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute status
|
|
14
|
+
# Status of the product in this group (defaults to true if not provided)
|
|
15
|
+
#
|
|
16
|
+
# @return [Boolean, nil]
|
|
17
|
+
optional :status, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!method initialize(product_id:, status: nil)
|
|
20
|
+
# @param product_id [String] Product ID to include in the group
|
|
21
|
+
#
|
|
22
|
+
# @param status [Boolean, nil] Status of the product in this group (defaults to true if not provided)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
# @see Dodopayments::Resources::ProductCollections::Groups#update
|
|
7
|
+
class GroupUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute group_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :group_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute group_name
|
|
22
|
+
# Optional group name update: Some(Some(name)) = set name, Some(None) = clear
|
|
23
|
+
# name, None = no change
|
|
24
|
+
#
|
|
25
|
+
# @return [String, nil]
|
|
26
|
+
optional :group_name, String, nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute product_order
|
|
29
|
+
# Optional new order for products in this group (array of
|
|
30
|
+
# product_collection_group_pdts UUIDs)
|
|
31
|
+
#
|
|
32
|
+
# @return [Array<String>, nil]
|
|
33
|
+
optional :product_order, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute status
|
|
36
|
+
# Optional status update
|
|
37
|
+
#
|
|
38
|
+
# @return [Boolean, nil]
|
|
39
|
+
optional :status, Dodopayments::Internal::Type::Boolean, nil?: true
|
|
40
|
+
|
|
41
|
+
# @!method initialize(id:, group_id:, group_name: nil, product_order: nil, status: nil, request_options: {})
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {Dodopayments::Models::ProductCollections::GroupUpdateParams} for more details.
|
|
44
|
+
#
|
|
45
|
+
# @param id [String]
|
|
46
|
+
#
|
|
47
|
+
# @param group_id [String]
|
|
48
|
+
#
|
|
49
|
+
# @param group_name [String, nil] Optional group name update: Some(Some(name)) = set name, Some(None) = clear name
|
|
50
|
+
#
|
|
51
|
+
# @param product_order [Array<String>, nil] Optional new order for products in this group (array of product_collection_group
|
|
52
|
+
#
|
|
53
|
+
# @param status [Boolean, nil] Optional status update
|
|
54
|
+
#
|
|
55
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
module Groups
|
|
7
|
+
# @see Dodopayments::Resources::ProductCollections::Groups::Items#create
|
|
8
|
+
class ItemCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
9
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute id
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute group_id
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :group_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute products
|
|
23
|
+
# Products to add to the group
|
|
24
|
+
#
|
|
25
|
+
# @return [Array<Dodopayments::Models::ProductCollections::GroupProduct>]
|
|
26
|
+
required :products,
|
|
27
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollections::GroupProduct] }
|
|
28
|
+
|
|
29
|
+
# @!method initialize(id:, group_id:, products:, request_options: {})
|
|
30
|
+
# @param id [String]
|
|
31
|
+
#
|
|
32
|
+
# @param group_id [String]
|
|
33
|
+
#
|
|
34
|
+
# @param products [Array<Dodopayments::Models::ProductCollections::GroupProduct>] Products to add to the group
|
|
35
|
+
#
|
|
36
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
module Groups
|
|
7
|
+
# @type [Dodopayments::Internal::Type::Converter]
|
|
8
|
+
ItemCreateResponse =
|
|
9
|
+
Dodopayments::Internal::Type::ArrayOf[-> {
|
|
10
|
+
Dodopayments::ProductCollections::Groups::ProductCollectionProduct
|
|
11
|
+
}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
module Groups
|
|
7
|
+
# @see Dodopayments::Resources::ProductCollections::Groups::Items#delete
|
|
8
|
+
class ItemDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
9
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute id
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute group_id
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :group_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute item_id
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
required :item_id, String
|
|
26
|
+
|
|
27
|
+
# @!method initialize(id:, group_id:, item_id:, request_options: {})
|
|
28
|
+
# @param id [String]
|
|
29
|
+
# @param group_id [String]
|
|
30
|
+
# @param item_id [String]
|
|
31
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
module ProductCollections
|
|
6
|
+
module Groups
|
|
7
|
+
# @see Dodopayments::Resources::ProductCollections::Groups::Items#update
|
|
8
|
+
class ItemUpdateParams < Dodopayments::Internal::Type::BaseModel
|
|
9
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
10
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
11
|
+
|
|
12
|
+
# @!attribute id
|
|
13
|
+
#
|
|
14
|
+
# @return [String]
|
|
15
|
+
required :id, String
|
|
16
|
+
|
|
17
|
+
# @!attribute group_id
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :group_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute item_id
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
required :item_id, String
|
|
26
|
+
|
|
27
|
+
# @!attribute status
|
|
28
|
+
# Status of the product in the group
|
|
29
|
+
#
|
|
30
|
+
# @return [Boolean]
|
|
31
|
+
required :status, Dodopayments::Internal::Type::Boolean
|
|
32
|
+
|
|
33
|
+
# @!method initialize(id:, group_id:, item_id:, status:, request_options: {})
|
|
34
|
+
# @param id [String]
|
|
35
|
+
#
|
|
36
|
+
# @param group_id [String]
|
|
37
|
+
#
|
|
38
|
+
# @param item_id [String]
|
|
39
|
+
#
|
|
40
|
+
# @param status [Boolean] Status of the product in the group
|
|
41
|
+
#
|
|
42
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|