lithic 0.1.0.pre.alpha.39 → 0.1.0.pre.alpha.41

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 (207) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +8 -0
  5. data/lib/lithic/internal/transport/base_client.rb +1 -1
  6. data/lib/lithic/internal/transport/pooled_net_requester.rb +1 -9
  7. data/lib/lithic/internal/type/array_of.rb +1 -0
  8. data/lib/lithic/internal/type/base_model.rb +3 -1
  9. data/lib/lithic/internal/type/converter.rb +27 -0
  10. data/lib/lithic/internal/type/hash_of.rb +1 -0
  11. data/lib/lithic/internal/type/union.rb +9 -7
  12. data/lib/lithic/internal/util.rb +1 -1
  13. data/lib/lithic/models/account.rb +88 -1
  14. data/lib/lithic/models/account_activity_list_params.rb +156 -0
  15. data/lib/lithic/models/account_activity_list_response.rb +1435 -0
  16. data/lib/lithic/models/account_activity_retrieve_transaction_params.rb +14 -0
  17. data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +1451 -0
  18. data/lib/lithic/models/account_holder.rb +16 -19
  19. data/lib/lithic/models/account_holder_create_params.rb +41 -47
  20. data/lib/lithic/models/account_holder_simulate_enrollment_review_params.rb +1 -3
  21. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +25 -20
  22. data/lib/lithic/models/account_holder_update_params.rb +2 -6
  23. data/lib/lithic/models/account_holder_update_response.rb +25 -20
  24. data/lib/lithic/models/account_update_params.rb +86 -1
  25. data/lib/lithic/models/aggregate_balance.rb +1 -0
  26. data/lib/lithic/models/aggregate_balance_list_params.rb +1 -0
  27. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +5 -1
  28. data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +12 -22
  29. data/lib/lithic/models/auth_rules/v2_list_params.rb +1 -0
  30. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +3 -25
  31. data/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb +226 -16
  32. data/lib/lithic/models/balance.rb +1 -0
  33. data/lib/lithic/models/balance_list_params.rb +1 -0
  34. data/lib/lithic/models/book_transfer_create_params.rb +34 -6
  35. data/lib/lithic/models/book_transfer_response.rb +124 -28
  36. data/lib/lithic/models/card_create_params.rb +90 -1
  37. data/lib/lithic/models/card_program.rb +10 -1
  38. data/lib/lithic/models/card_update_params.rb +98 -1
  39. data/lib/lithic/models/cards/balance_list_response.rb +1 -0
  40. data/lib/lithic/models/document.rb +1 -3
  41. data/lib/lithic/models/events/subscription_create_params.rb +1 -3
  42. data/lib/lithic/models/events/subscription_update_params.rb +1 -3
  43. data/lib/lithic/models/external_bank_account_list_params.rb +2 -6
  44. data/lib/lithic/models/external_payment.rb +89 -48
  45. data/lib/lithic/models/external_resource.rb +34 -0
  46. data/lib/lithic/models/external_resource_type.rb +18 -0
  47. data/lib/lithic/models/financial_account.rb +1 -0
  48. data/lib/lithic/models/financial_account_list_params.rb +1 -0
  49. data/lib/lithic/models/financial_accounts/balance_list_response.rb +1 -0
  50. data/lib/lithic/models/financial_accounts/loan_tape.rb +5 -18
  51. data/lib/lithic/models/financial_accounts/statement.rb +3 -10
  52. data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +2 -7
  53. data/lib/lithic/models/financial_transaction.rb +2 -0
  54. data/lib/lithic/models/instance_financial_account_type.rb +1 -0
  55. data/lib/lithic/models/kyb.rb +2 -2
  56. data/lib/lithic/models/management_operation_create_params.rb +30 -1
  57. data/lib/lithic/models/management_operation_transaction.rb +100 -52
  58. data/lib/lithic/models/network_program.rb +41 -0
  59. data/lib/lithic/models/network_program_list_params.rb +43 -0
  60. data/lib/lithic/models/network_program_retrieve_params.rb +14 -0
  61. data/lib/lithic/models/non_pci_card.rb +88 -1
  62. data/lib/lithic/models/payment.rb +60 -1
  63. data/lib/lithic/models/payment_simulate_action_params.rb +1 -0
  64. data/lib/lithic/models/reports/settlement_list_details_params.rb +2 -2
  65. data/lib/lithic/models/settlement_detail.rb +1 -0
  66. data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +145 -12
  67. data/lib/lithic/models/three_ds/authentication_simulate_params.rb +1 -4
  68. data/lib/lithic/models/tokenization.rb +1 -1
  69. data/lib/lithic/models/transaction.rb +31 -20
  70. data/lib/lithic/models/transactions/events/enhanced_data.rb +3 -11
  71. data/lib/lithic/models/transfer.rb +2 -0
  72. data/lib/lithic/models/wire_party_details.rb +40 -0
  73. data/lib/lithic/models.rb +16 -0
  74. data/lib/lithic/resources/account_activity.rb +80 -0
  75. data/lib/lithic/resources/account_holders.rb +9 -9
  76. data/lib/lithic/resources/accounts.rb +5 -1
  77. data/lib/lithic/resources/book_transfers.rb +7 -3
  78. data/lib/lithic/resources/cards.rb +12 -2
  79. data/lib/lithic/resources/management_operations.rb +13 -1
  80. data/lib/lithic/resources/network_programs.rb +64 -0
  81. data/lib/lithic/resources/reports/settlement.rb +1 -1
  82. data/lib/lithic/resources/tokenizations.rb +2 -2
  83. data/lib/lithic/version.rb +1 -1
  84. data/lib/lithic.rb +13 -2
  85. data/rbi/lithic/client.rbi +6 -0
  86. data/rbi/lithic/errors.rbi +2 -2
  87. data/rbi/lithic/internal/transport/base_client.rbi +1 -1
  88. data/rbi/lithic/internal/type/converter.rbi +46 -0
  89. data/rbi/lithic/internal/type/union.rbi +7 -2
  90. data/rbi/lithic/models/account.rbi +131 -0
  91. data/rbi/lithic/models/account_activity_list_params.rbi +359 -0
  92. data/rbi/lithic/models/account_activity_list_response.rbi +3367 -0
  93. data/rbi/lithic/models/account_activity_retrieve_transaction_params.rbi +30 -0
  94. data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +3369 -0
  95. data/rbi/lithic/models/account_holder.rbi +21 -23
  96. data/rbi/lithic/models/account_holder_create_params.rbi +87 -65
  97. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +36 -30
  98. data/rbi/lithic/models/account_holder_update_response.rbi +36 -30
  99. data/rbi/lithic/models/account_update_params.rbi +159 -0
  100. data/rbi/lithic/models/aggregate_balance.rbi +5 -0
  101. data/rbi/lithic/models/aggregate_balance_list_params.rbi +5 -0
  102. data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +20 -0
  103. data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +26 -15
  104. data/rbi/lithic/models/auth_rules/v2_list_params.rbi +2 -0
  105. data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +18 -25
  106. data/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi +527 -31
  107. data/rbi/lithic/models/balance.rbi +2 -0
  108. data/rbi/lithic/models/balance_list_params.rbi +5 -0
  109. data/rbi/lithic/models/book_transfer_create_params.rbi +75 -5
  110. data/rbi/lithic/models/book_transfer_response.rbi +320 -38
  111. data/rbi/lithic/models/card_create_params.rbi +190 -0
  112. data/rbi/lithic/models/card_program.rbi +13 -0
  113. data/rbi/lithic/models/card_update_params.rbi +168 -0
  114. data/rbi/lithic/models/cards/balance_list_response.rbi +5 -0
  115. data/rbi/lithic/models/external_payment.rbi +147 -60
  116. data/rbi/lithic/models/external_resource.rbi +57 -0
  117. data/rbi/lithic/models/external_resource_type.rbi +26 -0
  118. data/rbi/lithic/models/financial_account.rbi +5 -0
  119. data/rbi/lithic/models/financial_account_list_params.rbi +5 -0
  120. data/rbi/lithic/models/financial_accounts/balance_list_response.rbi +5 -0
  121. data/rbi/lithic/models/financial_transaction.rbi +1 -0
  122. data/rbi/lithic/models/instance_financial_account_type.rbi +5 -0
  123. data/rbi/lithic/models/kyb.rbi +2 -2
  124. data/rbi/lithic/models/management_operation_create_params.rbi +59 -0
  125. data/rbi/lithic/models/management_operation_transaction.rbi +230 -84
  126. data/rbi/lithic/models/network_program.rbi +61 -0
  127. data/rbi/lithic/models/network_program_list_params.rbi +72 -0
  128. data/rbi/lithic/models/network_program_retrieve_params.rbi +27 -0
  129. data/rbi/lithic/models/non_pci_card.rbi +133 -3
  130. data/rbi/lithic/models/payment.rbi +103 -3
  131. data/rbi/lithic/models/payment_simulate_action_params.rbi +5 -0
  132. data/rbi/lithic/models/reports/settlement_list_details_params.rbi +2 -2
  133. data/rbi/lithic/models/settlement_detail.rbi +2 -0
  134. data/rbi/lithic/models/three_ds/authentication_retrieve_response.rbi +222 -19
  135. data/rbi/lithic/models/transaction.rbi +23 -31
  136. data/rbi/lithic/models/transfer.rbi +1 -0
  137. data/rbi/lithic/models/wire_party_details.rbi +61 -0
  138. data/rbi/lithic/models.rbi +17 -0
  139. data/rbi/lithic/resources/account_activity.rbi +80 -0
  140. data/rbi/lithic/resources/account_holders.rbi +28 -29
  141. data/rbi/lithic/resources/accounts.rbi +32 -0
  142. data/rbi/lithic/resources/book_transfers.rbi +9 -2
  143. data/rbi/lithic/resources/cards.rbi +70 -0
  144. data/rbi/lithic/resources/management_operations.rbi +4 -0
  145. data/rbi/lithic/resources/network_programs.rbi +48 -0
  146. data/rbi/lithic/resources/reports/settlement.rbi +1 -1
  147. data/rbi/lithic/resources/tokenizations.rbi +1 -1
  148. data/sig/lithic/client.rbs +4 -0
  149. data/sig/lithic/internal/transport/base_client.rbs +1 -1
  150. data/sig/lithic/internal/type/converter.rbs +17 -0
  151. data/sig/lithic/internal/type/union.rbs +2 -2
  152. data/sig/lithic/models/account.rbs +41 -0
  153. data/sig/lithic/models/account_activity_list_params.rbs +173 -0
  154. data/sig/lithic/models/account_activity_list_response.rbs +1353 -0
  155. data/sig/lithic/models/account_activity_retrieve_transaction_params.rbs +15 -0
  156. data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +1353 -0
  157. data/sig/lithic/models/account_holder_create_params.rbs +33 -19
  158. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +10 -3
  159. data/sig/lithic/models/account_holder_update_response.rbs +10 -3
  160. data/sig/lithic/models/account_update_params.rbs +41 -0
  161. data/sig/lithic/models/aggregate_balance.rbs +2 -1
  162. data/sig/lithic/models/aggregate_balance_list_params.rbs +2 -1
  163. data/sig/lithic/models/auth_rules/auth_rule_condition.rbs +8 -0
  164. data/sig/lithic/models/auth_rules/conditional_3ds_action_parameters.rbs +8 -0
  165. data/sig/lithic/models/auth_rules/v2_list_params.rbs +2 -1
  166. data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +4 -14
  167. data/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs +212 -7
  168. data/sig/lithic/models/balance.rbs +2 -1
  169. data/sig/lithic/models/balance_list_params.rbs +2 -1
  170. data/sig/lithic/models/book_transfer_create_params.rbs +30 -1
  171. data/sig/lithic/models/book_transfer_response.rbs +134 -15
  172. data/sig/lithic/models/card_create_params.rbs +47 -0
  173. data/sig/lithic/models/card_program.rbs +7 -0
  174. data/sig/lithic/models/card_update_params.rbs +55 -1
  175. data/sig/lithic/models/cards/balance_list_response.rbs +2 -1
  176. data/sig/lithic/models/external_payment.rbs +91 -40
  177. data/sig/lithic/models/external_resource.rbs +32 -0
  178. data/sig/lithic/models/external_resource_type.rbs +16 -0
  179. data/sig/lithic/models/financial_account.rbs +2 -0
  180. data/sig/lithic/models/financial_account_list_params.rbs +2 -1
  181. data/sig/lithic/models/financial_accounts/balance_list_response.rbs +2 -1
  182. data/sig/lithic/models/instance_financial_account_type.rbs +2 -0
  183. data/sig/lithic/models/management_operation_create_params.rbs +20 -0
  184. data/sig/lithic/models/management_operation_transaction.rbs +98 -42
  185. data/sig/lithic/models/network_program.rbs +35 -0
  186. data/sig/lithic/models/network_program_list_params.rbs +38 -0
  187. data/sig/lithic/models/network_program_retrieve_params.rbs +15 -0
  188. data/sig/lithic/models/non_pci_card.rbs +55 -3
  189. data/sig/lithic/models/payment.rbs +61 -3
  190. data/sig/lithic/models/payment_simulate_action_params.rbs +2 -0
  191. data/sig/lithic/models/settlement_detail.rbs +2 -0
  192. data/sig/lithic/models/three_ds/authentication_retrieve_response.rbs +90 -3
  193. data/sig/lithic/models/transaction.rbs +2 -6
  194. data/sig/lithic/models/wire_party_details.rbs +35 -0
  195. data/sig/lithic/models.rbs +16 -0
  196. data/sig/lithic/resources/account_activity.rbs +27 -0
  197. data/sig/lithic/resources/account_holders.rbs +3 -3
  198. data/sig/lithic/resources/accounts.rbs +2 -0
  199. data/sig/lithic/resources/book_transfers.rbs +2 -0
  200. data/sig/lithic/resources/cards.rbs +5 -0
  201. data/sig/lithic/resources/management_operations.rbs +1 -0
  202. data/sig/lithic/resources/network_programs.rbs +19 -0
  203. data/sig/lithic/resources/tokenizations.rbs +1 -1
  204. metadata +38 -5
  205. data/lib/lithic/models/tokenization_retrieve_response.rb +0 -16
  206. data/rbi/lithic/models/tokenization_retrieve_response.rbi +0 -31
  207. data/sig/lithic/models/tokenization_retrieve_response.rbs +0 -15
