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
|
@@ -10,7 +10,7 @@ module Dodopayments
|
|
|
10
10
|
|
|
11
11
|
# Filter clauses - can be direct conditions or nested filters (up to 3 levels
|
|
12
12
|
# deep)
|
|
13
|
-
sig { returns(Dodopayments::
|
|
13
|
+
sig { returns(Dodopayments::FilterType) }
|
|
14
14
|
attr_accessor :clauses
|
|
15
15
|
|
|
16
16
|
# Logical conjunction to apply between clauses (and/or)
|
|
@@ -25,7 +25,7 @@ module Dodopayments
|
|
|
25
25
|
# conditions or nested filters.
|
|
26
26
|
sig do
|
|
27
27
|
params(
|
|
28
|
-
clauses: Dodopayments::
|
|
28
|
+
clauses: Dodopayments::FilterType,
|
|
29
29
|
conjunction: Dodopayments::Conjunction::OrSymbol
|
|
30
30
|
).returns(T.attached_class)
|
|
31
31
|
end
|
|
@@ -41,582 +41,13 @@ module Dodopayments
|
|
|
41
41
|
sig do
|
|
42
42
|
override.returns(
|
|
43
43
|
{
|
|
44
|
-
clauses: Dodopayments::
|
|
44
|
+
clauses: Dodopayments::FilterType,
|
|
45
45
|
conjunction: Dodopayments::Conjunction::OrSymbol
|
|
46
46
|
}
|
|
47
47
|
)
|
|
48
48
|
end
|
|
49
49
|
def to_hash
|
|
50
50
|
end
|
|
51
|
-
|
|
52
|
-
# Filter clauses - can be direct conditions or nested filters (up to 3 levels
|
|
53
|
-
# deep)
|
|
54
|
-
module Clauses
|
|
55
|
-
extend Dodopayments::Internal::Type::Union
|
|
56
|
-
|
|
57
|
-
Variants =
|
|
58
|
-
T.type_alias do
|
|
59
|
-
T.any(
|
|
60
|
-
T::Array[
|
|
61
|
-
Dodopayments::MeterFilter::Clauses::DirectFilterCondition
|
|
62
|
-
],
|
|
63
|
-
T::Array[Dodopayments::MeterFilter::Clauses::NestedMeterFilter]
|
|
64
|
-
)
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
class DirectFilterCondition < Dodopayments::Internal::Type::BaseModel
|
|
68
|
-
OrHash =
|
|
69
|
-
T.type_alias do
|
|
70
|
-
T.any(
|
|
71
|
-
Dodopayments::MeterFilter::Clauses::DirectFilterCondition,
|
|
72
|
-
Dodopayments::Internal::AnyHash
|
|
73
|
-
)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
# Filter key to apply
|
|
77
|
-
sig { returns(String) }
|
|
78
|
-
attr_accessor :key
|
|
79
|
-
|
|
80
|
-
sig { returns(Dodopayments::FilterOperator::OrSymbol) }
|
|
81
|
-
attr_accessor :operator
|
|
82
|
-
|
|
83
|
-
# Filter value - can be string, number, or boolean
|
|
84
|
-
sig do
|
|
85
|
-
returns(
|
|
86
|
-
Dodopayments::MeterFilter::Clauses::DirectFilterCondition::Value::Variants
|
|
87
|
-
)
|
|
88
|
-
end
|
|
89
|
-
attr_accessor :value
|
|
90
|
-
|
|
91
|
-
# Filter condition with key, operator, and value
|
|
92
|
-
sig do
|
|
93
|
-
params(
|
|
94
|
-
key: String,
|
|
95
|
-
operator: Dodopayments::FilterOperator::OrSymbol,
|
|
96
|
-
value:
|
|
97
|
-
Dodopayments::MeterFilter::Clauses::DirectFilterCondition::Value::Variants
|
|
98
|
-
).returns(T.attached_class)
|
|
99
|
-
end
|
|
100
|
-
def self.new(
|
|
101
|
-
# Filter key to apply
|
|
102
|
-
key:,
|
|
103
|
-
operator:,
|
|
104
|
-
# Filter value - can be string, number, or boolean
|
|
105
|
-
value:
|
|
106
|
-
)
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
sig do
|
|
110
|
-
override.returns(
|
|
111
|
-
{
|
|
112
|
-
key: String,
|
|
113
|
-
operator: Dodopayments::FilterOperator::OrSymbol,
|
|
114
|
-
value:
|
|
115
|
-
Dodopayments::MeterFilter::Clauses::DirectFilterCondition::Value::Variants
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
end
|
|
119
|
-
def to_hash
|
|
120
|
-
end
|
|
121
|
-
|
|
122
|
-
# Filter value - can be string, number, or boolean
|
|
123
|
-
module Value
|
|
124
|
-
extend Dodopayments::Internal::Type::Union
|
|
125
|
-
|
|
126
|
-
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
127
|
-
|
|
128
|
-
sig do
|
|
129
|
-
override.returns(
|
|
130
|
-
T::Array[
|
|
131
|
-
Dodopayments::MeterFilter::Clauses::DirectFilterCondition::Value::Variants
|
|
132
|
-
]
|
|
133
|
-
)
|
|
134
|
-
end
|
|
135
|
-
def self.variants
|
|
136
|
-
end
|
|
137
|
-
end
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
class NestedMeterFilter < Dodopayments::Internal::Type::BaseModel
|
|
141
|
-
OrHash =
|
|
142
|
-
T.type_alias do
|
|
143
|
-
T.any(
|
|
144
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter,
|
|
145
|
-
Dodopayments::Internal::AnyHash
|
|
146
|
-
)
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
# Level 1: Can be conditions or nested filters (2 more levels allowed)
|
|
150
|
-
sig do
|
|
151
|
-
returns(
|
|
152
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Variants
|
|
153
|
-
)
|
|
154
|
-
end
|
|
155
|
-
attr_accessor :clauses
|
|
156
|
-
|
|
157
|
-
sig { returns(Dodopayments::Conjunction::OrSymbol) }
|
|
158
|
-
attr_accessor :conjunction
|
|
159
|
-
|
|
160
|
-
# Level 1 nested filter - can contain Level 2 filters
|
|
161
|
-
sig do
|
|
162
|
-
params(
|
|
163
|
-
clauses:
|
|
164
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Variants,
|
|
165
|
-
conjunction: Dodopayments::Conjunction::OrSymbol
|
|
166
|
-
).returns(T.attached_class)
|
|
167
|
-
end
|
|
168
|
-
def self.new(
|
|
169
|
-
# Level 1: Can be conditions or nested filters (2 more levels allowed)
|
|
170
|
-
clauses:,
|
|
171
|
-
conjunction:
|
|
172
|
-
)
|
|
173
|
-
end
|
|
174
|
-
|
|
175
|
-
sig do
|
|
176
|
-
override.returns(
|
|
177
|
-
{
|
|
178
|
-
clauses:
|
|
179
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Variants,
|
|
180
|
-
conjunction: Dodopayments::Conjunction::OrSymbol
|
|
181
|
-
}
|
|
182
|
-
)
|
|
183
|
-
end
|
|
184
|
-
def to_hash
|
|
185
|
-
end
|
|
186
|
-
|
|
187
|
-
# Level 1: Can be conditions or nested filters (2 more levels allowed)
|
|
188
|
-
module Clauses
|
|
189
|
-
extend Dodopayments::Internal::Type::Union
|
|
190
|
-
|
|
191
|
-
Variants =
|
|
192
|
-
T.type_alias do
|
|
193
|
-
T.any(
|
|
194
|
-
T::Array[
|
|
195
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition
|
|
196
|
-
],
|
|
197
|
-
T::Array[
|
|
198
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter
|
|
199
|
-
]
|
|
200
|
-
)
|
|
201
|
-
end
|
|
202
|
-
|
|
203
|
-
class Level1FilterCondition < Dodopayments::Internal::Type::BaseModel
|
|
204
|
-
OrHash =
|
|
205
|
-
T.type_alias do
|
|
206
|
-
T.any(
|
|
207
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition,
|
|
208
|
-
Dodopayments::Internal::AnyHash
|
|
209
|
-
)
|
|
210
|
-
end
|
|
211
|
-
|
|
212
|
-
# Filter key to apply
|
|
213
|
-
sig { returns(String) }
|
|
214
|
-
attr_accessor :key
|
|
215
|
-
|
|
216
|
-
sig { returns(Dodopayments::FilterOperator::OrSymbol) }
|
|
217
|
-
attr_accessor :operator
|
|
218
|
-
|
|
219
|
-
# Filter value - can be string, number, or boolean
|
|
220
|
-
sig do
|
|
221
|
-
returns(
|
|
222
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition::Value::Variants
|
|
223
|
-
)
|
|
224
|
-
end
|
|
225
|
-
attr_accessor :value
|
|
226
|
-
|
|
227
|
-
# Filter condition with key, operator, and value
|
|
228
|
-
sig do
|
|
229
|
-
params(
|
|
230
|
-
key: String,
|
|
231
|
-
operator: Dodopayments::FilterOperator::OrSymbol,
|
|
232
|
-
value:
|
|
233
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition::Value::Variants
|
|
234
|
-
).returns(T.attached_class)
|
|
235
|
-
end
|
|
236
|
-
def self.new(
|
|
237
|
-
# Filter key to apply
|
|
238
|
-
key:,
|
|
239
|
-
operator:,
|
|
240
|
-
# Filter value - can be string, number, or boolean
|
|
241
|
-
value:
|
|
242
|
-
)
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
sig do
|
|
246
|
-
override.returns(
|
|
247
|
-
{
|
|
248
|
-
key: String,
|
|
249
|
-
operator: Dodopayments::FilterOperator::OrSymbol,
|
|
250
|
-
value:
|
|
251
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition::Value::Variants
|
|
252
|
-
}
|
|
253
|
-
)
|
|
254
|
-
end
|
|
255
|
-
def to_hash
|
|
256
|
-
end
|
|
257
|
-
|
|
258
|
-
# Filter value - can be string, number, or boolean
|
|
259
|
-
module Value
|
|
260
|
-
extend Dodopayments::Internal::Type::Union
|
|
261
|
-
|
|
262
|
-
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
263
|
-
|
|
264
|
-
sig do
|
|
265
|
-
override.returns(
|
|
266
|
-
T::Array[
|
|
267
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition::Value::Variants
|
|
268
|
-
]
|
|
269
|
-
)
|
|
270
|
-
end
|
|
271
|
-
def self.variants
|
|
272
|
-
end
|
|
273
|
-
end
|
|
274
|
-
end
|
|
275
|
-
|
|
276
|
-
class Level1NestedFilter < Dodopayments::Internal::Type::BaseModel
|
|
277
|
-
OrHash =
|
|
278
|
-
T.type_alias do
|
|
279
|
-
T.any(
|
|
280
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter,
|
|
281
|
-
Dodopayments::Internal::AnyHash
|
|
282
|
-
)
|
|
283
|
-
end
|
|
284
|
-
|
|
285
|
-
# Level 2: Can be conditions or nested filters (1 more level allowed)
|
|
286
|
-
sig do
|
|
287
|
-
returns(
|
|
288
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Variants
|
|
289
|
-
)
|
|
290
|
-
end
|
|
291
|
-
attr_accessor :clauses
|
|
292
|
-
|
|
293
|
-
sig { returns(Dodopayments::Conjunction::OrSymbol) }
|
|
294
|
-
attr_accessor :conjunction
|
|
295
|
-
|
|
296
|
-
# Level 2 nested filter
|
|
297
|
-
sig do
|
|
298
|
-
params(
|
|
299
|
-
clauses:
|
|
300
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Variants,
|
|
301
|
-
conjunction: Dodopayments::Conjunction::OrSymbol
|
|
302
|
-
).returns(T.attached_class)
|
|
303
|
-
end
|
|
304
|
-
def self.new(
|
|
305
|
-
# Level 2: Can be conditions or nested filters (1 more level allowed)
|
|
306
|
-
clauses:,
|
|
307
|
-
conjunction:
|
|
308
|
-
)
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
sig do
|
|
312
|
-
override.returns(
|
|
313
|
-
{
|
|
314
|
-
clauses:
|
|
315
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Variants,
|
|
316
|
-
conjunction: Dodopayments::Conjunction::OrSymbol
|
|
317
|
-
}
|
|
318
|
-
)
|
|
319
|
-
end
|
|
320
|
-
def to_hash
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
# Level 2: Can be conditions or nested filters (1 more level allowed)
|
|
324
|
-
module Clauses
|
|
325
|
-
extend Dodopayments::Internal::Type::Union
|
|
326
|
-
|
|
327
|
-
Variants =
|
|
328
|
-
T.type_alias do
|
|
329
|
-
T.any(
|
|
330
|
-
T::Array[
|
|
331
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition
|
|
332
|
-
],
|
|
333
|
-
T::Array[
|
|
334
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter
|
|
335
|
-
]
|
|
336
|
-
)
|
|
337
|
-
end
|
|
338
|
-
|
|
339
|
-
class Level2FilterCondition < Dodopayments::Internal::Type::BaseModel
|
|
340
|
-
OrHash =
|
|
341
|
-
T.type_alias do
|
|
342
|
-
T.any(
|
|
343
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition,
|
|
344
|
-
Dodopayments::Internal::AnyHash
|
|
345
|
-
)
|
|
346
|
-
end
|
|
347
|
-
|
|
348
|
-
# Filter key to apply
|
|
349
|
-
sig { returns(String) }
|
|
350
|
-
attr_accessor :key
|
|
351
|
-
|
|
352
|
-
sig { returns(Dodopayments::FilterOperator::OrSymbol) }
|
|
353
|
-
attr_accessor :operator
|
|
354
|
-
|
|
355
|
-
# Filter value - can be string, number, or boolean
|
|
356
|
-
sig do
|
|
357
|
-
returns(
|
|
358
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition::Value::Variants
|
|
359
|
-
)
|
|
360
|
-
end
|
|
361
|
-
attr_accessor :value
|
|
362
|
-
|
|
363
|
-
# Filter condition with key, operator, and value
|
|
364
|
-
sig do
|
|
365
|
-
params(
|
|
366
|
-
key: String,
|
|
367
|
-
operator: Dodopayments::FilterOperator::OrSymbol,
|
|
368
|
-
value:
|
|
369
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition::Value::Variants
|
|
370
|
-
).returns(T.attached_class)
|
|
371
|
-
end
|
|
372
|
-
def self.new(
|
|
373
|
-
# Filter key to apply
|
|
374
|
-
key:,
|
|
375
|
-
operator:,
|
|
376
|
-
# Filter value - can be string, number, or boolean
|
|
377
|
-
value:
|
|
378
|
-
)
|
|
379
|
-
end
|
|
380
|
-
|
|
381
|
-
sig do
|
|
382
|
-
override.returns(
|
|
383
|
-
{
|
|
384
|
-
key: String,
|
|
385
|
-
operator: Dodopayments::FilterOperator::OrSymbol,
|
|
386
|
-
value:
|
|
387
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition::Value::Variants
|
|
388
|
-
}
|
|
389
|
-
)
|
|
390
|
-
end
|
|
391
|
-
def to_hash
|
|
392
|
-
end
|
|
393
|
-
|
|
394
|
-
# Filter value - can be string, number, or boolean
|
|
395
|
-
module Value
|
|
396
|
-
extend Dodopayments::Internal::Type::Union
|
|
397
|
-
|
|
398
|
-
Variants = T.type_alias { T.any(String, Float, T::Boolean) }
|
|
399
|
-
|
|
400
|
-
sig do
|
|
401
|
-
override.returns(
|
|
402
|
-
T::Array[
|
|
403
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition::Value::Variants
|
|
404
|
-
]
|
|
405
|
-
)
|
|
406
|
-
end
|
|
407
|
-
def self.variants
|
|
408
|
-
end
|
|
409
|
-
end
|
|
410
|
-
end
|
|
411
|
-
|
|
412
|
-
class Level2NestedFilter < Dodopayments::Internal::Type::BaseModel
|
|
413
|
-
OrHash =
|
|
414
|
-
T.type_alias do
|
|
415
|
-
T.any(
|
|
416
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter,
|
|
417
|
-
Dodopayments::Internal::AnyHash
|
|
418
|
-
)
|
|
419
|
-
end
|
|
420
|
-
|
|
421
|
-
# Level 3: Filter conditions only (max depth reached)
|
|
422
|
-
sig do
|
|
423
|
-
returns(
|
|
424
|
-
T::Array[
|
|
425
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause
|
|
426
|
-
]
|
|
427
|
-
)
|
|
428
|
-
end
|
|
429
|
-
attr_accessor :clauses
|
|
430
|
-
|
|
431
|
-
sig { returns(Dodopayments::Conjunction::OrSymbol) }
|
|
432
|
-
attr_accessor :conjunction
|
|
433
|
-
|
|
434
|
-
# Level 3 nested filter (final nesting level)
|
|
435
|
-
sig do
|
|
436
|
-
params(
|
|
437
|
-
clauses:
|
|
438
|
-
T::Array[
|
|
439
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause::OrHash
|
|
440
|
-
],
|
|
441
|
-
conjunction: Dodopayments::Conjunction::OrSymbol
|
|
442
|
-
).returns(T.attached_class)
|
|
443
|
-
end
|
|
444
|
-
def self.new(
|
|
445
|
-
# Level 3: Filter conditions only (max depth reached)
|
|
446
|
-
clauses:,
|
|
447
|
-
conjunction:
|
|
448
|
-
)
|
|
449
|
-
end
|
|
450
|
-
|
|
451
|
-
sig do
|
|
452
|
-
override.returns(
|
|
453
|
-
{
|
|
454
|
-
clauses:
|
|
455
|
-
T::Array[
|
|
456
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause
|
|
457
|
-
],
|
|
458
|
-
conjunction: Dodopayments::Conjunction::OrSymbol
|
|
459
|
-
}
|
|
460
|
-
)
|
|
461
|
-
end
|
|
462
|
-
def to_hash
|
|
463
|
-
end
|
|
464
|
-
|
|
465
|
-
class Clause < Dodopayments::Internal::Type::BaseModel
|
|
466
|
-
OrHash =
|
|
467
|
-
T.type_alias do
|
|
468
|
-
T.any(
|
|
469
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause,
|
|
470
|
-
Dodopayments::Internal::AnyHash
|
|
471
|
-
)
|
|
472
|
-
end
|
|
473
|
-
|
|
474
|
-
# Filter key to apply
|
|
475
|
-
sig { returns(String) }
|
|
476
|
-
attr_accessor :key
|
|
477
|
-
|
|
478
|
-
sig { returns(Dodopayments::FilterOperator::OrSymbol) }
|
|
479
|
-
attr_accessor :operator
|
|
480
|
-
|
|
481
|
-
# Filter value - can be string, number, or boolean
|
|
482
|
-
sig do
|
|
483
|
-
returns(
|
|
484
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause::Value::Variants
|
|
485
|
-
)
|
|
486
|
-
end
|
|
487
|
-
attr_accessor :value
|
|
488
|
-
|
|
489
|
-
# Filter condition with key, operator, and value
|
|
490
|
-
sig do
|
|
491
|
-
params(
|
|
492
|
-
key: String,
|
|
493
|
-
operator: Dodopayments::FilterOperator::OrSymbol,
|
|
494
|
-
value:
|
|
495
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause::Value::Variants
|
|
496
|
-
).returns(T.attached_class)
|
|
497
|
-
end
|
|
498
|
-
def self.new(
|
|
499
|
-
# Filter key to apply
|
|
500
|
-
key:,
|
|
501
|
-
operator:,
|
|
502
|
-
# Filter value - can be string, number, or boolean
|
|
503
|
-
value:
|
|
504
|
-
)
|
|
505
|
-
end
|
|
506
|
-
|
|
507
|
-
sig do
|
|
508
|
-
override.returns(
|
|
509
|
-
{
|
|
510
|
-
key: String,
|
|
511
|
-
operator: Dodopayments::FilterOperator::OrSymbol,
|
|
512
|
-
value:
|
|
513
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause::Value::Variants
|
|
514
|
-
}
|
|
515
|
-
)
|
|
516
|
-
end
|
|
517
|
-
def to_hash
|
|
518
|
-
end
|
|
519
|
-
|
|
520
|
-
# Filter value - can be string, number, or boolean
|
|
521
|
-
module Value
|
|
522
|
-
extend Dodopayments::Internal::Type::Union
|
|
523
|
-
|
|
524
|
-
Variants =
|
|
525
|
-
T.type_alias { T.any(String, Float, T::Boolean) }
|
|
526
|
-
|
|
527
|
-
sig do
|
|
528
|
-
override.returns(
|
|
529
|
-
T::Array[
|
|
530
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter::Clause::Value::Variants
|
|
531
|
-
]
|
|
532
|
-
)
|
|
533
|
-
end
|
|
534
|
-
def self.variants
|
|
535
|
-
end
|
|
536
|
-
end
|
|
537
|
-
end
|
|
538
|
-
end
|
|
539
|
-
|
|
540
|
-
sig do
|
|
541
|
-
override.returns(
|
|
542
|
-
T::Array[
|
|
543
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Variants
|
|
544
|
-
]
|
|
545
|
-
)
|
|
546
|
-
end
|
|
547
|
-
def self.variants
|
|
548
|
-
end
|
|
549
|
-
|
|
550
|
-
Level2FilterConditionArray =
|
|
551
|
-
T.let(
|
|
552
|
-
Dodopayments::Internal::Type::ArrayOf[
|
|
553
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2FilterCondition
|
|
554
|
-
],
|
|
555
|
-
Dodopayments::Internal::Type::Converter
|
|
556
|
-
)
|
|
557
|
-
|
|
558
|
-
Level2NestedFilterArray =
|
|
559
|
-
T.let(
|
|
560
|
-
Dodopayments::Internal::Type::ArrayOf[
|
|
561
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter::Clauses::Level2NestedFilter
|
|
562
|
-
],
|
|
563
|
-
Dodopayments::Internal::Type::Converter
|
|
564
|
-
)
|
|
565
|
-
end
|
|
566
|
-
end
|
|
567
|
-
|
|
568
|
-
sig do
|
|
569
|
-
override.returns(
|
|
570
|
-
T::Array[
|
|
571
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Variants
|
|
572
|
-
]
|
|
573
|
-
)
|
|
574
|
-
end
|
|
575
|
-
def self.variants
|
|
576
|
-
end
|
|
577
|
-
|
|
578
|
-
Level1FilterConditionArray =
|
|
579
|
-
T.let(
|
|
580
|
-
Dodopayments::Internal::Type::ArrayOf[
|
|
581
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1FilterCondition
|
|
582
|
-
],
|
|
583
|
-
Dodopayments::Internal::Type::Converter
|
|
584
|
-
)
|
|
585
|
-
|
|
586
|
-
Level1NestedFilterArray =
|
|
587
|
-
T.let(
|
|
588
|
-
Dodopayments::Internal::Type::ArrayOf[
|
|
589
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter::Clauses::Level1NestedFilter
|
|
590
|
-
],
|
|
591
|
-
Dodopayments::Internal::Type::Converter
|
|
592
|
-
)
|
|
593
|
-
end
|
|
594
|
-
end
|
|
595
|
-
|
|
596
|
-
sig do
|
|
597
|
-
override.returns(
|
|
598
|
-
T::Array[Dodopayments::MeterFilter::Clauses::Variants]
|
|
599
|
-
)
|
|
600
|
-
end
|
|
601
|
-
def self.variants
|
|
602
|
-
end
|
|
603
|
-
|
|
604
|
-
DirectFilterConditionArray =
|
|
605
|
-
T.let(
|
|
606
|
-
Dodopayments::Internal::Type::ArrayOf[
|
|
607
|
-
Dodopayments::MeterFilter::Clauses::DirectFilterCondition
|
|
608
|
-
],
|
|
609
|
-
Dodopayments::Internal::Type::Converter
|
|
610
|
-
)
|
|
611
|
-
|
|
612
|
-
NestedMeterFilterArray =
|
|
613
|
-
T.let(
|
|
614
|
-
Dodopayments::Internal::Type::ArrayOf[
|
|
615
|
-
Dodopayments::MeterFilter::Clauses::NestedMeterFilter
|
|
616
|
-
],
|
|
617
|
-
Dodopayments::Internal::Type::Converter
|
|
618
|
-
)
|
|
619
|
-
end
|
|
620
51
|
end
|
|
621
52
|
end
|
|
622
53
|
end
|