modern_treasury 0.4.0 → 0.6.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 (147) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +1 -1
  4. data/lib/modern_treasury/internal/transport/base_client.rb +1 -4
  5. data/lib/modern_treasury/internal/transport/pooled_net_requester.rb +1 -9
  6. data/lib/modern_treasury/internal/type/base_model.rb +6 -12
  7. data/lib/modern_treasury/internal/util.rb +1 -1
  8. data/lib/modern_treasury/models/account_collection_flow.rb +2 -6
  9. data/lib/modern_treasury/models/account_collection_flow_create_params.rb +1 -3
  10. data/lib/modern_treasury/models/bulk_request_create_params.rb +102 -75
  11. data/lib/modern_treasury/models/bulk_result.rb +1 -3
  12. data/lib/modern_treasury/models/child_legal_entity_create.rb +2 -6
  13. data/lib/modern_treasury/models/connection_legal_entity_create_params.rb +3 -9
  14. data/lib/modern_treasury/models/counterparty.rb +4 -16
  15. data/lib/modern_treasury/models/counterparty_collect_account_params.rb +1 -3
  16. data/lib/modern_treasury/models/counterparty_create_params.rb +12 -27
  17. data/lib/modern_treasury/models/expected_payment_create_params.rb +1 -3
  18. data/lib/modern_treasury/models/expected_payment_list_params.rb +1 -0
  19. data/lib/modern_treasury/models/expected_payment_type.rb +1 -0
  20. data/lib/modern_treasury/models/external_account_create_params.rb +3 -6
  21. data/lib/modern_treasury/models/external_account_verify_params.rb +1 -0
  22. data/lib/modern_treasury/models/external_account_verify_response.rb +1 -0
  23. data/lib/modern_treasury/models/internal_account.rb +2 -3
  24. data/lib/modern_treasury/models/internal_account_create_params.rb +2 -3
  25. data/lib/modern_treasury/models/internal_account_list_params.rb +1 -0
  26. data/lib/modern_treasury/models/internal_account_update_account_capability_response.rb +1 -0
  27. data/lib/modern_treasury/models/internal_accounts/balance_report.rb +2 -7
  28. data/lib/modern_treasury/models/internal_accounts/balance_report_create_params.rb +2 -6
  29. data/lib/modern_treasury/models/internal_accounts/balance_report_retrieve_params.rb +1 -3
  30. data/lib/modern_treasury/models/ledger_account_balance_monitor_create_params.rb +1 -4
  31. data/lib/modern_treasury/models/ledger_account_list_params.rb +1 -4
  32. data/lib/modern_treasury/models/ledger_account_settlement.rb +3 -3
  33. data/lib/modern_treasury/models/ledger_entry_list_params.rb +1 -3
  34. data/lib/modern_treasury/models/ledger_transaction_create_partial_post_params.rb +2 -6
  35. data/lib/modern_treasury/models/ledger_transaction_list_params.rb +45 -1
  36. data/lib/modern_treasury/models/ledger_transactions/ledger_transaction_version.rb +2 -6
  37. data/lib/modern_treasury/models/legal_entity.rb +3 -10
  38. data/lib/modern_treasury/models/legal_entity_address_create_request.rb +1 -3
  39. data/lib/modern_treasury/models/legal_entity_association.rb +7 -21
  40. data/lib/modern_treasury/models/legal_entity_association_create_params.rb +1 -3
  41. data/lib/modern_treasury/models/legal_entity_create_params.rb +3 -9
  42. data/lib/modern_treasury/models/legal_entity_update_params.rb +2 -6
  43. data/lib/modern_treasury/models/line_item.rb +40 -3
  44. data/lib/modern_treasury/models/payment_action_create_response.rb +1 -1
  45. data/lib/modern_treasury/models/payment_action_list_params.rb +1 -2
  46. data/lib/modern_treasury/models/payment_action_list_response.rb +1 -1
  47. data/lib/modern_treasury/models/payment_action_retrieve_response.rb +1 -1
  48. data/lib/modern_treasury/models/payment_action_update_params.rb +1 -0
  49. data/lib/modern_treasury/models/payment_action_update_response.rb +1 -1
  50. data/lib/modern_treasury/models/payment_flow.rb +1 -4
  51. data/lib/modern_treasury/models/payment_order.rb +37 -3
  52. data/lib/modern_treasury/models/payment_order_create_async_params.rb +42 -21
  53. data/lib/modern_treasury/models/payment_order_create_params.rb +42 -24
  54. data/lib/modern_treasury/models/payment_order_list_params.rb +1 -0
  55. data/lib/modern_treasury/models/payment_order_type.rb +1 -0
  56. data/lib/modern_treasury/models/payment_order_update_params.rb +41 -21
  57. data/lib/modern_treasury/models/payment_reference.rb +1 -0
  58. data/lib/modern_treasury/models/reconciliation_rule.rb +1 -0
  59. data/lib/modern_treasury/models/return_object.rb +1 -0
  60. data/lib/modern_treasury/models/routing_detail.rb +1 -0
  61. data/lib/modern_treasury/models/routing_detail_create_params.rb +1 -0
  62. data/lib/modern_treasury/models/routing_number_lookup_request.rb +3 -7
  63. data/lib/modern_treasury/models/transaction.rb +1 -0
  64. data/lib/modern_treasury/models/transaction_create_params.rb +1 -0
  65. data/lib/modern_treasury/models/virtual_account_create_params.rb +3 -6
  66. data/lib/modern_treasury/models.rb +0 -2
  67. data/lib/modern_treasury/resources/ledger_transactions.rb +3 -1
  68. data/lib/modern_treasury/resources/payment_orders.rb +3 -3
  69. data/lib/modern_treasury/version.rb +1 -1
  70. data/lib/modern_treasury.rb +0 -1
  71. data/rbi/modern_treasury/errors.rbi +2 -2
  72. data/rbi/modern_treasury/models/bulk_request_create_params.rbi +141 -8
  73. data/rbi/modern_treasury/models/counterparty_create_params.rbi +5 -0
  74. data/rbi/modern_treasury/models/expected_payment_list_params.rbi +5 -0
  75. data/rbi/modern_treasury/models/expected_payment_type.rbi +1 -0
  76. data/rbi/modern_treasury/models/external_account_create_params.rbi +5 -0
  77. data/rbi/modern_treasury/models/external_account_verify_params.rbi +5 -0
  78. data/rbi/modern_treasury/models/external_account_verify_response.rbi +5 -0
  79. data/rbi/modern_treasury/models/internal_account.rbi +5 -0
  80. data/rbi/modern_treasury/models/internal_account_create_params.rbi +5 -0
  81. data/rbi/modern_treasury/models/internal_account_list_params.rbi +5 -0
  82. data/rbi/modern_treasury/models/internal_account_update_account_capability_response.rbi +5 -0
  83. data/rbi/modern_treasury/models/ledger_account_settlement.rbi +3 -3
  84. data/rbi/modern_treasury/models/ledger_transaction_list_params.rbi +84 -0
  85. data/rbi/modern_treasury/models/line_item.rbi +52 -4
  86. data/rbi/modern_treasury/models/payment_action_create_response.rbi +2 -2
  87. data/rbi/modern_treasury/models/payment_action_list_params.rbi +5 -10
  88. data/rbi/modern_treasury/models/payment_action_list_response.rbi +2 -2
  89. data/rbi/modern_treasury/models/payment_action_retrieve_response.rbi +2 -2
  90. data/rbi/modern_treasury/models/payment_action_update_params.rbi +5 -0
  91. data/rbi/modern_treasury/models/payment_action_update_response.rbi +2 -2
  92. data/rbi/modern_treasury/models/payment_order.rbi +59 -4
  93. data/rbi/modern_treasury/models/payment_order_create_async_params.rbi +66 -4
  94. data/rbi/modern_treasury/models/payment_order_create_params.rbi +63 -4
  95. data/rbi/modern_treasury/models/payment_order_list_params.rbi +5 -0
  96. data/rbi/modern_treasury/models/payment_order_type.rbi +1 -0
  97. data/rbi/modern_treasury/models/payment_order_update_params.rbi +63 -4
  98. data/rbi/modern_treasury/models/payment_reference.rbi +5 -0
  99. data/rbi/modern_treasury/models/reconciliation_rule.rbi +2 -0
  100. data/rbi/modern_treasury/models/return_object.rbi +5 -0
  101. data/rbi/modern_treasury/models/routing_detail.rbi +5 -0
  102. data/rbi/modern_treasury/models/routing_detail_create_params.rbi +5 -0
  103. data/rbi/modern_treasury/models/routing_number_lookup_request.rbi +5 -0
  104. data/rbi/modern_treasury/models/transaction.rbi +1 -0
  105. data/rbi/modern_treasury/models/transaction_create_params.rbi +5 -0
  106. data/rbi/modern_treasury/models/virtual_account_create_params.rbi +5 -0
  107. data/rbi/modern_treasury/models.rbi +0 -2
  108. data/rbi/modern_treasury/resources/ledger_transactions.rbi +3 -0
  109. data/rbi/modern_treasury/resources/payment_orders.rbi +6 -3
  110. data/sig/modern_treasury/models/bulk_request_create_params.rbs +42 -12
  111. data/sig/modern_treasury/models/counterparty_create_params.rbs +2 -0
  112. data/sig/modern_treasury/models/expected_payment_list_params.rbs +2 -0
  113. data/sig/modern_treasury/models/expected_payment_type.rbs +2 -0
  114. data/sig/modern_treasury/models/external_account_create_params.rbs +2 -0
  115. data/sig/modern_treasury/models/external_account_verify_params.rbs +2 -0
  116. data/sig/modern_treasury/models/external_account_verify_response.rbs +2 -0
  117. data/sig/modern_treasury/models/internal_account.rbs +2 -0
  118. data/sig/modern_treasury/models/internal_account_create_params.rbs +2 -0
  119. data/sig/modern_treasury/models/internal_account_list_params.rbs +2 -0
  120. data/sig/modern_treasury/models/internal_account_update_account_capability_response.rbs +2 -0
  121. data/sig/modern_treasury/models/ledger_account_settlement.rbs +4 -4
  122. data/sig/modern_treasury/models/ledger_transaction_list_params.rbs +50 -0
  123. data/sig/modern_treasury/models/line_item.rbs +16 -4
  124. data/sig/modern_treasury/models/payment_action_list_params.rbs +9 -5
  125. data/sig/modern_treasury/models/payment_action_update_params.rbs +8 -1
  126. data/sig/modern_treasury/models/payment_order.rbs +18 -4
  127. data/sig/modern_treasury/models/payment_order_create_async_params.rbs +20 -6
  128. data/sig/modern_treasury/models/payment_order_create_params.rbs +20 -6
  129. data/sig/modern_treasury/models/payment_order_list_params.rbs +2 -0
  130. data/sig/modern_treasury/models/payment_order_type.rbs +2 -0
  131. data/sig/modern_treasury/models/payment_order_update_params.rbs +20 -6
  132. data/sig/modern_treasury/models/payment_reference.rbs +2 -0
  133. data/sig/modern_treasury/models/reconciliation_rule.rbs +2 -0
  134. data/sig/modern_treasury/models/return_object.rbs +2 -0
  135. data/sig/modern_treasury/models/routing_detail.rbs +2 -0
  136. data/sig/modern_treasury/models/routing_detail_create_params.rbs +2 -0
  137. data/sig/modern_treasury/models/routing_number_lookup_request.rbs +2 -0
  138. data/sig/modern_treasury/models/transaction.rbs +2 -0
  139. data/sig/modern_treasury/models/transaction_create_params.rbs +2 -0
  140. data/sig/modern_treasury/models/virtual_account_create_params.rbs +2 -0
  141. data/sig/modern_treasury/models.rbs +0 -2
  142. data/sig/modern_treasury/resources/ledger_transactions.rbs +1 -0
  143. data/sig/modern_treasury/resources/payment_orders.rbs +3 -3
  144. metadata +2 -5
  145. data/lib/modern_treasury/models/accounting.rb +0 -30
  146. data/rbi/modern_treasury/models/accounting.rbi +0 -48
  147. data/sig/modern_treasury/models/accounting.rbs +0 -15
