modern_treasury 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 581026f5fdefb4ecafbb971dc320b00c833ee17b7e6467437e46e964ec67134d
4
- data.tar.gz: 4eab42899864540e6ca98a5c5687c3c330da0d45e34bfe463f072aa6035e972e
3
+ metadata.gz: f34834b2ab5aafa8c705c8872538ab059bb10c7d38a8be64e831c90091088f11
4
+ data.tar.gz: d7e9f043847286c27b6f9be87907c70ce63581e2780505d23d65032d728e7018
5
5
  SHA512:
6
- metadata.gz: fb4beec913eefc5ee728d8a5cddbc0edd53cc35d928cd4b386cf65a0d3571eff2341d8b6087503c148d45ef3d6ed6b472ecd4fdd8dca3ae04730621496940139
7
- data.tar.gz: 61dc97956b212b16371044a170acde7ec5433e83fff2d2952ca8a339e27952bce8685853059dfbffc1b64ce7e00a20bf4f25ada55e40efc12f45e4bdc2c5e7f8
6
+ metadata.gz: 31e4e8cd73f81d960ccf10f478de7b93527e59406881420fd77016a6a3cff05bb36872a21e3b2d953404de9d351067995983042217e9833dad9fbfe41a02cefd
7
+ data.tar.gz: 740b8fc06fed12d76551c608e5990057698465295e0c4dfd5f19d1969aa46520c63ef3d4bcd8aee332a77b7bdbc813a94f5724338d0c6d21dff04739c9389de7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.0 (2025-08-11)
4
+
5
+ Full Changelog: [v0.1.0...v0.2.0](https://github.com/Modern-Treasury/modern-treasury-ruby/compare/v0.1.0...v0.2.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([9a09dee](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/9a09deeb1763c088711a64846f2fee443af808f1))
10
+ * **api:** api update ([17800f0](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/17800f09cd4eebd8470ef05905750db6dd7774f1))
11
+
12
+
13
+ ### Chores
14
+
15
+ * collect metadata from type DSL ([adcbf72](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/adcbf723cee88f404d90dbcb3224477ff3a51fdb))
16
+ * **internal:** update comment in script ([c6df294](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/c6df2947b3350923c86f8a1db5e8f007bef4700b))
17
+ * update @stainless-api/prism-cli to v5.15.0 ([88b3e17](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/88b3e17a56ff0b5b0a699cdbec364f43d7fd0e7b))
18
+
3
19
  ## 0.1.0 (2025-08-02)
4
20
 
5
21
  Full Changelog: [v0.1.0-alpha.22...v0.1.0](https://github.com/Modern-Treasury/modern-treasury-ruby/compare/v0.1.0-alpha.22...v0.1.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "modern_treasury", "~> 0.1.0"
18
+ gem "modern_treasury", "~> 0.2.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -148,6 +148,7 @@ module ModernTreasury
148
148
  # @option spec [Boolean] :"nil?"
149
149
  def initialize(type_info, spec = {})
150
150
  @item_type_fn = ModernTreasury::Internal::Type::Converter.type_info(type_info || spec)
151
+ @meta = ModernTreasury::Internal::Type::Converter.meta_info(type_info, spec)
151
152
  @nilable = spec.fetch(:nil?, false)
152
153
  end
153
154
 
@@ -52,6 +52,7 @@ module ModernTreasury
52
52
  #
53
53
  # @option spec [Boolean] :"nil?"
54
54
  private def add_field(name_sym, required:, type_info:, spec:)
55
+ meta = ModernTreasury::Internal::Type::Converter.meta_info(type_info, spec)
55
56
  type_fn, info =
56
57
  case type_info
57
58
  in Proc | ModernTreasury::Internal::Type::Converter | Class
@@ -81,7 +82,8 @@ module ModernTreasury
81
82
  required: required,
82
83
  nilable: nilable,
83
84
  const: const,
84
- type_fn: type_fn
85
+ type_fn: type_fn,
86
+ meta: meta
85
87
  }
86
88
 
87
89
  define_method(setter) do |value|
@@ -98,6 +98,33 @@ module ModernTreasury
98
98
  end
99
99
  end
100
100
 
101
+ # @api private
102
+ #
103
+ # @param type_info [Hash{Symbol=>Object}, Proc, ModernTreasury::Internal::Type::Converter, Class] .
104
+ #
105
+ # @option type_info [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
106
+ #
107
+ # @option type_info [Proc] :enum
108
+ #
109
+ # @option type_info [Proc] :union
110
+ #
111
+ # @option type_info [Boolean] :"nil?"
112
+ #
113
+ # @param spec [Hash{Symbol=>Object}, Proc, ModernTreasury::Internal::Type::Converter, Class] .
114
+ #
115
+ # @option spec [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
116
+ #
117
+ # @option spec [Proc] :enum
118
+ #
119
+ # @option spec [Proc] :union
120
+ #
121
+ # @option spec [Boolean] :"nil?"
122
+ #
123
+ # @return [Hash{Symbol=>Object}]
124
+ def meta_info(type_info, spec)
125
+ [spec, type_info].grep(Hash).first.to_h.except(:const, :enum, :union, :nil?)
126
+ end
127
+
101
128
  # @api private
102
129
  #
103
130
  # @param translate_names [Boolean]
@@ -168,6 +168,7 @@ module ModernTreasury
168
168
  # @option spec [Boolean] :"nil?"
169
169
  def initialize(type_info, spec = {})
170
170
  @item_type_fn = ModernTreasury::Internal::Type::Converter.type_info(type_info || spec)
171
+ @meta = ModernTreasury::Internal::Type::Converter.meta_info(type_info, spec)
171
172
  @nilable = spec.fetch(:nil?, false)
172
173
  end
173
174
 
@@ -23,20 +23,20 @@ module ModernTreasury
23
23
  #
24
24
  # All of the specified variant info for this union.
25
25
  #
26
- # @return [Array<Array(Symbol, Proc)>]
26
+ # @return [Array<Array(Symbol, Proc, Hash{Symbol=>Object})>]
27
27
  private def known_variants = (@known_variants ||= [])
28
28
 
29
29
  # @api private
30
30
  #
31
- # @return [Array<Array(Symbol, Object)>]
31
+ # @return [Array<Array(Symbol, Object, Hash{Symbol=>Object})>]
32
32
  protected def derefed_variants
33
- known_variants.map { |key, variant_fn| [key, variant_fn.call] }
33
+ known_variants.map { |key, variant_fn, meta| [key, variant_fn.call, meta] }
34
34
  end
35
35
 
36
36
  # All of the specified variants for this union.
37
37
  #
38
38
  # @return [Array<Object>]
39
- def variants = derefed_variants.map(&:last)
39
+ def variants = derefed_variants.map { _2 }
40
40
 
41
41
  # @api private
42
42
  #
@@ -62,12 +62,13 @@ module ModernTreasury
62
62
  #
63
63
  # @option spec [Boolean] :"nil?"
64
64
  private def variant(key, spec = nil)
65
+ meta = ModernTreasury::Internal::Type::Converter.meta_info(nil, spec)
65
66
  variant_info =
66
67
  case key
67
68
  in Symbol
68
- [key, ModernTreasury::Internal::Type::Converter.type_info(spec)]
69
+ [key, ModernTreasury::Internal::Type::Converter.type_info(spec), meta]
69
70
  in Proc | ModernTreasury::Internal::Type::Converter | Class | Hash
70
- [nil, ModernTreasury::Internal::Type::Converter.type_info(key)]
71
+ [nil, ModernTreasury::Internal::Type::Converter.type_info(key), meta]
71
72
  end
72
73
 
73
74
  known_variants << variant_info
@@ -90,7 +91,8 @@ module ModernTreasury
90
91
  return nil if key == ModernTreasury::Internal::OMIT
91
92
 
92
93
  key = key.to_sym if key.is_a?(String)
93
- known_variants.find { |k,| k == key }&.last&.call
94
+ _, found = known_variants.find { |k,| k == key }
95
+ found&.call
94
96
  else
95
97
  nil
96
98
  end
@@ -131,8 +131,11 @@ module ModernTreasury
131
131
  # `posted`, or `archived`. For multiple statuses, use
132
132
  # `status[]=pending&status[]=posted`.
133
133
  #
134
- # @return [Symbol, Array<Symbol, ModernTreasury::Models::LedgerEntryListParams::Status::UnionMember1>, ModernTreasury::Models::LedgerEntryListParams::Status, nil]
135
- optional :status, union: -> { ModernTreasury::LedgerEntryListParams::Status }
134
+ # @return [Array<Symbol, ModernTreasury::Models::LedgerEntryListParams::Status>, nil]
135
+ optional :status,
136
+ -> {
137
+ ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::LedgerEntryListParams::Status]
138
+ }
136
139
 
