modern_treasury 0.12.0 → 0.13.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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +19 -0
  3. data/README.md +7 -7
  4. data/lib/modern_treasury/models/document.rb +8 -7
  5. data/lib/modern_treasury/models/document_create_params.rb +16 -15
  6. data/lib/modern_treasury/models/document_list_params.rb +2 -1
  7. data/lib/modern_treasury/models/payment_order_create_params.rb +17 -16
  8. data/lib/modern_treasury/models/return_object.rb +1 -0
  9. data/lib/modern_treasury/resources/account_details.rb +4 -4
  10. data/lib/modern_treasury/resources/documents.rb +5 -5
  11. data/lib/modern_treasury/resources/line_items.rb +2 -2
  12. data/lib/modern_treasury/resources/routing_details.rb +4 -4
  13. data/lib/modern_treasury/version.rb +1 -1
  14. data/rbi/modern_treasury/models/document.rbi +22 -11
  15. data/rbi/modern_treasury/models/document_create_params.rbi +41 -23
  16. data/rbi/modern_treasury/models/document_list_params.rbi +10 -5
  17. data/rbi/modern_treasury/models/payment_order_create_params.rbi +44 -26
  18. data/rbi/modern_treasury/models/return_object.rbi +2 -0
  19. data/rbi/modern_treasury/resources/account_details.rbi +4 -4
  20. data/rbi/modern_treasury/resources/documents.rbi +5 -5
  21. data/rbi/modern_treasury/resources/line_items.rbi +2 -2
  22. data/rbi/modern_treasury/resources/routing_details.rbi +4 -4
  23. data/sig/modern_treasury/models/document.rbs +13 -11
  24. data/sig/modern_treasury/models/document_create_params.rbs +22 -14
  25. data/sig/modern_treasury/models/document_list_params.rbs +5 -3
  26. data/sig/modern_treasury/models/payment_order_create_params.rbs +24 -16
  27. data/sig/modern_treasury/models/return_object.rbs +8 -1
  28. data/sig/modern_treasury/resources/documents.rbs +2 -2
  29. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84f0253ff65fc177215a8600e4d5fac2573bcaf22cd05acaa32fd7f2e9c1da1b
4
- data.tar.gz: c11e505876b4ac5e650f62326b6fe390ddc7bc2110441abb57ea8b249e1ba887
3
+ metadata.gz: 49e9ed219fd175034554e8527681a2c9f687ef3fc722825ea654a08ddd21295f
4
+ data.tar.gz: 3bb464cf59c0c3a3f805b5e7556c4940d00adf192d9ebe14f359bb39988318d3
5
5
  SHA512:
6
- metadata.gz: 924eaafe7053f6da823c3f36adde93ae64c70c21c402895d89f611be909daafeb55b47a54fb81963ca5d51cc550a84f19f01a00398ba28fac3d42e0357d28b47
7
- data.tar.gz: 8bf47bc1849668bc6b6fa7e8db348b8393dfe8d3e6d8f8abf91f599c532efa09e7410bf4233df903662844d5e7fb984aa333efef117a67ac60ac0c21d185f575
6
+ metadata.gz: f7fa80c0345c892130b86ae9b72e22fb4e30bb4ce5c19619bfd2ae0db015c0c8c5ca48aaba1063d1d51d1b0bf11b68516b808eb4fd98b7dc55a96b31db531591
7
+ data.tar.gz: 7cc8bf35e4d1752627161aad44b9d41e9459a60fa76df206b27355a688970c7923bd9df8d323c6f69bdd16d7bc4c9ae6640c76be99695afcf8c502d3aa213529
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.13.0 (2026-01-13)
4
+
5
+ Full Changelog: [v0.12.0...v0.13.0](https://github.com/Modern-Treasury/modern-treasury-ruby/compare/v0.12.0...v0.13.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([890a2c0](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/890a2c0dc9e13239c715248cdb9879de929f3a09))
10
+ * **api:** api update ([09809bd](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/09809bd5b85d46cbb6628dc89b511bd64c86e13f))
11
+ * **api:** api update ([72e1a41](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/72e1a4120713c8ccf8c939f44dfe464f72f07421))
12
+ * **api:** manual updates ([880384c](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/880384c078001955b7a212428b778e268e3951eb))
13
+ * **api:** manual updates ([4ad7e5e](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/4ad7e5e51421daab7f22213c7db308a66a5ec237))
14
+ * **api:** manual updates ([2f1b2b4](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/2f1b2b459967c9d6ae3ebfc98ca74f700ee55f09))
15
+
16
+
17
+ ### Chores
18
+
19
+ * **internal:** codegen related update ([a56b7f7](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/a56b7f7a83e76478ac7f7c63215ea67a5cd3a8e0))
20
+ * move `cgi` into dependencies for ruby 4 ([be7d7af](https://github.com/Modern-Treasury/modern-treasury-ruby/commit/be7d7afbdce631face87e0b5c27a0d65539f32e6))
21
+
3
22
  ## 0.12.0 (2026-01-07)
4
23
 
5
24
  Full Changelog: [v0.11.0...v0.12.0](https://github.com/Modern-Treasury/modern-treasury-ruby/compare/v0.11.0...v0.12.0)
data/README.md CHANGED
@@ -24,7 +24,7 @@ To use this gem, install via Bundler by adding the following to your application
24
24
  <!-- x-release-please-start-version -->
25
25
 
26
26
  ```ruby
27
- gem "modern_treasury", "~> 0.12.0"
27
+ gem "modern_treasury", "~> 0.13.0"
28
28
  ```
29
29
 
30
30
  <!-- x-release-please-end -->
@@ -82,24 +82,24 @@ require "pathname"
82
82
 
83
83
  # Use `Pathname` to send the filename and/or avoid paging a large file into memory:
84
84
  document = modern_treasury.documents.create(
85
+ file: Pathname("my/file.txt"),
85
86
  documentable_id: "24c6b7a3-02...",
86
- documentable_type: "counterparties",
87
- file: Pathname("my/file.txt")
87
+ documentable_type: "counterparties"
88
88
  )
89
89
 
90
90
  # Alternatively, pass file contents or a `StringIO` directly:
91
91
  document = modern_treasury.documents.create(
92
+ file: File.read("my/file.txt"),
92
93
  documentable_id: "24c6b7a3-02...",
93
- documentable_type: "counterparties",
94
- file: File.read("my/file.txt")
94
+ documentable_type: "counterparties"
95
95
  )
96
96
 
97
97
  # Or, to control the filename and/or content type:
98
98
  file = ModernTreasury::FilePart.new(File.read("my/file.txt"), filename: "my/file.txt", content_type: "…")
99
99
  document = modern_treasury.documents.create(
100
+ file: file,
100
101
  documentable_id: "24c6b7a3-02...",
101
- documentable_type: "counterparties",
102
- file: file
102
+ documentable_type: "counterparties"
103
103
  )
104
104
 
105
105
  puts(document.id)
@@ -34,16 +34,16 @@ module ModernTreasury
34
34
  # @!attribute documentable_id
35
35
  # The unique identifier for the associated object.
36
36
  #
37
- # @return [String]
38
- required :documentable_id, String
37
+ # @return [String, nil]
38
+ required :documentable_id, String, nil?: true
39
39
 
40
40
  # @!attribute documentable_type
41
41
  # The type of the associated object. Currently can be one of `payment_order`,
42
42
  # `transaction`, `expected_payment`, `counterparty`, `organization`, `case`,
43
43
  # `internal_account`, `decision`, or `external_account`.
44
44
  #
45
- # @return [Symbol, ModernTreasury::Models::Document::DocumentableType]
46
- required :documentable_type, enum: -> { ModernTreasury::Document::DocumentableType }
45
+ # @return [Symbol, ModernTreasury::Models::Document::DocumentableType, nil]
46
+ required :documentable_type, enum: -> { ModernTreasury::Document::DocumentableType }, nil?: true
47
47
 
48
48
  # @!attribute file
49
49
  #
@@ -87,9 +87,9 @@ module ModernTreasury
87
87
  #
88
88
  # @param document_type [String, nil] A category given to the document, can be `null`.
89
89
  #
90
- # @param documentable_id [String] The unique identifier for the associated object.
90
+ # @param documentable_id [String, nil] The unique identifier for the associated object.
91
91
  #
92
- # @param documentable_type [Symbol, ModernTreasury::Models::Document::DocumentableType] The type of the associated object. Currently can be one of `payment_order`, `tra
92
+ # @param documentable_type [Symbol, ModernTreasury::Models::Document::DocumentableType, nil] The type of the associated object. Currently can be one of `payment_order`, `tra
93
93
  #
94
94
  # @param file [ModernTreasury::Models::Document::File]
95
95
  #
@@ -173,16 +173,17 @@ module ModernTreasury
173
173
  module DocumentableType
174
174
  extend ModernTreasury::Internal::Type::Enum
175
175
 
176
+ CONNECTION = :connection
176
177
  COUNTERPARTY = :counterparty
177
178
  EXPECTED_PAYMENT = :expected_payment
178
179
  EXTERNAL_ACCOUNT = :external_account
179
180
  IDENTIFICATION = :identification
180
181
  INCOMING_PAYMENT_DETAIL = :incoming_payment_detail
181
182
  INTERNAL_ACCOUNT = :internal_account
183
+ LEGAL_ENTITY = :legal_entity
182
184
  ORGANIZATION = :organization
183
185
  PAYMENT_ORDER = :payment_order
184
186
  TRANSACTION = :transaction
185
- CONNECTION = :connection
186
187
 
187
188
  # @!method self.values
188
189
  # @return [Array<Symbol>]
@@ -7,17 +7,6 @@ module ModernTreasury
7
7
  extend ModernTreasury::Internal::Type::RequestParameters::Converter
8
8
  include ModernTreasury::Internal::Type::RequestParameters
9
9
 
10
- # @!attribute documentable_id
11
- # The unique identifier for the associated object.
12
- #
13
- # @return [String]
14
- required :documentable_id, String
15
-
16
- # @!attribute documentable_type
17
- #
18
- # @return [Symbol, ModernTreasury::Models::DocumentCreateParams::DocumentableType]
19
- required :documentable_type, enum: -> { ModernTreasury::DocumentCreateParams::DocumentableType }
20
-
21
10
  # @!attribute file
22
11
  #
23
12
  # @return [Pathname, StringIO, IO, String, ModernTreasury::FilePart]
@@ -29,30 +18,42 @@ module ModernTreasury
29
18
  # @return [String, nil]
30
19
  optional :document_type, String
31
20
 
32
- # @!method initialize(documentable_id:, documentable_type:, file:, document_type: nil, request_options: {})
33
- # @param documentable_id [String] The unique identifier for the associated object.
21
+ # @!attribute documentable_id
22
+ # The unique identifier for the associated object.
34
23
  #
35
- # @param documentable_type [Symbol, ModernTreasury::Models::DocumentCreateParams::DocumentableType]
24
+ # @return [String, nil]
25
+ optional :documentable_id, String
26
+
27
+ # @!attribute documentable_type
36
28
  #
29
+ # @return [Symbol, ModernTreasury::Models::DocumentCreateParams::DocumentableType, nil]
30
+ optional :documentable_type, enum: -> { ModernTreasury::DocumentCreateParams::DocumentableType }
31
+
32
+ # @!method initialize(file:, document_type: nil, documentable_id: nil, documentable_type: nil, request_options: {})
37
33
  # @param file [Pathname, StringIO, IO, String, ModernTreasury::FilePart]
38
34
  #
39
35
  # @param document_type [String] A category given to the document, can be `null`.
40
36
  #
37
+ # @param documentable_id [String] The unique identifier for the associated object.
38
+ #
39
+ # @param documentable_type [Symbol, ModernTreasury::Models::DocumentCreateParams::DocumentableType]
40
+ #
41
41
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
42
42
 
43
43
  module DocumentableType
44
44
  extend ModernTreasury::Internal::Type::Enum
45
45
 
46
+ CONNECTIONS = :connections
46
47
  COUNTERPARTIES = :counterparties
47
48
  EXPECTED_PAYMENTS = :expected_payments
48
49
  EXTERNAL_ACCOUNTS = :external_accounts
49
50
  IDENTIFICATIONS = :identifications
50
51
  INCOMING_PAYMENT_DETAILS = :incoming_payment_details
51
52
  INTERNAL_ACCOUNTS = :internal_accounts
53
+ LEGAL_ENTITIES = :legal_entities
52
54
  ORGANIZATIONS = :organizations
53
55
  PAYMENT_ORDERS = :payment_orders
54
56
  TRANSACTIONS = :transactions
55
- CONNECTIONS = :connections
56
57
 
57
58
  # @!method self.values
58
59
  # @return [Array<Symbol>]
@@ -51,16 +51,17 @@ module ModernTreasury
51
51
  module DocumentableType
52
52
  extend ModernTreasury::Internal::Type::Enum
53
53
 
54
+ CONNECTIONS = :connections
54
55
  COUNTERPARTIES = :counterparties
55
56
  EXPECTED_PAYMENTS = :expected_payments
56
57
  EXTERNAL_ACCOUNTS = :external_accounts
57
58
  IDENTIFICATIONS = :identifications
58
59
  INCOMING_PAYMENT_DETAILS = :incoming_payment_details
59
60
  INTERNAL_ACCOUNTS = :internal_accounts
61
+ LEGAL_ENTITIES = :legal_entities
60
62
  ORGANIZATIONS = :organizations
61
63
  PAYMENT_ORDERS = :payment_orders
62
64
  TRANSACTIONS = :transactions
63
- CONNECTIONS = :connections
64
65
 
65
66
  # @!method self.values
66
67
  # @return [Array<Symbol>]
@@ -430,18 +430,6 @@ module ModernTreasury
430
430
  end
431
431
 
432
432
  class Document < ModernTreasury::Internal::Type::BaseModel
433
- # @!attribute documentable_id
434
- # The unique identifier for the associated object.
435
- #
436
- # @return [String]
437
- required :documentable_id, String
438
-
439
- # @!attribute documentable_type
440
- #
441
- # @return [Symbol, ModernTreasury::Models::PaymentOrderCreateParams::Document::DocumentableType]
442
- required :documentable_type,
443
- enum: -> { ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType }
444
-
445
433
  # @!attribute file
446
434
  #
447
435
  # @return [Pathname, StringIO, IO, String, ModernTreasury::FilePart]
@@ -453,29 +441,42 @@ module ModernTreasury
453
441
  # @return [String, nil]
454
442
  optional :document_type, String
455
443
 
456
- # @!method initialize(documentable_id:, documentable_type:, file:, document_type: nil)
457
- # @param documentable_id [String] The unique identifier for the associated object.
444
+ # @!attribute documentable_id
445
+ # The unique identifier for the associated object.
458
446
  #
459
- # @param documentable_type [Symbol, ModernTreasury::Models::PaymentOrderCreateParams::Document::DocumentableType]
447
+ # @return [String, nil]
448
+ optional :documentable_id, String
449
+
450
+ # @!attribute documentable_type
460
451
  #
452
+ # @return [Symbol, ModernTreasury::Models::PaymentOrderCreateParams::Document::DocumentableType, nil]
453
+ optional :documentable_type,
454
+ enum: -> { ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType }
455
+
456
+ # @!method initialize(file:, document_type: nil, documentable_id: nil, documentable_type: nil)
461
457
  # @param file [Pathname, StringIO, IO, String, ModernTreasury::FilePart]
462
458
  #
463
459
  # @param document_type [String] A category given to the document, can be `null`.
460
+ #
461
+ # @param documentable_id [String] The unique identifier for the associated object.
462
+ #
463
+ # @param documentable_type [Symbol, ModernTreasury::Models::PaymentOrderCreateParams::Document::DocumentableType]
464
464
 
465
465
  # @see ModernTreasury::Models::PaymentOrderCreateParams::Document#documentable_type
466
466
  module DocumentableType
467
467
  extend ModernTreasury::Internal::Type::Enum
468
468
 
469
+ CONNECTIONS = :connections
469
470
  COUNTERPARTIES = :counterparties
470
471
  EXPECTED_PAYMENTS = :expected_payments
471
472
  EXTERNAL_ACCOUNTS = :external_accounts
472
473
  IDENTIFICATIONS = :identifications
473
474
  INCOMING_PAYMENT_DETAILS = :incoming_payment_details
474
475
  INTERNAL_ACCOUNTS = :internal_accounts
476
+ LEGAL_ENTITIES = :legal_entities
475
477
  ORGANIZATIONS = :organizations
476
478
  PAYMENT_ORDERS = :payment_orders
477
479
  TRANSACTIONS = :transactions
478
- CONNECTIONS = :connections
479
480
 
480
481
  # @!method self.values
481
482
  # @return [Array<Symbol>]
@@ -609,6 +609,7 @@ module ModernTreasury
609
609
  module Status
610
610
  extend ModernTreasury::Internal::Type::Enum
611
611
 
612
+ CANCELLED = :cancelled
612
613
  COMPLETED = :completed
613
614
  FAILED = :failed
614
615
  PENDING = :pending
@@ -12,7 +12,7 @@ module ModernTreasury
12
12
  #
13
13
  # @param account_id [String] Path param: The ID of the account.
14
14
  #
15
- # @param accounts_type [Symbol, ModernTreasury::Models::AccountDetailCreateParams::AccountsType] Path param:
15
+ # @param accounts_type [Symbol, ModernTreasury::Models::AccountDetailCreateParams::AccountsType] Path param
16
16
  #
17
17
  # @param account_number [String] Body param: The account number for the bank account.
18
18
  #
@@ -77,11 +77,11 @@ module ModernTreasury
77
77
  #
78
78
  # @param account_id [String] Path param: The ID of the account.
79
79
  #
80
- # @param accounts_type [Symbol, ModernTreasury::Models::AccountsType] Path param:
80
+ # @param accounts_type [Symbol, ModernTreasury::Models::AccountsType] Path param
81
81
  #
82
- # @param after_cursor [String, nil] Query param:
82
+ # @param after_cursor [String, nil] Query param
83
83
  #
84
- # @param per_page [Integer] Query param:
84
+ # @param per_page [Integer] Query param
85
85
  #
86
86
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}, nil]
87
87
  #
@@ -5,16 +5,16 @@ module ModernTreasury
5
5
  class Documents
6
6
  # Create a document.
7
7
  #
8
- # @overload create(documentable_id:, documentable_type:, file:, document_type: nil, request_options: {})
9
- #
10
- # @param documentable_id [String] The unique identifier for the associated object.
11
- #
12
- # @param documentable_type [Symbol, ModernTreasury::Models::DocumentCreateParams::DocumentableType]
8
+ # @overload create(file:, document_type: nil, documentable_id: nil, documentable_type: nil, request_options: {})
13
9
  #
14
10
  # @param file [Pathname, StringIO, IO, String, ModernTreasury::FilePart]
15
11
  #
16
12
  # @param document_type [String] A category given to the document, can be `null`.
17
13
  #
14
+ # @param documentable_id [String] The unique identifier for the associated object.
15
+ #
16
+ # @param documentable_type [Symbol, ModernTreasury::Models::DocumentCreateParams::DocumentableType]
17
+ #
18
18
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}, nil]
19
19
  #