@@ -8,9 +8,10 @@ module ModernTreasury
8
8
  include ModernTreasury::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute accounting
11
+ # @deprecated
11
12
  #
12
- # @return [ModernTreasury::Models::Accounting, nil]
13
- optional :accounting, -> { ModernTreasury::Accounting }
13
+ # @return [ModernTreasury::Models::PaymentOrderUpdateParams::Accounting, nil]
14
+ optional :accounting, -> { ModernTreasury::PaymentOrderUpdateParams::Accounting }
14
15
 
15
16
  # @!attribute accounting_category_id
16
17
  # @deprecated
@@ -116,9 +117,7 @@ module ModernTreasury
116
117
  #
117
118
  # @return [Array<ModernTreasury::Models::PaymentOrderUpdateParams::LineItem>, nil]
118
119
  optional :line_items,
119
- -> {
120
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::PaymentOrderUpdateParams::LineItem]
121
- }
120
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::PaymentOrderUpdateParams::LineItem] }
122
121
 
123
122
  # @!attribute metadata
124
123
  # Additional data represented as key-value pairs. Both the key and value must be
@@ -278,7 +277,7 @@ module ModernTreasury
278
277
  # Some parameter documentations has been truncated, see
279
278
  # {ModernTreasury::Models::PaymentOrderUpdateParams} for more details.