137
140
  # @!attribute updated_at
138
141
  # Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the
@@ -182,7 +185,7 @@ module ModernTreasury
182
185
  #
183
186
  # @param show_deleted [Boolean] If true, response will include ledger entries that were deleted. When you update
184
187
  #
185
- # @param status [Symbol, Array<Symbol, ModernTreasury::Models::LedgerEntryListParams::Status::UnionMember1>, ModernTreasury::Models::LedgerEntryListParams::Status] Get all ledger entries that match the status specified. One of `pending`, `poste
188
+ # @param status [Array<Symbol, ModernTreasury::Models::LedgerEntryListParams::Status>] Get all ledger entries that match the status specified. One of `pending`, `poste
186
189
  #
187
190
  # @param updated_at [Hash{Symbol=>Time}] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the pos
188
191
  #
@@ -230,56 +233,15 @@ module ModernTreasury
230
233
  end
231
234
  end
232
235
 
233
- # Get all ledger entries that match the status specified. One of `pending`,
234
- # `posted`, or `archived`. For multiple statuses, use
235
- # `status[]=pending&status[]=posted`.
236
236
  module Status
237
- extend ModernTreasury::Internal::Type::Union
238
-
239
- variant const: -> { ModernTreasury::Models::LedgerEntryListParams::Status::PENDING }
240
-
241
- variant const: -> { ModernTreasury::Models::LedgerEntryListParams::Status::POSTED }
242
-
243
- variant const: -> { ModernTreasury::Models::LedgerEntryListParams::Status::ARCHIVED }
244
-
245
- variant -> { ModernTreasury::Models::LedgerEntryListParams::Status::UnionMember1Array }
246
-
247
- module UnionMember1
248
- extend ModernTreasury::Internal::Type::Enum
249
-
250
- PENDING = :pending
251
- POSTED = :posted
252
- ARCHIVED = :archived
253
-
254
- # @!method self.values
255
- # @return [Array<Symbol>]
256
- end
257
-
258
- # @!method self.variants
259
- # @return [Array(Symbol, Array<Symbol, ModernTreasury::Models::LedgerEntryListParams::Status::UnionMember1>)]
260
-
261
- define_sorbet_constant!(:Variants) do
262
- T.type_alias do
263
- T.any(
264
- ModernTreasury::LedgerEntryListParams::Status::TaggedSymbol,
265
- T::Array[ModernTreasury::LedgerEntryListParams::Status::UnionMember1::TaggedSymbol]
266
- )
267
- end
268
- end
269
-
270
- # @!group
237
+ extend ModernTreasury::Internal::Type::Enum
271
238
 