@@ -11,7 +11,7 @@ module Lithic
11
11
  T.any(Lithic::BookTransferCreateParams, Lithic::Internal::AnyHash)
12
12
  end
13
13
 
14
- # Amount to be transferred in the currencys smallest unit (e.g., cents for USD).
14
+ # Amount to be transferred in the currency's smallest unit (e.g., cents for USD).
15
15
  # This should always be a positive value.
16
16
  sig { returns(Integer) }
17
17
  attr_accessor :amount
@@ -34,7 +34,7 @@ module Lithic
34
34
  sig { returns(String) }
35
35
  attr_accessor :to_financial_account_token
36
36
 
37
- # Type of book_transfer
37
+ # Type of the book transfer
38
38
  sig { returns(Lithic::BookTransferCreateParams::Type::OrSymbol) }
39
39
  attr_accessor :type
40
40
 
@@ -46,6 +46,13 @@ module Lithic
46
46
  sig { params(token: String).void }
47
47
  attr_writer :token
48
48
 
49
+ # External ID defined by the customer
50
+ sig { returns(T.nilable(String)) }
51
+ attr_reader :external_id
52
+
53
+ sig { params(external_id: String).void }
54
+ attr_writer :external_id
55
+
49
56
  # Optional descriptor for the transfer.
50
57
  sig { returns(T.nilable(String)) }