280
279
  #
281
- # @param accounting [ModernTreasury::Models::Accounting]
280
+ # @param accounting [ModernTreasury::Models::PaymentOrderUpdateParams::Accounting]
282
281
  #
283
282
  # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
284
283
  #
@@ -348,6 +347,36 @@ module ModernTreasury
348
347
  #
349
348
  # @param request_options [ModernTreasury::RequestOptions, Hash{Symbol=>Object}]
350
349
 
350
+ # @deprecated
351
+ class Accounting < ModernTreasury::Internal::Type::BaseModel
352
+ # @!attribute account_id
353
+ # @deprecated
354
+ #
355
+ # The ID of one of your accounting categories. Note that these will only be
356
+ # accessible if your accounting system has been connected.
357
+ #
358
+ # @return [String, nil]
359
+ optional :account_id, String, nil?: true
360
+
361
+ # @!attribute class_id
362
+ # @deprecated
363
+ #
364
+ # The ID of one of the class objects in your accounting system. Class objects
365
+ # track segments of your business independent of client or project. Note that
366
+ # these will only be accessible if your accounting system has been connected.
367
+ #
368
+ # @return [String, nil]
369
+ optional :class_id, String, nil?: true
370
+
371
+ # @!method initialize(account_id: nil, class_id: nil)
372
+ # Some parameter documentations has been truncated, see
373
+ # {ModernTreasury::Models::PaymentOrderUpdateParams::Accounting} for more details.
374
+ #
375
+ # @param account_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
376
+ #
377
+ # @param class_id [String, nil] The ID of one of the class objects in your accounting system. Class objects trac
378
+ end
379
+
351
380
  # The party that will pay the fees for the payment order. See
352
381
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
353
382
  # differences between the options.
@@ -460,9 +489,7 @@ module ModernTreasury
460
489
  #
461
490
  # @return [Array<ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail>, nil]
462
491
  optional :account_details,
463
- -> {
464
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail]
465
- }
492
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail] }
466
493
 
467
494
  # @!attribute account_type
468
495
  # Can be `checking`, `savings` or `other`.