272
239
  PENDING = :pending
273
240
  POSTED = :posted
274
241
  ARCHIVED = :archived
275
242
 
276
- # @!endgroup
277
-
278
- # @type [ModernTreasury::Internal::Type::Converter]
279
- UnionMember1Array =
280
- ModernTreasury::Internal::Type::ArrayOf[enum: -> {
281
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1
282
- }]
243
+ # @!method self.values
244
+ # @return [Array<Symbol>]
283
245
  end
284
246
  end
285
247
  end
@@ -147,6 +147,7 @@ module ModernTreasury
147
147
  extend ModernTreasury::Internal::Type::Enum
148
148
 
149
149
  EVOLVE_NON_PROCESSING_TRANSACTION = :evolve_non_processing_transaction
150
+ CONTROL_FILE = :control_file
150
151
  STOP = :stop
151
152
  ISSUE = :issue
152
153
 
@@ -60,9 +60,8 @@ module ModernTreasury
60
60
 
61
61
  # @!attribute transaction_ids
62
62
  #
63
- # @return [Array<Object, nil>]
64
- required :transaction_ids,
65
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::Internal::Type::Unknown, nil?: true]
63
+ # @return [Array<String, nil>]
64
+ required :transaction_ids, ModernTreasury::Internal::Type::ArrayOf[String, nil?: true]
66
65
 