20
20
  # @return [ModernTreasury::Models::Document]
@@ -83,9 +83,9 @@ module ModernTreasury
83
83
  #
84
84
  # @param itemizable_type [Symbol, ModernTreasury::Models::LineItemListParams::ItemizableType] Path param: One of `payment_orders` or `expected_payments`.
85
85
  #
86
- # @param after_cursor [String, nil] Query param:
86
+ # @param after_cursor [String, nil] Query param
87
87
  #
88
- # @param per_page [Integer] Query param:
88
+ # @param per_page [Integer] Query param
89
89
  #
90
90
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}, nil]
91
91
  #
@@ -12,7 +12,7 @@ module ModernTreasury
12
12
  #
13
13
  # @param account_id [String] Path param: The ID of the account.
14
14
  #
15
- # @param accounts_type [Symbol, ModernTreasury::Models::RoutingDetailCreateParams::AccountsType] Path param:
15
+ # @param accounts_type [Symbol, ModernTreasury::Models::RoutingDetailCreateParams::AccountsType] Path param
16
16
  #
17
17
  # @param routing_number [String] Body param: The routing number of the bank.
18
18
  #
@@ -79,11 +79,11 @@ module ModernTreasury
79
79
  #
80
80
  # @param account_id [String] Path param: The ID of the account.