@@ -542,9 +569,7 @@ module ModernTreasury
542
569
  #
543
570
  # @return [Array<ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail>, nil]
544
571
  optional :routing_details,
545
- -> {
546
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail]
547
- }
572
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail] }
548
573
 
549
574
  # @!method initialize(account_details: nil, account_type: nil, contact_details: nil, external_id: nil, ledger_account: nil, metadata: nil, name: nil, party_address: nil, party_identifier: nil, party_name: nil, party_type: nil, plaid_processor_token: nil, routing_details: nil)
550
575
  # Some parameter documentations has been truncated, see
@@ -591,9 +616,7 @@ module ModernTreasury
591
616
  #
592
617
  # @return [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType, nil]
593
618
  optional :account_number_type,
594
- enum: -> {
595
- ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType
596
- }
619
+ enum: -> { ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::AccountDetail::AccountNumberType }
597
620
 
598
621
  # @!method initialize(account_number:, account_number_type: nil)
599
622
  # @param account_number [String]
@@ -646,17 +669,13 @@ module ModernTreasury
646
669
  #
647
670
  # @return [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType]
648
671
  required :routing_number_type,
649
- enum: -> {
650
- ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType
651
- }
672
+ enum: -> { ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::RoutingNumberType }
652
673
 
653
674
  # @!attribute payment_type
654
675
  #
655
676
  # @return [Symbol, ModernTreasury::Models::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType, nil]
656
677
  optional :payment_type,
657
- enum: -> {
658
- ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType
659
- }
678
+ enum: -> { ModernTreasury::PaymentOrderUpdateParams::ReceivingAccount::RoutingDetail::PaymentType }
660
679
 
661
680
  # @!method initialize(routing_number:, routing_number_type:, payment_type: nil)
662
681
  # @param routing_number [String]
@@ -710,6 +729,7 @@ module ModernTreasury
710
729
  DK_NETS = :dk_nets
711
730
  EFT = :eft
712
731
  ETHEREUM = :ethereum
732
+ GB_FPS = :gb_fps
713
733
  HU_ICS = :hu_ics
714
734
  INTERAC = :interac
715
735
  MASAV = :masav
@@ -91,6 +91,7 @@ module ModernTreasury
91
91
  BANKPROV_PAYMENT_ID = :bankprov_payment_id
92
92
  BNK_DEV_PRENOTIFICATION_ID = :bnk_dev_prenotification_id
93
93
  BNK_DEV_TRANSFER_ID = :bnk_dev_transfer_id
94
+ BNY_MELLON_TRANSACTION_REFERENCE_NUMBER = :bny_mellon_transaction_reference_number
94
95
  BOFA_END_TO_END_ID = :bofa_end_to_end_id
95
96
  BOFA_TRANSACTION_ID = :bofa_transaction_id
96
97
  BRALE_TRANSFER_ID = :brale_transfer_id
@@ -124,6 +124,7 @@ module ModernTreasury
124
124
  DK_NETS = :dk_nets
125
125
  EFT = :eft
126
126
  ETHEREUM = :ethereum
127
+ GB_FPS = :gb_fps
127
128
  HU_ICS = :hu_ics
128
129
  INTERAC = :interac
129
130
  MASAV = :masav
@@ -462,6 +462,7 @@ module ModernTreasury
462
462
  BANKPROV_PAYMENT_ID = :bankprov_payment_id
463
463
  BNK_DEV_PRENOTIFICATION_ID = :bnk_dev_prenotification_id
464
464
  BNK_DEV_TRANSFER_ID = :bnk_dev_transfer_id
465
+ BNY_MELLON_TRANSACTION_REFERENCE_NUMBER = :bny_mellon_transaction_reference_number
465
466
  BOFA_END_TO_END_ID = :bofa_end_to_end_id
466
467
  BOFA_TRANSACTION_ID = :bofa_transaction_id
467
468
  BRALE_TRANSFER_ID = :brale_transfer_id
@@ -113,6 +113,7 @@ module ModernTreasury
113
113
  DK_NETS = :dk_nets
114
114
  EFT = :eft
115
115
  ETHEREUM = :ethereum
116
+ GB_FPS = :gb_fps
116
117
  HU_ICS = :hu_ics
117
118
  INTERAC = :interac
118
119
  MASAV = :masav
@@ -106,6 +106,7 @@ module ModernTreasury
106
106
  DK_NETS = :dk_nets
107
107
  EFT = :eft
108
108
  ETHEREUM = :ethereum
109
+ GB_FPS = :gb_fps
109
110
  HU_ICS = :hu_ics
110
111
  INTERAC = :interac
111
112
  MASAV = :masav
@@ -29,10 +29,7 @@ module ModernTreasury
29
29
  # routing numbers '123456789' and 'GRINUST0XXX' respectively.
30
30
  #
31
31
  # @return [Symbol, ModernTreasury::Models::RoutingNumberLookupRequest::RoutingNumberType, nil]
32
- optional :routing_number_type,
33
- enum: -> {
34
- ModernTreasury::RoutingNumberLookupRequest::RoutingNumberType
35
- }
32
+ optional :routing_number_type, enum: -> { ModernTreasury::RoutingNumberLookupRequest::RoutingNumberType }
36
33
 