67
66
  # @!attribute updated_at
68
67
  #
@@ -91,7 +90,7 @@ module ModernTreasury
91
90
  #
92
91
  # @param status [Symbol, ModernTreasury::Models::PaymentOrders::Reversal::Status] The current status of the reversal.
93
92
  #
94
- # @param transaction_ids [Array<Object, nil>]
93
+ # @param transaction_ids [Array<String, nil>]
95
94
  #
96
95
  # @param updated_at [Time]
97
96
 
@@ -100,7 +100,7 @@ module ModernTreasury
100
100
  #
101
101
  # @param show_deleted [Boolean] If true, response will include ledger entries that were deleted. When you update
102
102
  #
103
- # @param status [Symbol, Array<Symbol, ModernTreasury::Models::LedgerEntryListParams::Status::UnionMember1>, ModernTreasury::Models::LedgerEntryListParams::Status] Get all ledger entries that match the status specified. One of `pending`, `poste
103
+ # @param status [Array<Symbol, ModernTreasury::Models::LedgerEntryListParams::Status>] Get all ledger entries that match the status specified. One of `pending`, `poste
104
104
  #
105
105
  # @param updated_at [Hash{Symbol=>Time}] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the pos
106
106
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ModernTreasury
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -95,6 +95,64 @@ module ModernTreasury
95
95
  def self.type_info(spec)
96
96
  end
97
97
 
98
+ # @api private
99
+ sig do
100
+ params(
101
+ type_info:
102
+ T.any(
103
+ {
104
+ const:
105
+ T.nilable(
106
+ T.any(NilClass, T::Boolean, Integer, Float, Symbol)
107
+ ),
108
+ enum:
109
+ T.nilable(
110
+ T.proc.returns(
111
+ ModernTreasury::Internal::Type::Converter::Input
112
+ )
113
+ ),
114
+ union:
115
+ T.nilable(
116
+ T.proc.returns(
117
+ ModernTreasury::Internal::Type::Converter::Input
118
+ )
119
+ )
120
+ },
121
+ T.proc.returns(
122
+ ModernTreasury::Internal::Type::Converter::Input
123
+ ),
124
+ ModernTreasury::Internal::Type::Converter::Input
125
+ ),
126
+ spec:
127
+ T.any(
128
+ {
129
+ const:
130
+ T.nilable(
131
+ T.any(NilClass, T::Boolean, Integer, Float, Symbol)
132
+ ),
133
+ enum:
134
+ T.nilable(
135
+ T.proc.returns(
136
+ ModernTreasury::Internal::Type::Converter::Input
137
+ )
138
+ ),
139
+ union:
140
+ T.nilable(
141
+ T.proc.returns(
142
+ ModernTreasury::Internal::Type::Converter::Input
143
+ )
144
+ )
145
+ },
146
+ T.proc.returns(
147
+ ModernTreasury::Internal::Type::Converter::Input
148
+ ),
149
+ ModernTreasury::Internal::Type::Converter::Input
150
+ )
151
+ ).returns(ModernTreasury::Internal::AnyHash)
152
+ end
153
+ def self.meta_info(type_info, spec)
154
+ end
155
+
98
156
  # @api private
99
157
  sig do
100
158
  params(translate_names: T::Boolean).returns(
@@ -16,7 +16,10 @@ module ModernTreasury
16
16
  T::Array[
17
17
  [
18
18
  T.nilable(Symbol),
19
- T.proc.returns(ModernTreasury::Internal::Type::Converter::Input)
19
+ T.proc.returns(
20
+ ModernTreasury::Internal::Type::Converter::Input
21
+ ),
22
+ ModernTreasury::Internal::AnyHash
20
23
  ]
21
24
  ]
22
25
  )
@@ -25,7 +28,13 @@ module ModernTreasury
25
28
  end
26
29
 
27
30
  # @api private