81
81
  #
82
- # @param accounts_type [Symbol, ModernTreasury::Models::AccountsType] Path param:
82
+ # @param accounts_type [Symbol, ModernTreasury::Models::AccountsType] Path param
83
83
  #
84
- # @param after_cursor [String, nil] Query param:
84
+ # @param after_cursor [String, nil] Query param
85
85
  #
86
- # @param per_page [Integer] Query param:
86
+ # @param per_page [Integer] Query param
87
87
  #
88
88
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}, nil]
89
89
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ModernTreasury
4
- VERSION = "0.12.0"
4
+ VERSION = "0.13.0"
5
5
  end
@@ -25,13 +25,17 @@ module ModernTreasury
25
25
  attr_accessor :document_type
26
26
 
27
27
  # The unique identifier for the associated object.
28
- sig { returns(String) }
28
+ sig { returns(T.nilable(String)) }
29
29
  attr_accessor :documentable_id
30
30
 
31
31
  # The type of the associated object. Currently can be one of `payment_order`,
32
32
  # `transaction`, `expected_payment`, `counterparty`, `organization`, `case`,
33
33
  # `internal_account`, `decision`, or `external_account`.
34
- sig { returns(ModernTreasury::Document::DocumentableType::TaggedSymbol) }
34
+ sig do
35
+ returns(
36
+ T.nilable(ModernTreasury::Document::DocumentableType::TaggedSymbol)
37
+ )
38
+ end
35
39
  attr_accessor :documentable_type
36
40
 
37
41
  sig { returns(ModernTreasury::Document::File) }
@@ -63,9 +67,9 @@ module ModernTreasury
63
67
  document_details:
64
68
  T::Array[ModernTreasury::Document::DocumentDetail::OrHash],
65
69
  document_type: T.nilable(String),
66
- documentable_id: String,
70
+ documentable_id: T.nilable(String),
67
71
  documentable_type:
68
- ModernTreasury::Document::DocumentableType::OrSymbol,
72
+ T.nilable(ModernTreasury::Document::DocumentableType::OrSymbol),
69
73
  file: ModernTreasury::Document::File::OrHash,
70
74
  live_mode: T::Boolean,
71
75
  object: String,
@@ -106,9 +110,11 @@ module ModernTreasury
106
110
  document_details:
107
111
  T::Array[ModernTreasury::Document::DocumentDetail],
108
112
  document_type: T.nilable(String),
109
- documentable_id: String,
113
+ documentable_id: T.nilable(String),
110
114
  documentable_type:
111
- ModernTreasury::Document::DocumentableType::TaggedSymbol,
115
+ T.nilable(
116
+ ModernTreasury::Document::DocumentableType::TaggedSymbol
117
+ ),
112
118
  file: ModernTreasury::Document::File,
113
119
  live_mode: T::Boolean,
114
120
  object: String,
@@ -211,6 +217,11 @@ module ModernTreasury
211
217
  end
212
218
  OrSymbol = T.type_alias { T.any(Symbol, String) }
213
219
 
220
+ CONNECTION =
221
+ T.let(
222
+ :connection,
223
+ ModernTreasury::Document::DocumentableType::TaggedSymbol
224
+ )
214
225
  COUNTERPARTY =
215
226
  T.let(
216
227
  :counterparty,
@@ -241,6 +252,11 @@ module ModernTreasury
241
252
  :internal_account,
242
253
  ModernTreasury::Document::DocumentableType::TaggedSymbol
243
254
  )
255
+ LEGAL_ENTITY =
256
+ T.let(
257
+ :legal_entity,
258
+ ModernTreasury::Document::DocumentableType::TaggedSymbol
259
+ )
244
260
  ORGANIZATION =
245
261
  T.let(
246
262
  :organization,
@@ -256,11 +272,6 @@ module ModernTreasury
256
272
  :transaction,
257
273
  ModernTreasury::Document::DocumentableType::TaggedSymbol
258
274
  )
259
- CONNECTION =
260
- T.let(
261
- :connection,
262
- ModernTreasury::Document::DocumentableType::TaggedSymbol
263
- )
264
275
 
265
276
  sig do
266
277
  override.returns(
@@ -14,17 +14,6 @@ module ModernTreasury
14
14
  )
15
15
  end
16
16
 
17
- # The unique identifier for the associated object.
18
- sig { returns(String) }
19
- attr_accessor :documentable_id
20
-
21
- sig do
22
- returns(
23
- ModernTreasury::DocumentCreateParams::DocumentableType::OrSymbol
24
- )
25
- end
26
- attr_accessor :documentable_type
27
-
28
17
  sig { returns(ModernTreasury::Internal::FileInput) }