51
58
  attr_reader :memo
@@ -53,6 +60,22 @@ module Lithic
53
60
  sig { params(memo: String).void }
54
61
  attr_writer :memo
55
62
 
63
+ # What to do if the financial account is closed when posting an operation
64
+ sig do
65
+ returns(
66
+ T.nilable(Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol)
67
+ )
68
+ end
69
+ attr_reader :on_closed_account
70
+
71
+ sig do
72
+ params(
73
+ on_closed_account:
74
+ Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol
75
+ ).void
76
+ end
77
+ attr_writer :on_closed_account
78
+
56
79
  sig do
57
80
  params(
58
81
  amount: Integer,
@@ -62,12 +85,15 @@ module Lithic
62
85
  to_financial_account_token: String,
63
86
  type: Lithic::BookTransferCreateParams::Type::OrSymbol,
64
87
  token: String,
88
+ external_id: String,
65
89
  memo: String,
90
+ on_closed_account:
91
+ Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol,
66
92
  request_options: Lithic::RequestOptions::OrHash
67
93
  ).returns(T.attached_class)
68
94
  end
69
95
  def self.new(
70
- # Amount to be transferred in the currencys smallest unit (e.g., cents for USD).
96
+ # Amount to be transferred in the currency's smallest unit (e.g., cents for USD).
71
97
  # This should always be a positive value.
72
98
  amount:,
73
99
  # Category of the book transfer
@@ -80,13 +106,17 @@ module Lithic
80
106
  # Globally unique identifier for the financial account or card that will receive
81
107
  # the funds. Accepted type dependent on the program's use case.
82
108
  to_financial_account_token:,
83
- # Type of book_transfer
109
+ # Type of the book transfer
84
110
  type:,
85
111
  # Customer-provided token that will serve as an idempotency token. This token will
86
112
  # become the transaction token.
87
113
  token: nil,
114
+ # External ID defined by the customer
115
+ external_id: nil,
88
116
  # Optional descriptor for the transfer.
89
117
  memo: nil,
118
+ # What to do if the financial account is closed when posting an operation
119
+ on_closed_account: nil,
90
120
  request_options: {}
91
121
  )
92
122
  end
@@ -101,7 +131,10 @@ module Lithic
101
131
  to_financial_account_token: String,
102
132
  type: Lithic::BookTransferCreateParams::Type::OrSymbol,
103
133
  token: String,
134
+ external_id: String,
104
135
  memo: String,
136
+ on_closed_account:
137
+ Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol,
105
138
  request_options: Lithic::RequestOptions
106
139
  }
107
140
  )
@@ -161,7 +194,7 @@ module Lithic
161
194
  end
162
195
  end
163
196
 
164
- # Type of book_transfer
197
+ # Type of the book transfer
165
198
  module Type
166
199
  extend Lithic::Internal::Type::Enum
167
200
 
@@ -316,6 +349,11 @@ module Lithic
316
349
  T.let(:SERVICE, Lithic::BookTransferCreateParams::Type::TaggedSymbol)
317
350
  TRANSFER =
318
351
  T.let(:TRANSFER, Lithic::BookTransferCreateParams::Type::TaggedSymbol)
352
+ COLLECTION =
353
+ T.let(
354
+ :COLLECTION,
355
+ Lithic::BookTransferCreateParams::Type::TaggedSymbol
356
+ )
319
357
 
320
358
  sig do
321
359
  override.returns(
@@ -325,6 +363,38 @@ module Lithic
325
363
  def self.values
326
364
  end
327
365
  end
366
+
367
+ # What to do if the financial account is closed when posting an operation
368
+ module OnClosedAccount
369
+ extend Lithic::Internal::Type::Enum
370
+
371
+ TaggedSymbol =
372
+ T.type_alias do
373
+ T.all(Symbol, Lithic::BookTransferCreateParams::OnClosedAccount)
374
+ end
375
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
376
+
377
+ FAIL =
378
+ T.let(
379
+ :FAIL,
380
+ Lithic::BookTransferCreateParams::OnClosedAccount::TaggedSymbol
381
+ )
382
+ USE_SUSPENSE =
383
+ T.let(
384
+ :USE_SUSPENSE,
385
+ Lithic::BookTransferCreateParams::OnClosedAccount::TaggedSymbol
386
+ )
387
+
388
+ sig do
389
+ override.returns(
390
+ T::Array[
391
+ Lithic::BookTransferCreateParams::OnClosedAccount::TaggedSymbol
392
+ ]
393
+ )
394
+ end
395
+ def self.values
396
+ end
397
+ end
328
398
  end
329
399
  end
330
400
  end
@@ -30,19 +30,34 @@ module Lithic
30
30
  sig { returns(T::Array[Lithic::BookTransferResponse::Event]) }
31
31
  attr_accessor :events
32
32
 
33
+ # External ID defined by the customer
34
+ sig { returns(T.nilable(String)) }
35
+ attr_accessor :external_id
36
+
37
+ # External resource associated with the management operation
38
+ sig { returns(T.nilable(Lithic::ExternalResource)) }
39
+ attr_reader :external_resource
40
+
41
+ sig do
42
+ params(
43
+ external_resource: T.nilable(Lithic::ExternalResource::OrHash)
44
+ ).void
45
+ end
46
+ attr_writer :external_resource
47
+
33
48
  # Globally unique identifier for the financial account or card that will send the
34
49
  # funds. Accepted type dependent on the program's use case.
35
50
  sig { returns(String) }
36
51
  attr_accessor :from_financial_account_token
37
52
 
38
53
  # Pending amount of the transaction in the currency's smallest unit (e.g., cents),
39
- # including any acquirer fees. The value of this field will go to zero over time
40
- # once the financial transaction is settled.
54
+ # including any acquirer fees.
55
+ #
56
+ # The value of this field will go to zero over time once the financial transaction
57
+ # is settled.
41
58
  sig { returns(Integer) }
42
59
  attr_accessor :pending_amount
43
60
 
44
- # APPROVED transactions were successful while DECLINED transactions were declined
45
- # by user, Lithic, or the network.
46
61
  sig { returns(Lithic::BookTransferResponse::Result::TaggedSymbol) }
47
62
  attr_accessor :result
48
63
 
@@ -51,16 +66,33 @@ module Lithic
51
66
  sig { returns(Integer) }
52
67
  attr_accessor :settled_amount
53
68
 
54
- # Status types: _ `DECLINED` - The transfer was declined. _ `REVERSED` - The
55
- # transfer was reversed \* `SETTLED` - The transfer is completed.
69
+ # Status types:
70
+ #
71
+ # - `DECLINED` - The transfer was declined.
72
+ # - `REVERSED` - The transfer was reversed
73
+ # - `SETTLED` - The transfer is completed.
56
74
  sig { returns(Lithic::BookTransferResponse::Status::TaggedSymbol) }
57
75
  attr_accessor :status
58
76
 
59
77
  # Globally unique identifier for the financial account or card that will receive
60
78
  # the funds. Accepted type dependent on the program's use case.
61
- sig { returns(T.anything) }
79
+ sig { returns(String) }
62
80
  attr_accessor :to_financial_account_token
63
81
 
82
+ # A series of transactions that are grouped together.
83
+ sig do
84
+ returns(T.nilable(Lithic::BookTransferResponse::TransactionSeries))
85
+ end
86
+ attr_reader :transaction_series
87
+
88
+ sig do
89
+ params(
90
+ transaction_series:
91
+ T.nilable(Lithic::BookTransferResponse::TransactionSeries::OrHash)
92
+ ).void
93
+ end
94
+ attr_writer :transaction_series
95
+
64
96
  # Date and time when the financial transaction was last updated. UTC time zone.
65
97
  sig { returns(Time) }
66
98
  attr_accessor :updated
@@ -72,12 +104,16 @@ module Lithic
72
104
  created: Time,
73
105
  currency: String,
74
106
  events: T::Array[Lithic::BookTransferResponse::Event::OrHash],
107
+ external_id: T.nilable(String),
108
+ external_resource: T.nilable(Lithic::ExternalResource::OrHash),
75
109
  from_financial_account_token: String,
76
110
  pending_amount: Integer,
77
111
  result: Lithic::BookTransferResponse::Result::OrSymbol,
78
112
  settled_amount: Integer,
79
113
  status: Lithic::BookTransferResponse::Status::OrSymbol,
80
- to_financial_account_token: T.anything,
114
+ to_financial_account_token: String,
115
+ transaction_series:
116
+ T.nilable(Lithic::BookTransferResponse::TransactionSeries::OrHash),
81
117
  updated: Time
82
118
  ).returns(T.attached_class)
83
119
  end
@@ -94,25 +130,34 @@ module Lithic
94
130
  currency:,
95
131
  # A list of all financial events that have modified this transfer.
96
132
  events:,
133
+ # External ID defined by the customer
134
+ external_id:,
135
+ # External resource associated with the management operation
136
+ external_resource:,
97
137
  # Globally unique identifier for the financial account or card that will send the
98
138
  # funds. Accepted type dependent on the program's use case.
99
139
  from_financial_account_token:,
100
140
  # Pending amount of the transaction in the currency's smallest unit (e.g., cents),
101
- # including any acquirer fees. The value of this field will go to zero over time
102
- # once the financial transaction is settled.
141
+ # including any acquirer fees.
142
+ #
143
+ # The value of this field will go to zero over time once the financial transaction
144
+ # is settled.
103
145
  pending_amount:,
104
- # APPROVED transactions were successful while DECLINED transactions were declined
105
- # by user, Lithic, or the network.
106
146
  result:,
107
147
  # Amount of the transaction that has been settled in the currency's smallest unit
108
148
  # (e.g., cents).
109
149
  settled_amount:,
110
- # Status types: _ `DECLINED` - The transfer was declined. _ `REVERSED` - The
111
- # transfer was reversed \* `SETTLED` - The transfer is completed.
150
+ # Status types:
151
+ #
152
+ # - `DECLINED` - The transfer was declined.
153
+ # - `REVERSED` - The transfer was reversed
154
+ # - `SETTLED` - The transfer is completed.
112
155
  status:,
113
156
  # Globally unique identifier for the financial account or card that will receive
114
157
  # the funds. Accepted type dependent on the program's use case.
115
158
  to_financial_account_token:,
159
+ # A series of transactions that are grouped together.
160
+ transaction_series:,
116
161
  # Date and time when the financial transaction was last updated. UTC time zone.
117
162
  updated:
118
163
  )
@@ -126,12 +171,16 @@ module Lithic
126
171
  created: Time,
127
172
  currency: String,
128
173
  events: T::Array[Lithic::BookTransferResponse::Event],
174
+ external_id: T.nilable(String),
175
+ external_resource: T.nilable(Lithic::ExternalResource),
129
176
  from_financial_account_token: String,
130
177
  pending_amount: Integer,
131
178
  result: Lithic::BookTransferResponse::Result::TaggedSymbol,
132
179
  settled_amount: Integer,
133
180
  status: Lithic::BookTransferResponse::Status::TaggedSymbol,
134
- to_financial_account_token: T.anything,
181
+ to_financial_account_token: String,
182
+ transaction_series:
183
+ T.nilable(Lithic::BookTransferResponse::TransactionSeries),
135
184
  updated: Time
136
185
  }
137
186
  )
@@ -201,12 +250,9 @@ module Lithic
201
250
  sig { returns(Time) }
202
251
  attr_accessor :created
203
252
 
204
- # Detailed Results
205
253
  sig do
206
254
  returns(
207
- T::Array[
208
- Lithic::BookTransferResponse::Event::DetailedResult::TaggedSymbol
209
- ]
255
+ Lithic::BookTransferResponse::Event::DetailedResults::TaggedSymbol
210
256
  )
211
257
  end
212
258
  attr_accessor :detailed_results
@@ -227,22 +273,21 @@ module Lithic
227
273
  attr_accessor :subtype
228
274
 
229
275
  # Type of the book transfer
230
- sig { returns(String) }
276
+ sig { returns(Lithic::BookTransferResponse::Event::Type::TaggedSymbol) }
231
277
  attr_accessor :type
232
278
 
279
+ # Book transfer Event
233
280
  sig do
234
281
  params(
235
282
  token: String,
236
283
  amount: Integer,
237
284
  created: Time,
238
285
  detailed_results:
239
- T::Array[
240
- Lithic::BookTransferResponse::Event::DetailedResult::OrSymbol
241
- ],
286
+ Lithic::BookTransferResponse::Event::DetailedResults::OrSymbol,
242
287
  memo: String,
243
288
  result: Lithic::BookTransferResponse::Event::Result::OrSymbol,
244
289
  subtype: String,
245
- type: String
290
+ type: Lithic::BookTransferResponse::Event::Type::OrSymbol
246
291
  ).returns(T.attached_class)
247
292
  end
248
293
  def self.new(
@@ -253,7 +298,6 @@ module Lithic
253
298
  amount:,
254
299
  # Date and time when the financial event occurred. UTC time zone.
255
300
  created:,
256
- # Detailed Results
257
301
  detailed_results:,
258
302
  # Memo for the transfer.
259
303
  memo:,
@@ -274,43 +318,44 @@ module Lithic
274
318
  amount: Integer,
275
319
  created: Time,
276
320
  detailed_results:
277
- T::Array[
278
- Lithic::BookTransferResponse::Event::DetailedResult::TaggedSymbol
279
- ],
321
+ Lithic::BookTransferResponse::Event::DetailedResults::TaggedSymbol,
280
322
  memo: String,
281
323
  result: Lithic::BookTransferResponse::Event::Result::TaggedSymbol,
282
324
  subtype: String,
283
- type: String
325
+ type: Lithic::BookTransferResponse::Event::Type::TaggedSymbol
284
326
  }
285
327
  )
286
328
  end
287
329
  def to_hash
288
330
  end
289
331
 
290
- module DetailedResult
332
+ module DetailedResults
291
333
  extend Lithic::Internal::Type::Enum
292
334
 
293
335
  TaggedSymbol =
294
336
  T.type_alias do
295
- T.all(Symbol, Lithic::BookTransferResponse::Event::DetailedResult)
337
+ T.all(
338
+ Symbol,
339
+ Lithic::BookTransferResponse::Event::DetailedResults
340
+ )
296
341
  end
297
342
  OrSymbol = T.type_alias { T.any(Symbol, String) }
298
343
 
299
344
  APPROVED =
300
345
  T.let(
301
346
  :APPROVED,
302
- Lithic::BookTransferResponse::Event::DetailedResult::TaggedSymbol
347
+ Lithic::BookTransferResponse::Event::DetailedResults::TaggedSymbol
303
348
  )
304
349
  FUNDS_INSUFFICIENT =
305
350
  T.let(
306
351
  :FUNDS_INSUFFICIENT,
307
- Lithic::BookTransferResponse::Event::DetailedResult::TaggedSymbol
352
+ Lithic::BookTransferResponse::Event::DetailedResults::TaggedSymbol
308
353
  )
309
354
 
310
355
  sig do
311
356
  override.returns(
312
357
  T::Array[
313
- Lithic::BookTransferResponse::Event::DetailedResult::TaggedSymbol
358
+ Lithic::BookTransferResponse::Event::DetailedResults::TaggedSymbol
314
359
  ]
315
360
  )
316
361
  end
@@ -350,10 +395,198 @@ module Lithic
350
395
  def self.values
351
396
  end
352
397
  end
398
+
399
+ # Type of the book transfer
400
+ module Type
401
+ extend Lithic::Internal::Type::Enum
402
+
403
+ TaggedSymbol =
404
+ T.type_alias do
405
+ T.all(Symbol, Lithic::BookTransferResponse::Event::Type)
406
+ end
407
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
408
+
409
+ ATM_WITHDRAWAL =
410
+ T.let(
411
+ :ATM_WITHDRAWAL,
412
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
413
+ )
414
+ ATM_DECLINE =
415
+ T.let(
416
+ :ATM_DECLINE,
417
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
418
+ )
419
+ INTERNATIONAL_ATM_WITHDRAWAL =
420
+ T.let(
421
+ :INTERNATIONAL_ATM_WITHDRAWAL,
422
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
423
+ )
424
+ INACTIVITY =
425
+ T.let(
426
+ :INACTIVITY,
427
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
428
+ )
429
+ STATEMENT =
430
+ T.let(
431
+ :STATEMENT,
432
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
433
+ )
434
+ MONTHLY =
435
+ T.let(
436
+ :MONTHLY,
437
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
438
+ )
439
+ QUARTERLY =
440
+ T.let(
441
+ :QUARTERLY,
442
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
443
+ )
444
+ ANNUAL =
445
+ T.let(
446
+ :ANNUAL,
447
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
448
+ )
449
+ CUSTOMER_SERVICE =
450
+ T.let(
451
+ :CUSTOMER_SERVICE,
452
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
453
+ )
454
+ ACCOUNT_MAINTENANCE =
455
+ T.let(
456
+ :ACCOUNT_MAINTENANCE,
457
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
458
+ )
459
+ ACCOUNT_ACTIVATION =
460
+ T.let(
461
+ :ACCOUNT_ACTIVATION,
462
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
463
+ )
464
+ ACCOUNT_CLOSURE =
465
+ T.let(
466
+ :ACCOUNT_CLOSURE,
467
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
468
+ )
469
+ CARD_REPLACEMENT =
470
+ T.let(
471
+ :CARD_REPLACEMENT,
472
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
473
+ )
474
+ CARD_DELIVERY =
475
+ T.let(
476
+ :CARD_DELIVERY,
477
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
478
+ )
479
+ CARD_CREATE =
480
+ T.let(
481
+ :CARD_CREATE,
482
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
483
+ )
484
+ CURRENCY_CONVERSION =
485
+ T.let(
486
+ :CURRENCY_CONVERSION,
487
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
488
+ )
489
+ INTEREST =
490
+ T.let(
491
+ :INTEREST,
492
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
493
+ )
494
+ LATE_PAYMENT =
495
+ T.let(
496
+ :LATE_PAYMENT,
497
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
498
+ )
499
+ BILL_PAYMENT =
500
+ T.let(
501
+ :BILL_PAYMENT,
502
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
503
+ )
504
+ CASH_BACK =
505
+ T.let(
506
+ :CASH_BACK,
507
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
508
+ )
509
+ ACCOUNT_TO_ACCOUNT =
510
+ T.let(
511
+ :ACCOUNT_TO_ACCOUNT,
512
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
513
+ )
514
+ CARD_TO_CARD =
515
+ T.let(
516
+ :CARD_TO_CARD,
517
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
518
+ )
519
+ DISBURSE =
520
+ T.let(
521
+ :DISBURSE,
522
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
523
+ )
524
+ BILLING_ERROR =
525
+ T.let(
526
+ :BILLING_ERROR,
527
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
528
+ )
529
+ LOSS_WRITE_OFF =
530
+ T.let(
531
+ :LOSS_WRITE_OFF,
532
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
533
+ )
534
+ EXPIRED_CARD =
535
+ T.let(
536
+ :EXPIRED_CARD,
537
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
538
+ )
539
+ EARLY_DERECOGNITION =
540
+ T.let(
541
+ :EARLY_DERECOGNITION,
542
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
543
+ )
544
+ ESCHEATMENT =
545
+ T.let(
546
+ :ESCHEATMENT,
547
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
548
+ )
549
+ INACTIVITY_FEE_DOWN =
550
+ T.let(
551
+ :INACTIVITY_FEE_DOWN,
552
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
553
+ )
554
+ PROVISIONAL_CREDIT =
555
+ T.let(
556
+ :PROVISIONAL_CREDIT,
557
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
558
+ )
559
+ DISPUTE_WON =
560
+ T.let(
561
+ :DISPUTE_WON,
562
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
563
+ )
564
+ SERVICE =
565
+ T.let(
566
+ :SERVICE,
567
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
568
+ )
569
+ TRANSFER =
570
+ T.let(
571
+ :TRANSFER,
572
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
573
+ )
574
+ COLLECTION =
575
+ T.let(
576
+ :COLLECTION,
577
+ Lithic::BookTransferResponse::Event::Type::TaggedSymbol
578
+ )
579
+
580
+ sig do
581
+ override.returns(
582
+ T::Array[Lithic::BookTransferResponse::Event::Type::TaggedSymbol]
583
+ )
584
+ end
585
+ def self.values
586
+ end
587
+ end
353
588
  end
354
589
 
355
- # APPROVED transactions were successful while DECLINED transactions were declined
356
- # by user, Lithic, or the network.
357
590
  module Result
358
591
  extend Lithic::Internal::Type::Enum
359
592
 
@@ -375,8 +608,11 @@ module Lithic
375
608
  end
376
609
  end
377
610
 
378
- # Status types: _ `DECLINED` - The transfer was declined. _ `REVERSED` - The
379
- # transfer was reversed \* `SETTLED` - The transfer is completed.
611
+ # Status types:
612
+ #
613
+ # - `DECLINED` - The transfer was declined.
614
+ # - `REVERSED` - The transfer was reversed
615
+ # - `SETTLED` - The transfer is completed.
380
616
  module Status
381
617
  extend Lithic::Internal::Type::Enum
382
618
 
@@ -399,6 +635,52 @@ module Lithic
399
635
  def self.values
400
636
  end
401
637
  end
638
+
639
+ class TransactionSeries < Lithic::Internal::Type::BaseModel
640
+ OrHash =
641
+ T.type_alias do
642
+ T.any(
643
+ Lithic::BookTransferResponse::TransactionSeries,
644
+ Lithic::Internal::AnyHash
645
+ )
646
+ end
647
+
648
+ sig { returns(T.nilable(String)) }
649
+ attr_accessor :related_transaction_event_token
650
+
651
+ sig { returns(T.nilable(String)) }
652
+ attr_accessor :related_transaction_token
653
+
654
+ sig { returns(String) }
655
+ attr_accessor :type
656
+
657
+ # A series of transactions that are grouped together.
658
+ sig do
659
+ params(
660
+ related_transaction_event_token: T.nilable(String),
661
+ related_transaction_token: T.nilable(String),
662
+ type: String
663
+ ).returns(T.attached_class)
664
+ end
665
+ def self.new(
666
+ related_transaction_event_token:,
667
+ related_transaction_token:,
668
+ type:
669
+ )
670
+ end
671
+
672
+ sig do
673
+ override.returns(
674
+ {
675
+ related_transaction_event_token: T.nilable(String),
676
+ related_transaction_token: T.nilable(String),
677
+ type: String
678
+ }
679
+ )
680
+ end
681
+ def to_hash
682
+ end
683
+ end
402
684
  end
403
685
  end
404
686
  end