28
- sig { returns(T::Array[[T.nilable(Symbol), T.anything]]) }
31
+ sig do
32
+ returns(
33
+ T::Array[
34
+ [T.nilable(Symbol), T.anything, ModernTreasury::Internal::AnyHash]
35
+ ]
36
+ )
37
+ end
29
38
  protected def derefed_variants
30
39
  end
31
40
 
@@ -160,12 +160,7 @@ module ModernTreasury
160
160
  sig do
161
161
  returns(
162
162
  T.nilable(
163
- T.any(
164
- ModernTreasury::LedgerEntryListParams::Status::OrSymbol,
165
- T::Array[
166
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::OrSymbol
167
- ]
168
- )
163
+ T::Array[ModernTreasury::LedgerEntryListParams::Status::OrSymbol]
169
164
  )
170
165
  )
171
166
  end
@@ -174,12 +169,7 @@ module ModernTreasury
174
169
  sig do
175
170
  params(
176
171
  status:
177
- T.any(
178
- ModernTreasury::LedgerEntryListParams::Status::OrSymbol,
179
- T::Array[
180
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::OrSymbol
181
- ]
182
- )
172
+ T::Array[ModernTreasury::LedgerEntryListParams::Status::OrSymbol]
183
173
  ).void
184
174
  end
185
175
  attr_writer :status
@@ -214,12 +204,7 @@ module ModernTreasury
214
204
  show_balances: T::Boolean,
215
205
  show_deleted: T::Boolean,
216
206
  status:
217
- T.any(
218
- ModernTreasury::LedgerEntryListParams::Status::OrSymbol,
219
- T::Array[
220
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::OrSymbol
221
- ]
222
- ),
207
+ T::Array[ModernTreasury::LedgerEntryListParams::Status::OrSymbol],
223
208
  updated_at: T::Hash[Symbol, Time],
224
209
  request_options: ModernTreasury::RequestOptions::OrHash
225
210
  ).returns(T.attached_class)
@@ -306,12 +291,7 @@ module ModernTreasury
306
291
  show_balances: T::Boolean,
307
292
  show_deleted: T::Boolean,
308
293
  status:
309
- T.any(
310
- ModernTreasury::LedgerEntryListParams::Status::OrSymbol,
311
- T::Array[
312
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::OrSymbol
313
- ]
314
- ),
294
+ T::Array[ModernTreasury::LedgerEntryListParams::Status::OrSymbol],
315
295
  updated_at: T::Hash[Symbol, Time],
316
296
  request_options: ModernTreasury::RequestOptions
317
297
  }
@@ -459,68 +439,8 @@ module ModernTreasury
459
439
  end
460
440
  end
461
441
 
462
- # Get all ledger entries that match the status specified. One of `pending`,
463
- # `posted`, or `archived`. For multiple statuses, use
464
- # `status[]=pending&status[]=posted`.
465
442
  module Status
466
- extend ModernTreasury::Internal::Type::Union
467
-
468
- Variants =
469
- T.type_alias do
470
- T.any(
471
- ModernTreasury::LedgerEntryListParams::Status::TaggedSymbol,
472
- T::Array[
473
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::TaggedSymbol
474
- ]
475
- )
476
- end
477
-
478
- module UnionMember1
479
- extend ModernTreasury::Internal::Type::Enum
480
-
481
- TaggedSymbol =
482
- T.type_alias do
483
- T.all(
484
- Symbol,
485
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1
486
- )
487
- end
488
- OrSymbol = T.type_alias { T.any(Symbol, String) }
489
-
490
- PENDING =
491
- T.let(
492
- :pending,
493
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::TaggedSymbol
494
- )
495
- POSTED =
496
- T.let(
497
- :posted,
498
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::TaggedSymbol
499
- )
500
- ARCHIVED =
501
- T.let(
502
- :archived,
503
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::TaggedSymbol
504
- )
505
-
506
- sig do
507
- override.returns(
508
- T::Array[
509
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::TaggedSymbol
510
- ]
511
- )
512
- end
513
- def self.values
514
- end
515
- end
516
-
517
- sig do
518
- override.returns(
519
- T::Array[ModernTreasury::LedgerEntryListParams::Status::Variants]
520
- )
521
- end
522
- def self.variants
523
- end
443
+ extend ModernTreasury::Internal::Type::Enum
524
444
 