29
18
  attr_accessor :file
30
19
 
@@ -35,23 +24,47 @@ module ModernTreasury
35
24
  sig { params(document_type: String).void }
36
25
  attr_writer :document_type
37
26
 
27
+ # The unique identifier for the associated object.
28
+ sig { returns(T.nilable(String)) }
29
+ attr_reader :documentable_id
30
+
31
+ sig { params(documentable_id: String).void }
32
+ attr_writer :documentable_id
33
+
34
+ sig do
35
+ returns(
36
+ T.nilable(
37
+ ModernTreasury::DocumentCreateParams::DocumentableType::OrSymbol
38
+ )
39
+ )
40
+ end
41
+ attr_reader :documentable_type
42
+
38
43
  sig do
39
44
  params(
40
- documentable_id: String,
41
45
  documentable_type:
42
- ModernTreasury::DocumentCreateParams::DocumentableType::OrSymbol,
46
+ ModernTreasury::DocumentCreateParams::DocumentableType::OrSymbol
47
+ ).void
48
+ end
49
+ attr_writer :documentable_type
50
+
51
+ sig do
52
+ params(
43
53
  file: ModernTreasury::Internal::FileInput,
44
54
  document_type: String,
55
+ documentable_id: String,
56
+ documentable_type:
57
+ ModernTreasury::DocumentCreateParams::DocumentableType::OrSymbol,
45
58
  request_options: ModernTreasury::RequestOptions::OrHash
46
59
  ).returns(T.attached_class)
47
60
  end
48
61
  def self.new(
49
- # The unique identifier for the associated object.
50
- documentable_id:,
51
- documentable_type:,
52
62
  file:,
53
63
  # A category given to the document, can be `null`.
54
64
  document_type: nil,
65
+ # The unique identifier for the associated object.
66
+ documentable_id: nil,
67
+ documentable_type: nil,
55
68
  request_options: {}
56
69
  )
57
70
  end
@@ -59,11 +72,11 @@ module ModernTreasury
59
72
  sig do
60
73
  override.returns(
61
74
  {
75
+ file: ModernTreasury::Internal::FileInput,
76
+ document_type: String,
62
77
  documentable_id: String,
63
78
  documentable_type:
64
79
  ModernTreasury::DocumentCreateParams::DocumentableType::OrSymbol,
65
- file: ModernTreasury::Internal::FileInput,
66
- document_type: String,
67
80
  request_options: ModernTreasury::RequestOptions
68
81
  }
69
82
  )
@@ -83,6 +96,11 @@ module ModernTreasury
83
96
  end
84
97
  OrSymbol = T.type_alias { T.any(Symbol, String) }
85
98
 
99
+ CONNECTIONS =
100
+ T.let(
101
+ :connections,
102
+ ModernTreasury::DocumentCreateParams::DocumentableType::TaggedSymbol
103
+ )
86
104
  COUNTERPARTIES =
87
105
  T.let(
88
106
  :counterparties,
@@ -113,6 +131,11 @@ module ModernTreasury
113
131
  :internal_accounts,
114
132
  ModernTreasury::DocumentCreateParams::DocumentableType::TaggedSymbol
115
133
  )
134
+ LEGAL_ENTITIES =
135
+ T.let(
136
+ :legal_entities,
137
+ ModernTreasury::DocumentCreateParams::DocumentableType::TaggedSymbol
138
+ )
116
139
  ORGANIZATIONS =
117
140
  T.let(
118
141
  :organizations,
@@ -128,11 +151,6 @@ module ModernTreasury
128
151
  :transactions,
129
152
  ModernTreasury::DocumentCreateParams::DocumentableType::TaggedSymbol
130
153
  )
131
- CONNECTIONS =
132
- T.let(
133
- :connections,
134
- ModernTreasury::DocumentCreateParams::DocumentableType::TaggedSymbol
135
- )
136
154
 
137
155
  sig do