37
34
  # @!attribute sanctions
38
35
  # An object containing key-value pairs, each with a sanctions list as the key and
@@ -48,9 +45,7 @@ module ModernTreasury
48
45
  #
49
46
  # @return [Array<Symbol, ModernTreasury::Models::RoutingNumberLookupRequest::SupportedPaymentType>, nil]
50
47
  optional :supported_payment_types,
51
- -> {
52
- ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::RoutingNumberLookupRequest::SupportedPaymentType]
53
- }
48
+ -> { ModernTreasury::Internal::Type::ArrayOf[enum: ModernTreasury::RoutingNumberLookupRequest::SupportedPaymentType] }
54
49
 
55
50
  # @!method initialize(bank_address: nil, bank_name: nil, routing_number: nil, routing_number_type: nil, sanctions: nil, supported_payment_types: nil)
56
51
  # Some parameter documentations has been truncated, see
@@ -106,6 +101,7 @@ module ModernTreasury
106
101
  DK_NETS = :dk_nets
107
102
  EFT = :eft
108
103
  ETHEREUM = :ethereum
104
+ GB_FPS = :gb_fps
109
105
  HU_ICS = :hu_ics
110
106
  INTERAC = :interac
111
107
  MASAV = :masav
@@ -242,6 +242,7 @@ module ModernTreasury
242
242
  DK_NETS = :dk_nets
243
243
  EFT = :eft
244
244
  ETHEREUM = :ethereum
245
+ GB_FPS = :gb_fps
245
246
  HU_ICS = :hu_ics
246
247
  INTERAC = :interac
247
248
  MASAV = :masav
@@ -126,6 +126,7 @@ module ModernTreasury
126
126
  DK_NETS = :dk_nets
127
127
  EFT = :eft
128
128
  ETHEREUM = :ethereum
129
+ GB_FPS = :gb_fps
129
130
  HU_ICS = :hu_ics
130
131
  INTERAC = :interac
131
132
  MASAV = :masav
@@ -24,9 +24,7 @@ module ModernTreasury
24
24
  #
25
25
  # @return [Array<ModernTreasury::Models::VirtualAccountCreateParams::AccountDetail>, nil]
26
26
  optional :account_details,
27
- -> {
28
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::VirtualAccountCreateParams::AccountDetail]
29
- }
27
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::VirtualAccountCreateParams::AccountDetail] }
30
28
 
31
29
  # @!attribute counterparty_id
32
30
  # The ID of the counterparty that the virtual account belongs to.
@@ -76,9 +74,7 @@ module ModernTreasury
76
74
  #
77
75
  # @return [Array<ModernTreasury::Models::VirtualAccountCreateParams::RoutingDetail>, nil]
78
76
  optional :routing_details,
79
- -> {
80
- ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::VirtualAccountCreateParams::RoutingDetail]
81
- }
77
+ -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::VirtualAccountCreateParams::RoutingDetail] }
82
78
 
83
79
  # @!method initialize(internal_account_id:, name:, account_details: nil, counterparty_id: nil, credit_ledger_account_id: nil, debit_ledger_account_id: nil, description: nil, ledger_account: nil, metadata: nil, routing_details: nil, request_options: {})
84
80
  # Some parameter documentations has been truncated, see
@@ -247,6 +243,7 @@ module ModernTreasury
247
243
  DK_NETS = :dk_nets
248
244
  EFT = :eft
249
245
  ETHEREUM = :ethereum
246
+ GB_FPS = :gb_fps
250
247
  HU_ICS = :hu_ics
251
248
  INTERAC = :interac
252
249
  MASAV = :masav
@@ -62,8 +62,6 @@ module ModernTreasury
62
62
 
63
63
  AccountDetailRetrieveParams = ModernTreasury::Models::AccountDetailRetrieveParams
64
64
 
65
- Accounting = ModernTreasury::Models::Accounting
66
-
67
65
  AccountsType = ModernTreasury::Models::AccountsType
68
66
 
69
67
  Address = ModernTreasury::Models::Address
@@ -111,12 +111,14 @@ module ModernTreasury
111
111
  #
112
112
  # Get a list of ledger transactions.
113
113
  #
114
- # @overload list(id: nil, after_cursor: nil, effective_at: nil, effective_date: nil, external_id: nil, ledger_account_category_id: nil, ledger_account_id: nil, ledger_account_settlement_id: nil, ledger_id: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil, order_by: nil, partially_posts_ledger_transaction_id: nil, per_page: nil, posted_at: nil, reverses_ledger_transaction_id: nil, status: nil, updated_at: nil, request_options: {})
114
+ # @overload list(id: nil, after_cursor: nil, amount: nil, effective_at: nil, effective_date: nil, external_id: nil, ledger_account_category_id: nil, ledger_account_id: nil, ledger_account_settlement_id: nil, ledger_id: nil, ledgerable_id: nil, ledgerable_type: nil, metadata: nil, order_by: nil, partially_posts_ledger_transaction_id: nil, per_page: nil, posted_at: nil, reverses_ledger_transaction_id: nil, status: nil, updated_at: nil, request_options: {})
115
115
  #
116
116
  # @param id [Array<String>] If you have specific IDs to retrieve in bulk, you can pass them as query paramet
117
117
  #