525
445
  TaggedSymbol =
526
446
  T.type_alias do
@@ -544,13 +464,15 @@ module ModernTreasury
544
464
  ModernTreasury::LedgerEntryListParams::Status::TaggedSymbol
545
465
  )
546
466
 
547
- UnionMember1Array =
548
- T.let(
549
- ModernTreasury::Internal::Type::ArrayOf[
550
- enum: ModernTreasury::LedgerEntryListParams::Status::UnionMember1
551
- ],
552
- ModernTreasury::Internal::Type::Converter
467
+ sig do
468
+ override.returns(
469
+ T::Array[
470
+ ModernTreasury::LedgerEntryListParams::Status::TaggedSymbol
471
+ ]
553
472
  )
473
+ end
474
+ def self.values
475
+ end
554
476
  end
555
477
  end
556
478
  end
@@ -285,6 +285,11 @@ module ModernTreasury
285
285
  :evolve_non_processing_transaction,
286
286
  ModernTreasury::PaymentActionListParams::Type::TaggedSymbol
287
287
  )
288
+ CONTROL_FILE =
289
+ T.let(
290
+ :control_file,
291
+ ModernTreasury::PaymentActionListParams::Type::TaggedSymbol
292
+ )
288
293
  STOP =
289
294
  T.let(
290
295
  :stop,
@@ -51,7 +51,7 @@ module ModernTreasury
51
51
  end
52
52
  attr_accessor :status
53
53
 
54
- sig { returns(T::Array[T.nilable(T.anything)]) }
54
+ sig { returns(T::Array[T.nilable(String)]) }
55
55
  attr_accessor :transaction_ids
56
56
 
57
57
  sig { returns(Time) }
@@ -68,7 +68,7 @@ module ModernTreasury
68
68
  payment_order_id: T.nilable(String),
69
69
  reason: ModernTreasury::PaymentOrders::Reversal::Reason::OrSymbol,
70
70
  status: ModernTreasury::PaymentOrders::Reversal::Status::OrSymbol,
71
- transaction_ids: T::Array[T.nilable(T.anything)],
71
+ transaction_ids: T::Array[T.nilable(String)],
72
72
  updated_at: Time
73
73
  ).returns(T.attached_class)
74
74
  end
@@ -109,7 +109,7 @@ module ModernTreasury
109
109
  ModernTreasury::PaymentOrders::Reversal::Reason::TaggedSymbol,
110
110
  status:
111
111
  ModernTreasury::PaymentOrders::Reversal::Status::TaggedSymbol,
112
- transaction_ids: T::Array[T.nilable(T.anything)],
112
+ transaction_ids: T::Array[T.nilable(String)],
113
113
  updated_at: Time
114
114
  }
115
115
  )
@@ -61,12 +61,7 @@ module ModernTreasury
61
61
  show_balances: T::Boolean,
62
62
  show_deleted: T::Boolean,
63
63
  status:
64
- T.any(
65
- ModernTreasury::LedgerEntryListParams::Status::OrSymbol,
66
- T::Array[
67
- ModernTreasury::LedgerEntryListParams::Status::UnionMember1::OrSymbol
68
- ]
69
- ),
64
+ T::Array[ModernTreasury::LedgerEntryListParams::Status::OrSymbol],
70
65
  updated_at: T::Hash[Symbol, Time],
71
66
  request_options: ModernTreasury::RequestOptions::OrHash
72
67
  ).returns(ModernTreasury::Internal::Page[ModernTreasury::LedgerEntry])
@@ -39,6 +39,23 @@ module ModernTreasury
39
39
  | ModernTreasury::Internal::Type::Converter::input spec
40
40
  ) -> (^-> top)
41
41
 