138
156
  override.returns(
@@ -100,6 +100,11 @@ module ModernTreasury
100
100
  end
101
101
  OrSymbol = T.type_alias { T.any(Symbol, String) }
102
102
 
103
+ CONNECTIONS =
104
+ T.let(
105
+ :connections,
106
+ ModernTreasury::DocumentListParams::DocumentableType::TaggedSymbol
107
+ )
103
108
  COUNTERPARTIES =
104
109
  T.let(
105
110
  :counterparties,
@@ -130,6 +135,11 @@ module ModernTreasury
130
135
  :internal_accounts,
131
136
  ModernTreasury::DocumentListParams::DocumentableType::TaggedSymbol
132
137
  )
138
+ LEGAL_ENTITIES =
139
+ T.let(
140
+ :legal_entities,
141
+ ModernTreasury::DocumentListParams::DocumentableType::TaggedSymbol
142
+ )
133
143
  ORGANIZATIONS =
134
144
  T.let(
135
145
  :organizations,
@@ -145,11 +155,6 @@ module ModernTreasury
145
155
  :transactions,
146
156
  ModernTreasury::DocumentListParams::DocumentableType::TaggedSymbol
147
157
  )
148
- CONNECTIONS =
149
- T.let(
150
- :connections,
151
- ModernTreasury::DocumentListParams::DocumentableType::TaggedSymbol
152
- )
153
158
 
154
159
  sig do
155
160
  override.returns(
@@ -732,17 +732,6 @@ module ModernTreasury
732
732
  )
733
733
  end
734
734
 
735
- # The unique identifier for the associated object.
736
- sig { returns(String) }
737
- attr_accessor :documentable_id
738
-
739
- sig do
740
- returns(
741
- ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::OrSymbol
742
- )
743
- end
744
- attr_accessor :documentable_type
745
-
746
735
  sig { returns(ModernTreasury::Internal::FileInput) }
747
736
  attr_accessor :file
748
737
 
@@ -753,33 +742,57 @@ module ModernTreasury
753
742
  sig { params(document_type: String).void }
754
743
  attr_writer :document_type
755
744
 
745
+ # The unique identifier for the associated object.
746
+ sig { returns(T.nilable(String)) }
747
+ attr_reader :documentable_id
748
+
749
+ sig { params(documentable_id: String).void }
750
+ attr_writer :documentable_id
751
+
752
+ sig do
753
+ returns(
754
+ T.nilable(
755
+ ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::OrSymbol
756
+ )
757
+ )
758
+ end
759
+ attr_reader :documentable_type
760
+
756
761
  sig do
757
762
  params(
758
- documentable_id: String,
759
763
  documentable_type:
760
- ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::OrSymbol,
764
+ ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::OrSymbol
765
+ ).void
766
+ end
767
+ attr_writer :documentable_type
768
+
769
+ sig do
770
+ params(
761
771
  file: ModernTreasury::Internal::FileInput,
762
- document_type: String
772
+ document_type: String,
773
+ documentable_id: String,
774
+ documentable_type:
775
+ ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::OrSymbol
763
776
  ).returns(T.attached_class)
764
777
  end
765
778
  def self.new(
766
- # The unique identifier for the associated object.
767
- documentable_id:,
768
- documentable_type:,
769
779
  file:,
770
780
  # A category given to the document, can be `null`.
771
- document_type: nil
781
+ document_type: nil,
782
+ # The unique identifier for the associated object.
783
+ documentable_id: nil,
784
+ documentable_type: nil
772
785
  )
773
786
  end
774
787
 
775
788
  sig do
776
789
  override.returns(
777
790
  {
791
+ file: ModernTreasury::Internal::FileInput,
792
+ document_type: String,
778
793
  documentable_id: String,
779
794
  documentable_type:
780
- ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::OrSymbol,
781
- file: ModernTreasury::Internal::FileInput,
782
- document_type: String
795
+ ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::OrSymbol
783
796
  }
784
797
  )
785
798
  end
@@ -798,6 +811,11 @@ module ModernTreasury
798
811
  end
799
812
  OrSymbol = T.type_alias { T.any(Symbol, String) }
800
813
 
814
+ CONNECTIONS =
815
+ T.let(
816
+ :connections,
817
+ ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::TaggedSymbol
818
+ )
801
819
  COUNTERPARTIES =
802
820
  T.let(
803
821
  :counterparties,
@@ -828,6 +846,11 @@ module ModernTreasury
828
846
  :internal_accounts,
829
847
  ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::TaggedSymbol
830
848
  )
849
+ LEGAL_ENTITIES =
850
+ T.let(
851
+ :legal_entities,
852
+ ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::TaggedSymbol
853
+ )
831
854
  ORGANIZATIONS =
832
855
  T.let(
833
856
  :organizations,
@@ -843,11 +866,6 @@ module ModernTreasury
843
866
  :transactions,
844
867
  ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::TaggedSymbol
845
868
  )
846
- CONNECTIONS =
847
- T.let(
848
- :connections,
849
- ModernTreasury::PaymentOrderCreateParams::Document::DocumentableType::TaggedSymbol
850
- )
851
869
 
852
870
  sig do
853
871
  override.returns(
@@ -1165,6 +1165,8 @@ module ModernTreasury
1165
1165
  T.type_alias { T.all(Symbol, ModernTreasury::ReturnObject::Status) }
1166
1166
  OrSymbol = T.type_alias { T.any(Symbol, String) }
1167
1167
 
1168
+ CANCELLED =
1169
+ T.let(:cancelled, ModernTreasury::ReturnObject::Status::TaggedSymbol)
1168
1170
  COMPLETED =
1169
1171
  T.let(:completed, ModernTreasury::ReturnObject::Status::TaggedSymbol)
1170
1172
  FAILED =
@@ -18,7 +18,7 @@ module ModernTreasury
18
18
  def create(
19
19
  # Path param: The ID of the account.
20
20
  account_id,
21
- # Path param:
21
+ # Path param
22
22
  accounts_type:,
23
23
  # Body param: The account number for the bank account.
24
24
  account_number:,
@@ -61,11 +61,11 @@ module ModernTreasury
61
61
  def list(
62
62
  # Path param: The ID of the account.
63
63
  account_id,
64
- # Path param:
64
+ # Path param
65
65
  accounts_type:,
66
- # Query param:
66
+ # Query param
67
67
  after_cursor: nil,
68
- # Query param:
68
+ # Query param
69
69
  per_page: nil,
70
70
  request_options: {}
71
71
  )
@@ -6,21 +6,21 @@ module ModernTreasury
6
6
  # Create a document.
7
7
  sig do
8
8
  params(
9
+ file: ModernTreasury::Internal::FileInput,
10
+ document_type: String,
9
11
  documentable_id: String,
10
12
  documentable_type:
11
13
  ModernTreasury::DocumentCreateParams::DocumentableType::OrSymbol,
12
- file: ModernTreasury::Internal::FileInput,
13
- document_type: String,
14
14
  request_options: ModernTreasury::RequestOptions::OrHash
15
15
  ).returns(ModernTreasury::Document)
16
16
  end
17
17
  def create(
18
- # The unique identifier for the associated object.
19
- documentable_id:,
20
- documentable_type:,
21
18
  file:,
22
19
  # A category given to the document, can be `null`.
23
20
  document_type: nil,
21
+ # The unique identifier for the associated object.
22
+ documentable_id: nil,
23
+ documentable_type: nil,
24
24
  request_options: {}
25
25
  )
26
26
  end
@@ -65,9 +65,9 @@ module ModernTreasury
65
65
  itemizable_id,
66
66
  # Path param: One of `payment_orders` or `expected_payments`.
67
67
  itemizable_type:,
68
- # Query param:
68
+ # Query param
69
69
  after_cursor: nil,
70
- # Query param:
70
+ # Query param
71
71
  per_page: nil,
72
72
  request_options: {}
73
73
  )
@@ -22,7 +22,7 @@ module ModernTreasury
22
22
  def create(
23
23
  # Path param: The ID of the account.
24
24
  account_id,
25
- # Path param:
25
+ # Path param
26
26
  accounts_type:,
27
27
  # Body param: The routing number of the bank.
28
28
  routing_number:,
@@ -69,11 +69,11 @@ module ModernTreasury
69
69
  def list(
70
70
  # Path param: The ID of the account.
71
71
  account_id,
72
- # Path param:
72
+ # Path param
73
73
  accounts_type:,
74
- # Query param:
74
+ # Query param
75
75
  after_cursor: nil,
76
- # Query param:
76
+ # Query param
77
77
  per_page: nil,
78
78
  request_options: {}
79
79
  )
@@ -7,8 +7,8 @@ module ModernTreasury
7
7
  discarded_at: Time?,
8
8
  document_details: ::Array[ModernTreasury::Document::DocumentDetail],
9
9
  document_type: String?,
10
- documentable_id: String,
11
- documentable_type: ModernTreasury::Models::Document::documentable_type,
10
+ documentable_id: String?,
11
+ documentable_type: ModernTreasury::Models::Document::documentable_type?,
12
12
  file: ModernTreasury::Document::File,
13
13
  live_mode: bool,
14
14
  object: String,
@@ -27,9 +27,9 @@ module ModernTreasury
27
27
 
28
28
  attr_accessor document_type: String?
29
29
 
30
- attr_accessor documentable_id: String
30
+ attr_accessor documentable_id: String?
31
31
 
32
- attr_accessor documentable_type: ModernTreasury::Models::Document::documentable_type
32
+ attr_accessor documentable_type: ModernTreasury::Models::Document::documentable_type?
33
33
 
34
34
  attr_accessor file: ModernTreasury::Document::File
35
35
 
@@ -47,8 +47,8 @@ module ModernTreasury
47
47
  discarded_at: Time?,
48
48
  document_details: ::Array[ModernTreasury::Document::DocumentDetail],
49
49
  document_type: String?,
50
- documentable_id: String,
51
- documentable_type: ModernTreasury::Models::Document::documentable_type,
50
+ documentable_id: String?,
51
+ documentable_type: ModernTreasury::Models::Document::documentable_type?,
52
52
  file: ModernTreasury::Document::File,
53
53
  live_mode: bool,
54
54
  object: String,
@@ -62,8 +62,8 @@ module ModernTreasury
62
62
  discarded_at: Time?,
63
63
  document_details: ::Array[ModernTreasury::Document::DocumentDetail],
64
64
  document_type: String?,
65
- documentable_id: String,
66
- documentable_type: ModernTreasury::Models::Document::documentable_type,
65
+ documentable_id: String?,
66
+ documentable_type: ModernTreasury::Models::Document::documentable_type?,
67
67
  file: ModernTreasury::Document::File,
68
68
  live_mode: bool,
69
69
  object: String,
@@ -124,30 +124,32 @@ module ModernTreasury
124
124
  end
125
125
 
126
126
  type documentable_type =
127
- :counterparty
127
+ :connection
128
+ | :counterparty
128
129
  | :expected_payment
129
130
  | :external_account
130
131
  | :identification
131
132
  | :incoming_payment_detail
132
133
  | :internal_account
134
+ | :legal_entity
133
135
  | :organization
134
136
  | :payment_order
135
137
  | :transaction
136
- | :connection
137
138
 
138
139
  module DocumentableType
139
140
  extend ModernTreasury::Internal::Type::Enum
140
141
 
142
+ CONNECTION: :connection
141
143
  COUNTERPARTY: :counterparty
142
144
  EXPECTED_PAYMENT: :expected_payment
143
145
  EXTERNAL_ACCOUNT: :external_account
144
146
  IDENTIFICATION: :identification
145
147
  INCOMING_PAYMENT_DETAIL: :incoming_payment_detail
146
148
  INTERNAL_ACCOUNT: :internal_account
149
+ LEGAL_ENTITY: :legal_entity
147
150
  ORGANIZATION: :organization
148
151
  PAYMENT_ORDER: :payment_order
149
152
  TRANSACTION: :transaction
150
- CONNECTION: :connection
151
153
 
152
154
  def self?.values: -> ::Array[ModernTreasury::Models::Document::documentable_type]
153
155
  end
@@ -2,10 +2,10 @@ module ModernTreasury
2
2
  module Models
3
3
  type document_create_params =
4
4
  {
5
- documentable_id: String,
6
- documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type,
7
5
  file: ModernTreasury::Internal::file_input,
8
- document_type: String
6
+ document_type: String,
7
+ documentable_id: String,
8
+ documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type
9
9
  }
10
10
  & ModernTreasury::Internal::Type::request_parameters
11
11
 
@@ -13,57 +13,65 @@ module ModernTreasury
13
13
  extend ModernTreasury::Internal::Type::RequestParameters::Converter
14
14
  include ModernTreasury::Internal::Type::RequestParameters
15
15
 
16
- attr_accessor documentable_id: String
17
-
18
- attr_accessor documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type
19
-
20
16
  attr_accessor file: ModernTreasury::Internal::file_input
21
17
 
22
18
  attr_reader document_type: String?
23
19
 
24
20
  def document_type=: (String) -> String
25
21
 
22
+ attr_reader documentable_id: String?
23
+
24
+ def documentable_id=: (String) -> String
25
+
26
+ attr_reader documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type?
27
+
28
+ def documentable_type=: (
29
+ ModernTreasury::Models::DocumentCreateParams::documentable_type
30
+ ) -> ModernTreasury::Models::DocumentCreateParams::documentable_type
31
+
26
32
  def initialize: (
27
- documentable_id: String,
28
- documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type,
29
33
  file: ModernTreasury::Internal::file_input,
30
34
  ?document_type: String,
35
+ ?documentable_id: String,
36
+ ?documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type,
31
37
  ?request_options: ModernTreasury::request_opts
32
38
  ) -> void
33
39
 
34
40
  def to_hash: -> {
35
- documentable_id: String,
36
- documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type,
37
41
  file: ModernTreasury::Internal::file_input,
38
42
  document_type: String,
43
+ documentable_id: String,
44
+ documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type,
39
45
  request_options: ModernTreasury::RequestOptions
40
46
  }
41
47
 
42
48
  type documentable_type =
43
- :counterparties
49
+ :connections
50
+ | :counterparties
44
51
  | :expected_payments
45
52
  | :external_accounts
46
53
  | :identifications
47
54
  | :incoming_payment_details
48
55
  | :internal_accounts
56
+ | :legal_entities
49
57
  | :organizations
50
58
  | :payment_orders
51
59
  | :transactions
52
- | :connections
53
60
 
54
61
  module DocumentableType
55
62
  extend ModernTreasury::Internal::Type::Enum
56
63
 
64
+ CONNECTIONS: :connections
57
65
  COUNTERPARTIES: :counterparties
58
66
  EXPECTED_PAYMENTS: :expected_payments
59
67
  EXTERNAL_ACCOUNTS: :external_accounts
60
68
  IDENTIFICATIONS: :identifications
61
69
  INCOMING_PAYMENT_DETAILS: :incoming_payment_details
62
70
  INTERNAL_ACCOUNTS: :internal_accounts
71
+ LEGAL_ENTITIES: :legal_entities
63
72
  ORGANIZATIONS: :organizations
64
73
  PAYMENT_ORDERS: :payment_orders
65
74
  TRANSACTIONS: :transactions
66
- CONNECTIONS: :connections
67
75
 
68
76
  def self?.values: -> ::Array[ModernTreasury::Models::DocumentCreateParams::documentable_type]
69
77
  end
@@ -46,30 +46,32 @@ module ModernTreasury
46
46
  }
47
47
 
48
48
  type documentable_type =
49
- :counterparties
49
+ :connections
50
+ | :counterparties
50
51
  | :expected_payments
51
52
  | :external_accounts
52
53
  | :identifications
53
54
  | :incoming_payment_details
54
55
  | :internal_accounts
56
+ | :legal_entities
55
57
  | :organizations
56
58
  | :payment_orders
57
59
  | :transactions
58
- | :connections
59
60
 
60
61
  module DocumentableType
61
62
  extend ModernTreasury::Internal::Type::Enum
62
63
 
64
+ CONNECTIONS: :connections
63
65
  COUNTERPARTIES: :counterparties
64
66
  EXPECTED_PAYMENTS: :expected_payments
65
67
  EXTERNAL_ACCOUNTS: :external_accounts
66
68
  IDENTIFICATIONS: :identifications
67
69
  INCOMING_PAYMENT_DETAILS: :incoming_payment_details
68
70
  INTERNAL_ACCOUNTS: :internal_accounts
71
+ LEGAL_ENTITIES: :legal_entities
69
72
  ORGANIZATIONS: :organizations
70
73
  PAYMENT_ORDERS: :payment_orders
71
74
  TRANSACTIONS: :transactions
72
- CONNECTIONS: :connections
73
75
 
74
76
  def self?.values: -> ::Array[ModernTreasury::Models::DocumentListParams::documentable_type]
75
77
  end
@@ -287,62 +287,70 @@ module ModernTreasury
287
287
 
288
288
  type document =
289
289
  {
290
- documentable_id: String,
291
- documentable_type: ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type,
292
290
  file: ModernTreasury::Internal::file_input,
293
- document_type: String
291
+ document_type: String,
292
+ documentable_id: String,
293
+ documentable_type: ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type
294
294
  }
295
295
 
296
296
  class Document < ModernTreasury::Internal::Type::BaseModel
297
- attr_accessor documentable_id: String
298
-
299
- attr_accessor documentable_type: ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type
300
-
301
297
  attr_accessor file: ModernTreasury::Internal::file_input
302
298
 
303
299
  attr_reader document_type: String?
304
300
 
305
301
  def document_type=: (String) -> String
306
302
 
303
+ attr_reader documentable_id: String?
304
+
305
+ def documentable_id=: (String) -> String
306
+
307
+ attr_reader documentable_type: ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type?
308
+
309
+ def documentable_type=: (
310
+ ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type
311
+ ) -> ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type
312
+
307
313
  def initialize: (
308
- documentable_id: String,
309
- documentable_type: ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type,
310
314
  file: ModernTreasury::Internal::file_input,
311
- ?document_type: String
315
+ ?document_type: String,
316
+ ?documentable_id: String,
317
+ ?documentable_type: ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type
312
318
  ) -> void
313
319
 
314
320
  def to_hash: -> {
315
- documentable_id: String,
316
- documentable_type: ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type,
317
321
  file: ModernTreasury::Internal::file_input,
318
- document_type: String
322
+ document_type: String,
323
+ documentable_id: String,
324
+ documentable_type: ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type
319
325
  }
320
326
 
321
327
  type documentable_type =
322
- :counterparties
328
+ :connections
329
+ | :counterparties
323
330
  | :expected_payments
324
331
  | :external_accounts
325
332
  | :identifications
326
333
  | :incoming_payment_details
327
334
  | :internal_accounts
335
+ | :legal_entities
328
336
  | :organizations
329
337
  | :payment_orders
330
338
  | :transactions
331
- | :connections
332
339
 
333
340
  module DocumentableType
334
341
  extend ModernTreasury::Internal::Type::Enum
335
342
 
343
+ CONNECTIONS: :connections
336
344
  COUNTERPARTIES: :counterparties
337
345
  EXPECTED_PAYMENTS: :expected_payments
338
346
  EXTERNAL_ACCOUNTS: :external_accounts
339
347
  IDENTIFICATIONS: :identifications
340
348
  INCOMING_PAYMENT_DETAILS: :incoming_payment_details
341
349
  INTERNAL_ACCOUNTS: :internal_accounts
350
+ LEGAL_ENTITIES: :legal_entities
342
351
  ORGANIZATIONS: :organizations
343
352
  PAYMENT_ORDERS: :payment_orders
344
353
  TRANSACTIONS: :transactions
345
- CONNECTIONS: :connections
346
354
 
347
355
  def self?.values: -> ::Array[ModernTreasury::Models::PaymentOrderCreateParams::Document::documentable_type]
348
356
  end
@@ -658,11 +658,18 @@ module ModernTreasury
658
658
  end
659
659
 
660
660
  type status =
661
- :completed | :failed | :pending | :processing | :returned | :sent
661
+ :cancelled
662
+ | :completed
663
+ | :failed
664
+ | :pending
665
+ | :processing
666
+ | :returned
667
+ | :sent
662
668
 
663
669
  module Status
664
670
  extend ModernTreasury::Internal::Type::Enum
665
671
 
672
+ CANCELLED: :cancelled
666
673
  COMPLETED: :completed
667
674
  FAILED: :failed
668
675
  PENDING: :pending
@@ -2,10 +2,10 @@ module ModernTreasury
2
2
  module Resources
3
3
  class Documents
4
4
  def create: (
5
- documentable_id: String,
6
- documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type,
7
5
  file: ModernTreasury::Internal::file_input,
8
6
  ?document_type: String,
7
+ ?documentable_id: String,
8
+ ?documentable_type: ModernTreasury::Models::DocumentCreateParams::documentable_type,
9
9
  ?request_options: ModernTreasury::request_opts
10
10
  ) -> ModernTreasury::Document
11
11
 
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: modern_treasury
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.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: 2026-01-07 00:00:00.000000000 Z
11
+ date: 2026-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cgi
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: connection_pool
15
29
  requirement: !ruby/object:Gem::Requirement