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
|
@@ -7,8 +7,8 @@ module Dodopayments
|
|
|
7
7
|
# Filter clauses - can be direct conditions or nested filters (up to 3 levels
|
|
8
8
|
# deep)
|
|
9
9
|
#
|
|
10
|
-
# @return [
|
|
11
|
-
required :clauses, union: -> { Dodopayments::
|
|
10
|
+
# @return [Dodopayments::Models::FilterType]
|
|
11
|
+
required :clauses, union: -> { Dodopayments::FilterType }
|
|
12
12
|
|
|
13
13
|
# @!attribute conjunction
|
|
14
14
|
# Logical conjunction to apply between clauses (and/or)
|
|
@@ -27,337 +27,9 @@ module Dodopayments
|
|
|
27
27
|
# filter has a conjunction (and/or) and clauses that can be either direct
|
|
28
28
|
# conditions or nested filters.
|
|
29
29
|
#
|
|
30
|
-
# @param clauses [
|
|
30
|
+
# @param clauses [Dodopayments::Models::FilterType] Filter clauses - can be direct conditions or nested filters (up to 3 levels deep
|
|
31
31
|
#
|
|
32
32
|
# @param conjunction [Symbol, Dodopayments::Models::Conjunction] Logical conjunction to apply between clauses (and/or)
|
|
33
|
-
|
|
34
|
-
# Filter clauses - can be direct conditions or nested filters (up to 3 levels
|
|
35
|
-
# deep)
|
|
36
|
-
#
|
|
37
|
-
# @see Dodopayments::Models::MeterFilter#clauses
|
|
38
|
-
module Clauses
|
|
39
|
-
extend Dodopayments::Internal::Type::Union
|
|
40
|
-
|
|
41
|
-
# Direct filter conditions - array of condition objects with key, operator, and value
|
|
42
|
-
variant -> { Dodopayments::Models::MeterFilter::Clauses::DirectFilterConditionArray }
|
|
43
|
-
|
|
44
|
-
# Nested filters - supports up to 3 levels deep
|
|
45
|
-
variant -> { Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilterArray }
|
|
46
|
-
|
|
47
|
-
class DirectFilterCondition < Dodopayments::Internal::Type::BaseModel
|
|
48
|
-
# @!attribute key
|
|
49
|
-
# Filter key to apply
|
|
50
|
-
#
|
|
51
|
-
# @return [String]
|
|
52
|
-
required :key, String
|
|
53
|
-
|
|
54
|
-
# @!attribute operator
|
|
55
|
-
#
|
|
56
|
-
# @return [Symbol, Dodopayments::Models::FilterOperator]
|
|
57
|
-
required :operator, enum: -> { Dodopayments::FilterOperator }
|
|
58
|
-
|
|
59
|
-
# @!attribute value
|
|
60
|
-
# Filter value - can be string, number, or boolean
|
|
61
|
-
#
|
|
62
|
-
# @return [String, Float, Boolean]
|
|
63
|
-
required :value, union: -> { Dodopayments::MeterFilter::Clauses::DirectFilterCondition::Value }
|
|
64
|
-
|
|
65
|
-
# @!method initialize(key:, operator:, value:)
|
|
66
|
-
# Filter condition with key, operator, and value
|
|
67
|
-
#
|
|
68
|
-
# @param key [String] Filter key to apply
|
|
69
|
-
#
|
|
70
|
-
# @param operator [Symbol, Dodopayments::Models::FilterOperator]
|
|
71
|
-
#
|
|
72
|
-
# @param value [String, Float, Boolean] Filter value - can be string, number, or boolean
|
|
73
|
-
|
|
74
|
-
# Filter value - can be string, number, or boolean
|
|
75
|
-
#
|
|
76
|
-
# @see Dodopayments::Models::MeterFilter::Clauses::DirectFilterCondition#value
|
|
77
|
-
module Value
|
|
78
|
-
extend Dodopayments::Internal::Type::Union
|
|
79
|
-
|
|
80
|
-
variant String
|
|
81
|
-
|
|
82
|
-
variant Float
|
|
83
|
-
|
|
84
|
-
variant Dodopayments::Internal::Type::Boolean
|
|
85
|
-
|
|
86
|
-
# @!method self.variants
|
|
87
|
-
# @return [Array(String, Float, Boolean)]
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
class NestedMeterFilter < Dodopayments::Internal::Type::BaseModel
|
|
92
|
-
# @!attribute clauses
|
|
93
|
-
# Level 1: Can be conditions or nested filters (2 more levels allowed)
|
|
94
|
-
#
|
|
95
|
-
# @return [Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition>, Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter>]
|
|
96
|
-
required :clauses, union: -> { Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses }
|
|
97
|
-
|
|
98
|
-
# @!attribute conjunction
|
|
99
|
-
#
|
|
100
|
-
# @return [Symbol, Dodopayments::Models::Conjunction]
|
|
101
|
-
required :conjunction, enum: -> { Dodopayments::Conjunction }
|
|
102
|
-
|
|
103
|
-
# @!method initialize(clauses:, conjunction:)
|
|
104
|
-
# Level 1 nested filter - can contain Level 2 filters
|
|
105
|
-
#
|
|
106
|
-
# @param clauses [Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition>, Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter>] Level 1: Can be conditions or nested filters (2 more levels allowed)
|
|
107
|
-
#
|
|
108
|
-
# @param conjunction [Symbol, Dodopayments::Models::Conjunction]
|
|
109
|
-
|
|
110
|
-
# Level 1: Can be conditions or nested filters (2 more levels allowed)
|
|
111
|
-
#
|
|
112
|
-
# @see Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter#clauses
|
|
113
|
-
module Clauses
|
|
114
|
-
extend Dodopayments::Internal::Type::Union
|
|
115
|
-
|
|
116
|
-
# Array of filter conditions
|
|
117
|
-
variant -> { Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterConditionArray }
|
|
118
|
-
|
|
119
|
-
# Array of level 2 nested filters
|
|
120
|
-
variant -> { Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilterArray }
|
|
121
|
-
|
|
122
|
-
class Level1FilterCondition < Dodopayments::Internal::Type::BaseModel
|
|
123
|
-
# @!attribute key
|
|
124
|
-
# Filter key to apply
|
|
125
|
-
#
|
|
126
|
-
# @return [String]
|
|
127
|
-
required :key, String
|
|
128
|
-
|
|
129
|
-
# @!attribute operator
|
|
130
|
-
#
|
|
131
|
-
# @return [Symbol, Dodopayments::Models::FilterOperator]
|
|
132
|
-
required :operator, enum: -> { Dodopayments::FilterOperator }
|
|
133
|
-
|
|
134
|
-
# @!attribute value
|
|
135
|
-
# Filter value - can be string, number, or boolean
|
|
136
|
-
#
|
|
137
|
-
# @return [String, Float, Boolean]
|
|
138
|
-
required :value,
|
|
139
|
-
union: -> { Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition::Value }
|
|
140
|
-
|
|
141
|
-
# @!method initialize(key:, operator:, value:)
|
|
142
|
-
# Filter condition with key, operator, and value
|
|
143
|
-
#
|
|
144
|
-
# @param key [String] Filter key to apply
|
|
145
|
-
#
|
|
146
|
-
# @param operator [Symbol, Dodopayments::Models::FilterOperator]
|
|
147
|
-
#
|
|
148
|
-
# @param value [String, Float, Boolean] Filter value - can be string, number, or boolean
|
|
149
|
-
|
|
150
|
-
# Filter value - can be string, number, or boolean
|
|
151
|
-
#
|
|
152
|
-
# @see Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition#value
|
|
153
|
-
module Value
|
|
154
|
-
extend Dodopayments::Internal::Type::Union
|
|
155
|
-
|
|
156
|
-
variant String
|
|
157
|
-
|
|
158
|
-
variant Float
|
|
159
|
-
|
|
160
|
-
variant Dodopayments::Internal::Type::Boolean
|
|
161
|
-
|
|
162
|
-
# @!method self.variants
|
|
163
|
-
# @return [Array(String, Float, Boolean)]
|
|
164
|
-
end
|
|
165
|
-
end
|
|
166
|
-
|
|
167
|
-
class Level1NestedFilter < Dodopayments::Internal::Type::BaseModel
|
|
168
|
-
# @!attribute clauses
|
|
169
|
-
# Level 2: Can be conditions or nested filters (1 more level allowed)
|
|
170
|
-
#
|
|
171
|
-
# @return [Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition>, Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter>]
|
|
172
|
-
required :clauses,
|
|
173
|
-
union: -> { Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses }
|
|
174
|
-
|
|
175
|
-
# @!attribute conjunction
|
|
176
|
-
#
|
|
177
|
-
# @return [Symbol, Dodopayments::Models::Conjunction]
|
|
178
|
-
required :conjunction, enum: -> { Dodopayments::Conjunction }
|
|
179
|
-
|
|
180
|
-
# @!method initialize(clauses:, conjunction:)
|
|
181
|
-
# Level 2 nested filter
|
|
182
|
-
#
|
|
183
|
-
# @param clauses [Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition>, Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter>] Level 2: Can be conditions or nested filters (1 more level allowed)
|
|
184
|
-
#
|
|
185
|
-
# @param conjunction [Symbol, Dodopayments::Models::Conjunction]
|
|
186
|
-
|
|
187
|
-
# Level 2: Can be conditions or nested filters (1 more level allowed)
|
|
188
|
-
#
|
|
189
|
-
# @see Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter#clauses
|
|
190
|
-
module Clauses
|
|
191
|
-
extend Dodopayments::Internal::Type::Union
|
|
192
|
-
|
|
193
|
-
# Array of filter conditions
|
|
194
|
-
variant -> { Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterConditionArray }
|
|
195
|
-
|
|
196
|
-
# Array of level 3 nested filters (final level)
|
|
197
|
-
variant -> { Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilterArray }
|
|
198
|
-
|
|
199
|
-
class Level2FilterCondition < Dodopayments::Internal::Type::BaseModel
|
|
200
|
-
# @!attribute key
|
|
201
|
-
# Filter key to apply
|
|
202
|
-
#
|
|
203
|
-
# @return [String]
|
|
204
|
-
required :key, String
|
|
205
|
-
|
|
206
|
-
# @!attribute operator
|
|
207
|
-
#
|
|
208
|
-
# @return [Symbol, Dodopayments::Models::FilterOperator]
|
|
209
|
-
required :operator, enum: -> { Dodopayments::FilterOperator }
|
|
210
|
-
|
|
211
|
-
# @!attribute value
|
|
212
|
-
# Filter value - can be string, number, or boolean
|
|
213
|
-
#
|
|
214
|
-
# @return [String, Float, Boolean]
|
|
215
|
-
required :value,
|
|
216
|
-
union: -> { Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition::Value }
|
|
217
|
-
|
|
218
|
-
# @!method initialize(key:, operator:, value:)
|
|
219
|
-
# Filter condition with key, operator, and value
|
|
220
|
-
#
|
|
221
|
-
# @param key [String] Filter key to apply
|
|
222
|
-
#
|
|
223
|
-
# @param operator [Symbol, Dodopayments::Models::FilterOperator]
|
|
224
|
-
#
|
|
225
|
-
# @param value [String, Float, Boolean] Filter value - can be string, number, or boolean
|
|
226
|
-
|
|
227
|
-
# Filter value - can be string, number, or boolean
|
|
228
|
-
#
|
|
229
|
-
# @see Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition#value
|
|
230
|
-
module Value
|
|
231
|
-
extend Dodopayments::Internal::Type::Union
|
|
232
|
-
|
|
233
|
-
variant String
|
|
234
|
-
|
|
235
|
-
variant Float
|
|
236
|
-
|
|
237
|
-
variant Dodopayments::Internal::Type::Boolean
|
|
238
|
-
|
|
239
|
-
# @!method self.variants
|
|
240
|
-
# @return [Array(String, Float, Boolean)]
|
|
241
|
-
end
|
|
242
|
-
end
|
|
243
|
-
|
|
244
|
-
class Level2NestedFilter < Dodopayments::Internal::Type::BaseModel
|
|
245
|
-
# @!attribute clauses
|
|
246
|
-
# Level 3: Filter conditions only (max depth reached)
|
|
247
|
-
#
|
|
248
|
-
# @return [Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause>]
|
|
249
|
-
required :clauses,
|
|
250
|
-
-> do
|
|
251
|
-
Dodopayments::Internal::Type::ArrayOf[
|
|
252
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause
|
|
253
|
-
]
|
|
254
|
-
end
|
|
255
|
-
|
|
256
|
-
# @!attribute conjunction
|
|
257
|
-
#
|
|
258
|
-
# @return [Symbol, Dodopayments::Models::Conjunction]
|
|
259
|
-
required :conjunction, enum: -> { Dodopayments::Conjunction }
|
|
260
|
-
|
|
261
|
-
# @!method initialize(clauses:, conjunction:)
|
|
262
|
-
# Level 3 nested filter (final nesting level)
|
|
263
|
-
#
|
|
264
|
-
# @param clauses [Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause>] Level 3: Filter conditions only (max depth reached)
|
|
265
|
-
#
|
|
266
|
-
# @param conjunction [Symbol, Dodopayments::Models::Conjunction]
|
|
267
|
-
|
|
268
|
-
class Clause < Dodopayments::Internal::Type::BaseModel
|
|
269
|
-
# @!attribute key
|
|
270
|
-
# Filter key to apply
|
|
271
|
-
#
|
|
272
|
-
# @return [String]
|
|
273
|
-
required :key, String
|
|
274
|
-
|
|
275
|
-
# @!attribute operator
|
|
276
|
-
#
|
|
277
|
-
# @return [Symbol, Dodopayments::Models::FilterOperator]
|
|
278
|
-
required :operator, enum: -> { Dodopayments::FilterOperator }
|
|
279
|
-
|
|
280
|
-
# @!attribute value
|
|
281
|
-
# Filter value - can be string, number, or boolean
|
|
282
|
-
#
|
|
283
|
-
# @return [String, Float, Boolean]
|
|
284
|
-
required :value,
|
|
285
|
-
union: -> { Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause::Value }
|
|
286
|
-
|
|
287
|
-
# @!method initialize(key:, operator:, value:)
|
|
288
|
-
# Filter condition with key, operator, and value
|
|
289
|
-
#
|
|
290
|
-
# @param key [String] Filter key to apply
|
|
291
|
-
#
|
|
292
|
-
# @param operator [Symbol, Dodopayments::Models::FilterOperator]
|
|
293
|
-
#
|
|
294
|
-
# @param value [String, Float, Boolean] Filter value - can be string, number, or boolean
|
|
295
|
-
|
|
296
|
-
# Filter value - can be string, number, or boolean
|
|
297
|
-
#
|
|
298
|
-
# @see Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause#value
|
|
299
|
-
module Value
|
|
300
|
-
extend Dodopayments::Internal::Type::Union
|
|
301
|
-
|
|
302
|
-
variant String
|
|
303
|
-
|
|
304
|
-
variant Float
|
|
305
|
-
|
|
306
|
-
variant Dodopayments::Internal::Type::Boolean
|
|
307
|
-
|
|
308
|
-
# @!method self.variants
|
|
309
|
-
# @return [Array(String, Float, Boolean)]
|
|
310
|
-
end
|
|
311
|
-
end
|
|
312
|
-
end
|
|
313
|
-
|
|
314
|
-
# @!method self.variants
|
|
315
|
-
# @return [Array(Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition>, Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter>)]
|
|
316
|
-
|
|
317
|
-
# @type [Dodopayments::Internal::Type::Converter]
|
|
318
|
-
Level2FilterConditionArray =
|
|
319
|
-
Dodopayments::Internal::Type::ArrayOf[
|
|
320
|
-
-> { Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition }
|
|
321
|
-
]
|
|
322
|
-
|
|
323
|
-
# @type [Dodopayments::Internal::Type::Converter]
|
|
324
|
-
Level2NestedFilterArray =
|
|
325
|
-
Dodopayments::Internal::Type::ArrayOf[
|
|
326
|
-
-> { Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter }
|
|
327
|
-
]
|
|
328
|
-
end
|
|
329
|
-
end
|
|
330
|
-
|
|
331
|
-
# @!method self.variants
|
|
332
|
-
# @return [Array(Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition>, Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter>)]
|
|
333
|
-
|
|
334
|
-
# @type [Dodopayments::Internal::Type::Converter]
|
|
335
|
-
Level1FilterConditionArray =
|
|
336
|
-
Dodopayments::Internal::Type::ArrayOf[-> {
|
|
337
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition
|
|
338
|
-
}]
|
|
339
|
-
|
|
340
|
-
# @type [Dodopayments::Internal::Type::Converter]
|
|
341
|
-
Level1NestedFilterArray =
|
|
342
|
-
Dodopayments::Internal::Type::ArrayOf[-> {
|
|
343
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter
|
|
344
|
-
}]
|
|
345
|
-
end
|
|
346
|
-
end
|
|
347
|
-
|
|
348
|
-
# @!method self.variants
|
|
349
|
-
# @return [Array(Array<Dodopayments::Models::MeterFilter::Clauses::DirectFilterCondition>, Array<Dodopayments::Models::MeterFilter::Clauses::NestedMeterFilter>)]
|
|
350
|
-
|
|
351
|
-
# @type [Dodopayments::Internal::Type::Converter]
|
|
352
|
-
DirectFilterConditionArray =
|
|
353
|
-
Dodopayments::Internal::Type::ArrayOf[-> {
|
|
354
|
-
Dodopayments::MeterFilter::Clauses::DirectFilterCondition
|
|
355
|
-
}]
|
|
356
|
-
|
|
357
|
-
# @type [Dodopayments::Internal::Type::Converter]
|
|
358
|
-
NestedMeterFilterArray =
|
|
359
|
-
Dodopayments::Internal::Type::ArrayOf[-> { Dodopayments::MeterFilter::Clauses::NestedMeterFilter }]
|
|
360
|
-
end
|
|
361
33
|
end
|
|
362
34
|
end
|
|
363
35
|
end
|
|
@@ -149,9 +149,9 @@ module Dodopayments
|
|
|
149
149
|
# @!attribute discounts
|
|
150
150
|
# All stacked discounts applied, ordered by position
|
|
151
151
|
#
|
|
152
|
-
# @return [Array<Dodopayments::Models::
|
|
152
|
+
# @return [Array<Dodopayments::Models::DiscountDetail>, nil]
|
|
153
153
|
optional :discounts,
|
|
154
|
-
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::
|
|
154
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::DiscountDetail] },
|
|
155
155
|
nil?: true
|
|
156
156
|
|
|
157
157
|
# @!attribute error_code
|
|
@@ -291,7 +291,7 @@ module Dodopayments
|
|
|
291
291
|
#
|
|
292
292
|
# @param discount_id [String, nil] DEPRECATED: Use discounts instead. Returns the first discount's ID if present.
|
|
293
293
|
#
|
|
294
|
-
# @param discounts [Array<Dodopayments::Models::
|
|
294
|
+
# @param discounts [Array<Dodopayments::Models::DiscountDetail>, nil] All stacked discounts applied, ordered by position
|
|
295
295
|
#
|
|
296
296
|
# @param error_code [String, nil] An error code if the payment failed
|
|
297
297
|
#
|
|
@@ -321,144 +321,6 @@ module Dodopayments
|
|
|
321
321
|
#
|
|
322
322
|
# @param updated_at [Time, nil] Timestamp when the payment was last updated
|
|
323
323
|
|
|
324
|
-
class Discount < Dodopayments::Internal::Type::BaseModel
|
|
325
|
-
# @!attribute amount
|
|
326
|
-
# The discount amount (basis points for percentage, USD cents for flat)
|
|
327
|
-
#
|
|
328
|
-
# @return [Integer]
|
|
329
|
-
required :amount, Integer
|
|
330
|
-
|
|
331
|
-
# @!attribute business_id
|
|
332
|
-
# The business this discount belongs to
|
|
333
|
-
#
|
|
334
|
-
# @return [String]
|
|
335
|
-
required :business_id, String
|
|
336
|
-
|
|
337
|
-
# @!attribute code
|
|
338
|
-
# The discount code
|
|
339
|
-
#
|
|
340
|
-
# @return [String]
|
|
341
|
-
required :code, String
|
|
342
|
-
|
|
343
|
-
# @!attribute created_at
|
|
344
|
-
# Timestamp when the discount was created
|
|
345
|
-
#
|
|
346
|
-
# @return [Time]
|
|
347
|
-
required :created_at, Time
|
|
348
|
-
|
|
349
|
-
# @!attribute discount_id
|
|
350
|
-
# The unique discount ID
|
|
351
|
-
#
|
|
352
|
-
# @return [String]
|
|
353
|
-
required :discount_id, String
|
|
354
|
-
|
|
355
|
-
# @!attribute metadata
|
|
356
|
-
# Additional metadata
|
|
357
|
-
#
|
|
358
|
-
# @return [Hash{Symbol=>String}]
|
|
359
|
-
required :metadata, Dodopayments::Internal::Type::HashOf[String]
|
|
360
|
-
|
|
361
|
-
# @!attribute position
|
|
362
|
-
# Position of this discount in the stack (0-based)
|
|
363
|
-
#
|
|
364
|
-
# @return [Integer]
|
|
365
|
-
required :position, Integer
|
|
366
|
-
|
|
367
|
-
# @!attribute preserve_on_plan_change
|
|
368
|
-
# Whether this discount should be preserved when a subscription changes plans
|
|
369
|
-
#
|
|
370
|
-
# @return [Boolean]
|
|
371
|
-
required :preserve_on_plan_change, Dodopayments::Internal::Type::Boolean
|
|
372
|
-
|
|
373
|
-
# @!attribute restricted_to
|
|
374
|
-
# List of product IDs to which this discount is restricted
|
|
375
|
-
#
|
|
376
|
-
# @return [Array<String>]
|
|
377
|
-
required :restricted_to, Dodopayments::Internal::Type::ArrayOf[String]
|
|
378
|
-
|
|
379
|
-
# @!attribute times_used
|
|
380
|
-
# How many times this discount has been used
|
|
381
|
-
#
|
|
382
|
-
# @return [Integer]
|
|
383
|
-
required :times_used, Integer
|
|
384
|
-
|
|
385
|
-
# @!attribute type
|
|
386
|
-
# The type of discount
|
|
387
|
-
#
|
|
388
|
-
# @return [Symbol, Dodopayments::Models::DiscountType]
|
|
389
|
-
required :type, enum: -> { Dodopayments::DiscountType }
|
|
390
|
-
|
|
391
|
-
# @!attribute cycles_remaining
|
|
392
|
-
# Remaining billing cycles for this discount on this subscription (None for
|
|
393
|
-
# one-time payments)
|
|
394
|
-
#
|
|
395
|
-
# @return [Integer, nil]
|
|
396
|
-
optional :cycles_remaining, Integer, nil?: true
|
|
397
|
-
|
|
398
|
-
# @!attribute expires_at
|
|
399
|
-
# Optional date/time after which discount is expired
|
|
400
|
-
#
|
|
401
|
-
# @return [Time, nil]
|
|
402
|
-
optional :expires_at, Time, nil?: true
|
|
403
|
-
|
|
404
|
-
# @!attribute name
|
|
405
|
-
# Name for the Discount
|
|
406
|
-
#
|
|
407
|
-
# @return [String, nil]
|
|
408
|
-
optional :name, String, nil?: true
|
|
409
|
-
|
|
410
|
-
# @!attribute subscription_cycles
|
|
411
|
-
# Number of subscription billing cycles this discount is valid for
|
|
412
|
-
#
|
|
413
|
-
# @return [Integer, nil]
|
|
414
|
-
optional :subscription_cycles, Integer, nil?: true
|
|
415
|
-
|
|
416
|
-
# @!attribute usage_limit
|
|
417
|
-
# Usage limit for this discount, if any
|
|
418
|
-
#
|
|
419
|
-
# @return [Integer, nil]
|
|
420
|
-
optional :usage_limit, Integer, nil?: true
|
|
421
|
-
|
|
422
|
-
# @!method initialize(amount:, business_id:, code:, created_at:, discount_id:, metadata:, position:, preserve_on_plan_change:, restricted_to:, times_used:, type:, cycles_remaining: nil, expires_at: nil, name: nil, subscription_cycles: nil, usage_limit: nil)
|
|
423
|
-
# Some parameter documentations has been truncated, see
|
|
424
|
-
# {Dodopayments::Models::Payment::Discount} for more details.
|
|
425
|
-
#
|
|
426
|
-
# Response struct for a discount with its position in a stack and optional
|
|
427
|
-
# cycle-tracking information (for subscriptions).
|
|
428
|
-
#
|
|
429
|
-
# @param amount [Integer] The discount amount (basis points for percentage, USD cents for flat)
|
|
430
|
-
#
|
|
431
|
-
# @param business_id [String] The business this discount belongs to
|
|
432
|
-
#
|
|
433
|
-
# @param code [String] The discount code
|
|
434
|
-
#
|
|
435
|
-
# @param created_at [Time] Timestamp when the discount was created
|
|
436
|
-
#
|
|
437
|
-
# @param discount_id [String] The unique discount ID
|
|
438
|
-
#
|
|
439
|
-
# @param metadata [Hash{Symbol=>String}] Additional metadata
|
|
440
|
-
#
|
|
441
|
-
# @param position [Integer] Position of this discount in the stack (0-based)
|
|
442
|
-
#
|
|
443
|
-
# @param preserve_on_plan_change [Boolean] Whether this discount should be preserved when a subscription changes plans
|
|
444
|
-
#
|
|
445
|
-
# @param restricted_to [Array<String>] List of product IDs to which this discount is restricted
|
|
446
|
-
#
|
|
447
|
-
# @param times_used [Integer] How many times this discount has been used
|
|
448
|
-
#
|
|
449
|
-
# @param type [Symbol, Dodopayments::Models::DiscountType] The type of discount
|
|
450
|
-
#
|
|
451
|
-
# @param cycles_remaining [Integer, nil] Remaining billing cycles for this discount on this subscription (None for one-ti
|
|
452
|
-
#
|
|
453
|
-
# @param expires_at [Time, nil] Optional date/time after which discount is expired
|
|
454
|
-
#
|
|
455
|
-
# @param name [String, nil] Name for the Discount
|
|
456
|
-
#
|
|
457
|
-
# @param subscription_cycles [Integer, nil] Number of subscription billing cycles this discount is valid for
|
|
458
|
-
#
|
|
459
|
-
# @param usage_limit [Integer, nil] Usage limit for this discount, if any
|
|
460
|
-
end
|
|
461
|
-
|
|
462
324
|
class ProductCart < Dodopayments::Internal::Type::BaseModel
|
|
463
325
|
# @!attribute product_id
|
|
464
326
|
#
|
|
@@ -52,6 +52,14 @@ module Dodopayments
|
|
|
52
52
|
# @return [Symbol, Dodopayments::Models::Currency, nil]
|
|
53
53
|
optional :billing_currency, enum: -> { Dodopayments::Currency }, nil?: true
|
|
54
54
|
|
|
55
|
+
# @!attribute customer_business_name
|
|
56
|
+
# Optional business / legal name associated with the tax id. When provided
|
|
57
|
+
# together with a valid tax id for a B2B purchase, this name is rendered on the
|
|
58
|
+
# invoice instead of the customer's personal name.
|
|
59
|
+
#
|
|
60
|
+
# @return [String, nil]
|
|
61
|
+
optional :customer_business_name, String, nil?: true
|
|
62
|
+
|
|
55
63
|
# @!attribute discount_code
|
|
56
64
|
# @deprecated Use `discount_id` instead.
|
|
57
65
|
#
|
|
@@ -136,7 +144,7 @@ module Dodopayments
|
|
|
136
144
|
# @return [String, nil]
|
|
137
145
|
optional :tax_id, String, nil?: true
|
|
138
146
|
|
|
139
|
-
# @!method initialize(billing:, customer:, product_cart:, adaptive_currency_fees_inclusive: nil, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, discount_codes: nil, force_3ds: nil, metadata: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
147
|
+
# @!method initialize(billing:, customer:, product_cart:, adaptive_currency_fees_inclusive: nil, allowed_payment_method_types: nil, billing_currency: nil, customer_business_name: nil, discount_code: nil, discount_codes: nil, force_3ds: nil, metadata: nil, payment_link: nil, payment_method_id: nil, redirect_immediately: nil, require_phone_number: nil, return_url: nil, short_link: nil, show_saved_payment_methods: nil, tax_id: nil, request_options: {})
|
|
140
148
|
# Some parameter documentations has been truncated, see
|
|
141
149
|
# {Dodopayments::Models::PaymentCreateParams} for more details.
|
|
142
150
|
#
|
|
@@ -152,6 +160,8 @@ module Dodopayments
|
|
|
152
160
|
#
|
|
153
161
|
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil] Fix the currency in which the end customer is billed.
|
|
154
162
|
#
|
|
163
|
+
# @param customer_business_name [String, nil] Optional business / legal name associated with the tax id. When provided
|
|
164
|
+
#
|
|
155
165
|
# @param discount_code [String, nil] DEPRECATED: Use discount_codes instead. Cannot be used together with discount_co
|
|
156
166
|
#
|
|
157
167
|
# @param discount_codes [Array<String>, nil] Stacked discount codes to apply, in order of application. Max 20.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#create
|
|
6
|
+
class ProductCollection < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute id
|
|
8
|
+
# Unique identifier for the product collection
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :id, String
|
|
12
|
+
|
|
13
|
+
# @!attribute brand_id
|
|
14
|
+
# Brand ID for the collection
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :brand_id, String
|
|
18
|
+
|
|
19
|
+
# @!attribute created_at
|
|
20
|
+
# Timestamp when the collection was created
|
|
21
|
+
#
|
|
22
|
+
# @return [Time]
|
|
23
|
+
required :created_at, Time
|
|
24
|
+
|
|
25
|
+
# @!attribute groups
|
|
26
|
+
# Groups in this collection
|
|
27
|
+
#
|
|
28
|
+
# @return [Array<Dodopayments::Models::ProductCollections::ProductCollectionGroupResponse>]
|
|
29
|
+
required :groups,
|
|
30
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollections::ProductCollectionGroupResponse] }
|
|
31
|
+
|
|
32
|
+
# @!attribute name
|
|
33
|
+
# Name of the collection
|
|
34
|
+
#
|
|
35
|
+
# @return [String]
|
|
36
|
+
required :name, String
|
|
37
|
+
|
|
38
|
+
# @!attribute updated_at
|
|
39
|
+
# Timestamp when the collection was last updated
|
|
40
|
+
#
|
|
41
|
+
# @return [Time]
|
|
42
|
+
required :updated_at, Time
|
|
43
|
+
|
|
44
|
+
# @!attribute description
|
|
45
|
+
# Description of the collection
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :description, String, nil?: true
|
|
49
|
+
|
|
50
|
+
# @!attribute image
|
|
51
|
+
# URL of the collection image
|
|
52
|
+
#
|
|
53
|
+
# @return [String, nil]
|
|
54
|
+
optional :image, String, nil?: true
|
|
55
|
+
|
|
56
|
+
# @!method initialize(id:, brand_id:, created_at:, groups:, name:, updated_at:, description: nil, image: nil)
|
|
57
|
+
# @param id [String] Unique identifier for the product collection
|
|
58
|
+
#
|
|
59
|
+
# @param brand_id [String] Brand ID for the collection
|
|
60
|
+
#
|
|
61
|
+
# @param created_at [Time] Timestamp when the collection was created
|
|
62
|
+
#
|
|
63
|
+
# @param groups [Array<Dodopayments::Models::ProductCollections::ProductCollectionGroupResponse>] Groups in this collection
|
|
64
|
+
#
|
|
65
|
+
# @param name [String] Name of the collection
|
|
66
|
+
#
|
|
67
|
+
# @param updated_at [Time] Timestamp when the collection was last updated
|
|
68
|
+
#
|
|
69
|
+
# @param description [String, nil] Description of the collection
|
|
70
|
+
#
|
|
71
|
+
# @param image [String, nil] URL of the collection image
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# @see Dodopayments::Resources::ProductCollections#create
|
|
6
|
+
class ProductCollectionCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute groups
|
|
11
|
+
# Groups of products in this collection
|
|
12
|
+
#
|
|
13
|
+
# @return [Array<Dodopayments::Models::ProductCollections::ProductCollectionGroupDetails>]
|
|
14
|
+
required :groups,
|
|
15
|
+
-> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::ProductCollections::ProductCollectionGroupDetails] }
|
|
16
|
+
|
|
17
|
+
# @!attribute name
|
|
18
|
+
# Name of the product collection
|
|
19
|
+
#
|
|
20
|
+
# @return [String]
|
|
21
|
+
required :name, String
|
|
22
|
+
|
|
23
|
+
# @!attribute brand_id
|
|
24
|
+
# Brand id for the collection, if not provided will default to primary brand
|
|
25
|
+
#
|
|
26
|
+
# @return [String, nil]
|
|
27
|
+
optional :brand_id, String, nil?: true
|
|
28
|
+
|
|
29
|
+
# @!attribute description
|
|
30
|
+
# Optional description of the product collection
|
|
31
|
+
#
|
|
32
|
+
# @return [String, nil]
|
|
33
|
+
optional :description, String, nil?: true
|
|
34
|
+
|
|
35
|
+
# @!method initialize(groups:, name:, brand_id: nil, description: nil, request_options: {})
|
|
36
|
+
# @param groups [Array<Dodopayments::Models::ProductCollections::ProductCollectionGroupDetails>] Groups of products in this collection
|
|
37
|
+
#
|
|
38
|
+
# @param name [String] Name of the product collection
|
|
39
|
+
#
|
|
40
|
+
# @param brand_id [String, nil] Brand id for the collection, if not provided will default to primary brand
|
|
41
|
+
#
|
|
42
|
+
# @param description [String, nil] Optional description of the product collection
|
|
43
|
+
#
|
|
44
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|