42
+ def self.meta_info: (
43
+ {
44
+ const: (nil | bool | Integer | Float | Symbol)?,
45
+ enum: ^-> ModernTreasury::Internal::Type::Converter::input?,
46
+ union: ^-> ModernTreasury::Internal::Type::Converter::input?
47
+ }
48
+ | ^-> ModernTreasury::Internal::Type::Converter::input
49
+ | ModernTreasury::Internal::Type::Converter::input type_info,
50
+ {
51
+ const: (nil | bool | Integer | Float | Symbol)?,
52
+ enum: ^-> ModernTreasury::Internal::Type::Converter::input?,
53
+ union: ^-> ModernTreasury::Internal::Type::Converter::input?
54
+ }
55
+ | ^-> ModernTreasury::Internal::Type::Converter::input
56
+ | ModernTreasury::Internal::Type::Converter::input spec
57
+ ) -> ::Hash[Symbol, top]
58
+
42
59
  def self.new_coerce_state: (
43
60
  ?translate_names: bool
44
61
  ) -> ModernTreasury::Internal::Type::Converter::coerce_state
@@ -5,9 +5,9 @@ module ModernTreasury
5
5
  include ModernTreasury::Internal::Type::Converter
6
6
  include ModernTreasury::Internal::Util::SorbetRuntimeSupport
7
7
 
8
- private def self.known_variants: -> ::Array[[Symbol?, (^-> ModernTreasury::Internal::Type::Converter::input)]]
8
+ private def self.known_variants: -> ::Array[[Symbol?, (^-> ModernTreasury::Internal::Type::Converter::input), ::Hash[Symbol, top]]]
9
9
 
10
- def self.derefed_variants: -> ::Array[[Symbol?, top]]
10
+ def self.derefed_variants: -> ::Array[[Symbol?, top, ::Hash[Symbol, top]]]
11
11
 
12
12
  def self.variants: -> ::Array[top]
13
13
 
@@ -20,7 +20,7 @@ module ModernTreasury
20
20
  per_page: Integer,
21
21
  show_balances: bool,
22
22
  show_deleted: bool,
23
- status: ModernTreasury::Models::LedgerEntryListParams::status,
23
+ status: ::Array[ModernTreasury::Models::LedgerEntryListParams::status],
24
24
  updated_at: ::Hash[Symbol, Time]
25
25
  }
26
26
  & ModernTreasury::Internal::Type::request_parameters
@@ -105,11 +105,11 @@ module ModernTreasury
105
105
 
106
106
  def show_deleted=: (bool) -> bool
107
107
 
108
- attr_reader status: ModernTreasury::Models::LedgerEntryListParams::status?
108
+ attr_reader status: ::Array[ModernTreasury::Models::LedgerEntryListParams::status]?
109
109
 
110
110
  def status=: (
111
- ModernTreasury::Models::LedgerEntryListParams::status
112
- ) -> ModernTreasury::Models::LedgerEntryListParams::status
111
+ ::Array[ModernTreasury::Models::LedgerEntryListParams::status]
112
+ ) -> ::Array[ModernTreasury::Models::LedgerEntryListParams::status]
113
113
 
114
114
  attr_reader updated_at: ::Hash[Symbol, Time]?
115
115
 
@@ -134,7 +134,7 @@ module ModernTreasury
134
134
  ?per_page: Integer,
135
135
  ?show_balances: bool,
136
136
  ?show_deleted: bool,
137
- ?status: ModernTreasury::Models::LedgerEntryListParams::status,
137
+ ?status: ::Array[ModernTreasury::Models::LedgerEntryListParams::status],
138
138
  ?updated_at: ::Hash[Symbol, Time],
139
139
  ?request_options: ModernTreasury::request_opts
140
140
  ) -> void
@@ -158,7 +158,7 @@ module ModernTreasury
158
158
  per_page: Integer,
159
159
  show_balances: bool,
160
160
  show_deleted: bool,
161
- status: ModernTreasury::Models::LedgerEntryListParams::status,
161
+ status: ::Array[ModernTreasury::Models::LedgerEntryListParams::status],
162
162
  updated_at: ::Hash[Symbol, Time],
163
163
  request_options: ModernTreasury::RequestOptions
164
164
  }
@@ -215,34 +215,16 @@ module ModernTreasury
215
215
  end
216
216
  end
217
217
 
218
- type status =
219
- :pending
220
- | :posted
221
- | :archived
222
- | ::Array[ModernTreasury::Models::LedgerEntryListParams::Status::union_member1]
218
+ type status = :pending | :posted | :archived
223
219
 
224
220
  module Status