118
118
  # @param after_cursor [String, nil]
119
119
  #
120
+ # @param amount [ModernTreasury::Models::LedgerTransactionListParams::Amount] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by amount.
121
+ #
120
122
  # @param effective_at [Hash{Symbol=>Time}] Use "gt" (>), "gte" (>=), "lt" (<), "lte" (<=), or "eq" (=) to filter by effecti
121
123
  #
122
124
  # @param effective_date [Hash{Symbol=>Time}] Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by effecti
@@ -21,7 +21,7 @@ module ModernTreasury
21
21
  #
22
22
  # @param type [Symbol, ModernTreasury::Models::PaymentOrderType] One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sep
23
23
  #
24
- # @param accounting [ModernTreasury::Models::Accounting]
24
+ # @param accounting [ModernTreasury::Models::PaymentOrderCreateParams::Accounting]
25
25
  #
26
26
  # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
27
27
  #
@@ -129,7 +129,7 @@ module ModernTreasury
129
129
  #
130
130
  # @param id [String]
131
131
  #
132
- # @param accounting [ModernTreasury::Models::Accounting]
132
+ # @param accounting [ModernTreasury::Models::PaymentOrderUpdateParams::Accounting]
133
133
  #
134
134
  # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
135
135
  #
@@ -288,7 +288,7 @@ module ModernTreasury
288
288
  #
289
289
  # @param type [Symbol, ModernTreasury::Models::PaymentOrderType] One of `ach`, `se_bankgirot`, `eft`, `wire`, `check`, `sen`, `book`, `rtp`, `sep
290
290
  #
291
- # @param accounting [ModernTreasury::Models::Accounting]
291
+ # @param accounting [ModernTreasury::Models::PaymentOrderCreateAsyncParams::Accounting]
292
292
  #
293
293
  # @param accounting_category_id [String, nil] The ID of one of your accounting categories. Note that these will only be access
294
294
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ModernTreasury
4
- VERSION = "0.4.0"
4
+ VERSION = "0.6.0"
5
5
  end
@@ -63,7 +63,6 @@ require_relative "modern_treasury/models/account_detail_create_params"
63
63
  require_relative "modern_treasury/models/account_detail_delete_params"
64
64
  require_relative "modern_treasury/models/account_detail_list_params"
65
65
  require_relative "modern_treasury/models/account_detail_retrieve_params"
66
- require_relative "modern_treasury/models/accounting"
67
66
  require_relative "modern_treasury/models/accounts_type"
68
67
  require_relative "modern_treasury/models/address"
69
68
  require_relative "modern_treasury/models/address_request"
@@ -59,10 +59,10 @@ module ModernTreasury
59
59
  end
60
60
 
61
61
  class APIConnectionError < ModernTreasury::Errors::APIError
62
- sig { void }
62
+ sig { returns(NilClass) }
63
63
  attr_accessor :status
64
64
 
65
- sig { void }
65
+ sig { returns(NilClass) }
66
66
  attr_accessor :body
67
67
 
68
68
  # @api private
@@ -274,10 +274,21 @@ module ModernTreasury
274
274
  sig { returns(ModernTreasury::PaymentOrderType::OrSymbol) }
275
275
  attr_accessor :type
276
276
 
277
- sig { returns(T.nilable(ModernTreasury::Accounting)) }
277
+ sig do
278
+ returns(
279
+ T.nilable(
280
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting
281
+ )
282
+ )
283
+ end
278
284
  attr_reader :accounting
279
285
 
280
- sig { params(accounting: ModernTreasury::Accounting::OrHash).void }
286
+ sig do
287
+ params(
288
+ accounting:
289
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting::OrHash
290
+ ).void
291
+ end
281
292
  attr_writer :accounting
282
293
 
283
294
  # The ID of one of your accounting categories. Note that these will only be
@@ -558,7 +569,8 @@ module ModernTreasury
558
569
  ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Direction::OrSymbol,
559
570
  originating_account_id: String,
560
571
  type: ModernTreasury::PaymentOrderType::OrSymbol,
561
- accounting: ModernTreasury::Accounting::OrHash,
572
+ accounting:
573
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting::OrHash,
562
574
  accounting_category_id: T.nilable(String),
563
575
  accounting_ledger_class_id: T.nilable(String),
564
576
  charge_bearer:
@@ -737,7 +749,8 @@ module ModernTreasury
737
749
  ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Direction::OrSymbol,
738
750
  originating_account_id: String,
739
751
  type: ModernTreasury::PaymentOrderType::OrSymbol,
740
- accounting: ModernTreasury::Accounting,
752
+ accounting:
753
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting,
741
754
  accounting_category_id: T.nilable(String),
742
755
  accounting_ledger_class_id: T.nilable(String),
743
756
  charge_bearer:
@@ -826,6 +839,52 @@ module ModernTreasury
826
839
  end
827
840
  end
828
841
 
842
+ class Accounting < ModernTreasury::Internal::Type::BaseModel
843
+ OrHash =
844
+ T.type_alias do
845
+ T.any(
846
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::Accounting,
847
+ ModernTreasury::Internal::AnyHash
848
+ )
849
+ end
850
+
851
+ # The ID of one of your accounting categories. Note that these will only be
852
+ # accessible if your accounting system has been connected.
853
+ sig { returns(T.nilable(String)) }
854
+ attr_accessor :account_id
855
+
856
+ # The ID of one of the class objects in your accounting system. Class objects
857
+ # track segments of your business independent of client or project. Note that
858
+ # these will only be accessible if your accounting system has been connected.
859
+ sig { returns(T.nilable(String)) }
860
+ attr_accessor :class_id
861
+
862
+ sig do
863
+ params(
864
+ account_id: T.nilable(String),
865
+ class_id: T.nilable(String)
866
+ ).returns(T.attached_class)
867
+ end
868
+ def self.new(
869
+ # The ID of one of your accounting categories. Note that these will only be
870
+ # accessible if your accounting system has been connected.
871
+ account_id: nil,
872
+ # The ID of one of the class objects in your accounting system. Class objects
873
+ # track segments of your business independent of client or project. Note that
874
+ # these will only be accessible if your accounting system has been connected.
875
+ class_id: nil
876
+ )
877
+ end
878
+
879
+ sig do
880
+ override.returns(
881
+ { account_id: T.nilable(String), class_id: T.nilable(String) }
882
+ )
883
+ end
884
+ def to_hash
885
+ end
886
+ end
887
+
829
888
  # The party that will pay the fees for the payment order. See
830
889
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
831
890
  # differences between the options.
@@ -1745,6 +1804,11 @@ module ModernTreasury
1745
1804
  :ethereum,
1746
1805
  ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1747
1806
  )
1807
+ GB_FPS =
1808
+ T.let(
1809
+ :gb_fps,
1810
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderAsyncCreateRequest::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
1811
+ )
1748
1812
  HU_ICS =
1749
1813
  T.let(
1750
1814
  :hu_ics,
@@ -2473,6 +2537,11 @@ module ModernTreasury
2473
2537
  :ethereum,
2474
2538
  ModernTreasury::BulkRequestCreateParams::Resource::TransactionCreateRequest::Type::TaggedSymbol
2475
2539
  )
2540
+ GB_FPS =
2541
+ T.let(
2542
+ :gb_fps,
2543
+ ModernTreasury::BulkRequestCreateParams::Resource::TransactionCreateRequest::Type::TaggedSymbol
2544
+ )
2476
2545
  HU_ICS =
2477
2546
  T.let(
2478
2547
  :hu_ics,
@@ -2640,10 +2709,21 @@ module ModernTreasury
2640
2709
  sig { params(id: String).void }
2641
2710
  attr_writer :id
2642
2711
 
2643
- sig { returns(T.nilable(ModernTreasury::Accounting)) }
2712
+ sig do
2713
+ returns(
2714
+ T.nilable(
2715
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting
2716
+ )
2717
+ )
2718
+ end
2644
2719
  attr_reader :accounting
2645
2720
 
2646
- sig { params(accounting: ModernTreasury::Accounting::OrHash).void }
2721
+ sig do
2722
+ params(
2723
+ accounting:
2724
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting::OrHash
2725
+ ).void
2726
+ end
2647
2727
  attr_writer :accounting
2648
2728
 
2649
2729
  # The ID of one of your accounting categories. Note that these will only be
@@ -2962,7 +3042,8 @@ module ModernTreasury
2962
3042
  sig do
2963
3043
  params(
2964
3044
  id: String,
2965
- accounting: ModernTreasury::Accounting::OrHash,
3045
+ accounting:
3046
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting::OrHash,
2966
3047
  accounting_category_id: T.nilable(String),
2967
3048
  accounting_ledger_class_id: T.nilable(String),
2968
3049
  amount: Integer,
@@ -3143,7 +3224,8 @@ module ModernTreasury
3143
3224
  override.returns(
3144
3225
  {
3145
3226
  id: String,
3146
- accounting: ModernTreasury::Accounting,
3227
+ accounting:
3228
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting,
3147
3229
  accounting_category_id: T.nilable(String),
3148
3230
  accounting_ledger_class_id: T.nilable(String),
3149
3231
  amount: Integer,
@@ -3198,6 +3280,52 @@ module ModernTreasury
3198
3280
  def to_hash
3199
3281
  end
3200
3282
 
3283
+ class Accounting < ModernTreasury::Internal::Type::BaseModel
3284
+ OrHash =
3285
+ T.type_alias do
3286
+ T.any(
3287
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::Accounting,
3288
+ ModernTreasury::Internal::AnyHash
3289
+ )
3290
+ end
3291
+
3292
+ # The ID of one of your accounting categories. Note that these will only be
3293
+ # accessible if your accounting system has been connected.
3294
+ sig { returns(T.nilable(String)) }
3295
+ attr_accessor :account_id
3296
+
3297
+ # The ID of one of the class objects in your accounting system. Class objects
3298
+ # track segments of your business independent of client or project. Note that
3299
+ # these will only be accessible if your accounting system has been connected.
3300
+ sig { returns(T.nilable(String)) }
3301
+ attr_accessor :class_id
3302
+
3303
+ sig do
3304
+ params(
3305
+ account_id: T.nilable(String),
3306
+ class_id: T.nilable(String)
3307
+ ).returns(T.attached_class)
3308
+ end
3309
+ def self.new(
3310
+ # The ID of one of your accounting categories. Note that these will only be
3311
+ # accessible if your accounting system has been connected.
3312
+ account_id: nil,
3313
+ # The ID of one of the class objects in your accounting system. Class objects
3314
+ # track segments of your business independent of client or project. Note that
3315
+ # these will only be accessible if your accounting system has been connected.
3316
+ class_id: nil
3317
+ )
3318
+ end
3319
+
3320
+ sig do
3321
+ override.returns(
3322
+ { account_id: T.nilable(String), class_id: T.nilable(String) }
3323
+ )
3324
+ end
3325
+ def to_hash
3326
+ end
3327
+ end
3328
+
3201
3329
  # The party that will pay the fees for the payment order. See
3202
3330
  # https://docs.moderntreasury.com/payments/docs/charge-bearer to understand the
3203
3331
  # differences between the options.
@@ -4155,6 +4283,11 @@ module ModernTreasury
4155
4283
  :ethereum,
4156
4284
  ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
4157
4285
  )
4286
+ GB_FPS =
4287
+ T.let(
4288
+ :gb_fps,
4289
+ ModernTreasury::BulkRequestCreateParams::Resource::PaymentOrderUpdateRequestWithID::ReceivingAccount::RoutingDetail::PaymentType::TaggedSymbol
4290
+ )
4158
4291
  HU_ICS =
4159
4292
  T.let(
4160
4293
  :hu_ics,
@@ -992,6 +992,11 @@ module ModernTreasury
992
992
  :ethereum,
993
993
  ModernTreasury::CounterpartyCreateParams::Account::RoutingDetail::PaymentType::TaggedSymbol
994
994
  )
995
+ GB_FPS =
996
+ T.let(
997
+ :gb_fps,
998
+ ModernTreasury::CounterpartyCreateParams::Account::RoutingDetail::PaymentType::TaggedSymbol
999
+ )
995
1000
  HU_ICS =
996
1001
  T.let(
997
1002
  :hu_ics,
@@ -305,6 +305,11 @@ module ModernTreasury
305
305
  :ethereum,
306
306
  ModernTreasury::ExpectedPaymentListParams::Type::TaggedSymbol
307
307
  )
308
+ GB_FPS =
309
+ T.let(
310
+ :gb_fps,
311
+ ModernTreasury::ExpectedPaymentListParams::Type::TaggedSymbol
312
+ )
308
313
  HU_ICS =
309
314
  T.let(
310
315
  :hu_ics,
@@ -27,6 +27,7 @@ module ModernTreasury
27
27
  EFT = T.let(:eft, ModernTreasury::ExpectedPaymentType::TaggedSymbol)
28
28
  ETHEREUM =
29
29
  T.let(:ethereum, ModernTreasury::ExpectedPaymentType::TaggedSymbol)
30
+ GB_FPS = T.let(:gb_fps, ModernTreasury::ExpectedPaymentType::TaggedSymbol)
30
31
  HU_ICS = T.let(:hu_ics, ModernTreasury::ExpectedPaymentType::TaggedSymbol)
31
32
  INTERAC =
32
33
  T.let(:interac, ModernTreasury::ExpectedPaymentType::TaggedSymbol)
@@ -694,6 +694,11 @@ module ModernTreasury
694
694
  :ethereum,
695
695
  ModernTreasury::ExternalAccountCreateParams::RoutingDetail::PaymentType::TaggedSymbol
696
696
  )
697
+ GB_FPS =
698
+ T.let(
699
+ :gb_fps,
700
+ ModernTreasury::ExternalAccountCreateParams::RoutingDetail::PaymentType::TaggedSymbol
701
+ )
697
702
  HU_ICS =
698
703
  T.let(
699
704
  :hu_ics,
@@ -196,6 +196,11 @@ module ModernTreasury
196
196
  :ethereum,
197
197
  ModernTreasury::ExternalAccountVerifyParams::PaymentType::TaggedSymbol
198
198
  )
199
+ GB_FPS =
200
+ T.let(
201
+ :gb_fps,
202
+ ModernTreasury::ExternalAccountVerifyParams::PaymentType::TaggedSymbol
203
+ )
199
204
  HU_ICS =
200
205
  T.let(
201
206
  :hu_ics,
@@ -215,6 +215,11 @@ module ModernTreasury
215
215
  :ethereum,
216
216
  ModernTreasury::Models::ExternalAccountVerifyResponse::ExternalAccountVerificationAttempt::PaymentType::TaggedSymbol
217
217
  )
218
+ GB_FPS =
219
+ T.let(
220
+ :gb_fps,
221
+ ModernTreasury::Models::ExternalAccountVerifyResponse::ExternalAccountVerificationAttempt::PaymentType::TaggedSymbol
222
+ )
218
223
  HU_ICS =
219
224
  T.let(
220
225
  :hu_ics,
@@ -402,6 +402,11 @@ module ModernTreasury
402
402
  :ethereum,
403
403
  ModernTreasury::InternalAccount::AccountCapability::PaymentType::TaggedSymbol
404
404
  )
405
+ GB_FPS =
406
+ T.let(
407
+ :gb_fps,
408
+ ModernTreasury::InternalAccount::AccountCapability::PaymentType::TaggedSymbol
409
+ )
405
410
  HU_ICS =
406
411
  T.let(
407
412
  :hu_ics,