225
- extend ModernTreasury::Internal::Type::Union
226
-
227
- type union_member1 = :pending | :posted | :archived
228
-
229
- module UnionMember1
230
- extend ModernTreasury::Internal::Type::Enum
231
-
232
- PENDING: :pending
233
- POSTED: :posted
234
- ARCHIVED: :archived
235
-
236
- def self?.values: -> ::Array[ModernTreasury::Models::LedgerEntryListParams::Status::union_member1]
237
- end
238
-
239
- def self?.variants: -> ::Array[ModernTreasury::Models::LedgerEntryListParams::status]
221
+ extend ModernTreasury::Internal::Type::Enum
240
222
 
241
223
  PENDING: :pending
242
224
  POSTED: :posted
243
225
  ARCHIVED: :archived
244
226
 
245
- UnionMember1Array: ModernTreasury::Internal::Type::Converter
227
+ def self?.values: -> ::Array[ModernTreasury::Models::LedgerEntryListParams::status]
246
228
  end
247
229
  end
248
230
  end
@@ -134,12 +134,14 @@ module ModernTreasury
134
134
  def self?.values: -> ::Array[ModernTreasury::Models::PaymentActionListParams::status]
135
135
  end
136
136
 
137
- type type_ = :evolve_non_processing_transaction | :stop | :issue
137
+ type type_ =
138
+ :evolve_non_processing_transaction | :control_file | :stop | :issue
138
139
 
139
140
  module Type
140
141
  extend ModernTreasury::Internal::Type::Enum
141
142
 
142
143
  EVOLVE_NON_PROCESSING_TRANSACTION: :evolve_non_processing_transaction
144
+ CONTROL_FILE: :control_file
143
145
  STOP: :stop
144
146
  ISSUE: :issue
145
147
 
@@ -12,7 +12,7 @@ module ModernTreasury
12
12
  payment_order_id: String?,
13
13
  reason: ModernTreasury::Models::PaymentOrders::Reversal::reason,
14
14
  status: ModernTreasury::Models::PaymentOrders::Reversal::status,
15
- transaction_ids: ::Array[top?],
15
+ transaction_ids: ::Array[String?],
16
16
  updated_at: Time
17
17
  }
18
18
 
@@ -35,7 +35,7 @@ module ModernTreasury
35
35
 
36
36
  attr_accessor status: ModernTreasury::Models::PaymentOrders::Reversal::status
37
37
 
38
- attr_accessor transaction_ids: ::Array[top?]
38
+ attr_accessor transaction_ids: ::Array[String?]
39
39
 
40
40
  attr_accessor updated_at: Time
41
41
 
@@ -49,7 +49,7 @@ module ModernTreasury
49
49
  payment_order_id: String?,
50
50
  reason: ModernTreasury::Models::PaymentOrders::Reversal::reason,
51
51
  status: ModernTreasury::Models::PaymentOrders::Reversal::status,
52
- transaction_ids: ::Array[top?],
52
+ transaction_ids: ::Array[String?],
53
53
  updated_at: Time
54
54
  ) -> void
55
55
 
@@ -63,7 +63,7 @@ module ModernTreasury
63
63
  payment_order_id: String?,
64
64
  reason: ModernTreasury::Models::PaymentOrders::Reversal::reason,
65
65
  status: ModernTreasury::Models::PaymentOrders::Reversal::status,
66
- transaction_ids: ::Array[top?],
66
+ transaction_ids: ::Array[String?],
67
67
  updated_at: Time
68
68
  }
69
69
 
@@ -32,7 +32,7 @@ module ModernTreasury
32
32
  ?per_page: Integer,
33
33
  ?show_balances: bool,
34
34
  ?show_deleted: bool,
35
- ?status: ModernTreasury::Models::LedgerEntryListParams::status,
35
+ ?status: ::Array[ModernTreasury::Models::LedgerEntryListParams::status],
36
36
  ?updated_at: ::Hash[Symbol, Time],
37
37
  ?request_options: ModernTreasury::request_opts
38
38
  ) -> ModernTreasury::Internal::Page[ModernTreasury::LedgerEntry]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modern_treasury
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Modern Treasury
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-02 00:00:00.000000000 Z
11
+ date: 2025-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool