lithic 0.1.0.pre.alpha.51 → 0.1.0.pre.alpha.53

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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/internal/transport/pooled_net_requester.rb +30 -24
  5. data/lib/lithic/internal/type/union.rb +15 -3
  6. data/lib/lithic/internal/util.rb +3 -2
  7. data/lib/lithic/models/account_activity_list_response.rb +47 -1141
  8. data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +47 -1151
  9. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +3 -0
  10. data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +7 -0
  11. data/lib/lithic/models/auth_rules/conditional_attribute.rb +4 -0
  12. data/lib/lithic/models/auth_rules/v2_apply_response.rb +14 -0
  13. data/lib/lithic/models/auth_rules/v2_create_params.rb +7 -0
  14. data/lib/lithic/models/auth_rules/v2_create_response.rb +14 -0
  15. data/lib/lithic/models/auth_rules/v2_draft_params.rb +7 -0
  16. data/lib/lithic/models/auth_rules/v2_draft_response.rb +14 -0
  17. data/lib/lithic/models/auth_rules/v2_list_response.rb +14 -0
  18. data/lib/lithic/models/auth_rules/v2_promote_response.rb +14 -0
  19. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +14 -0
  20. data/lib/lithic/models/auth_rules/v2_update_response.rb +14 -0
  21. data/lib/lithic/models/book_transfer_response.rb +51 -48
  22. data/lib/lithic/models/card_provision_response.rb +25 -3
  23. data/lib/lithic/models/event.rb +0 -1
  24. data/lib/lithic/models/event_list_params.rb +0 -1
  25. data/lib/lithic/models/event_subscription.rb +0 -1
  26. data/lib/lithic/models/events/subscription_create_params.rb +0 -1
  27. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +0 -1
  28. data/lib/lithic/models/events/subscription_update_params.rb +0 -1
  29. data/lib/lithic/models/external_bank_account_create_params.rb +1 -8
  30. data/lib/lithic/models/external_payment.rb +21 -23
  31. data/lib/lithic/models/financial_account.rb +48 -39
  32. data/lib/lithic/models/financial_accounts/financial_account_credit_config.rb +32 -23
  33. data/lib/lithic/models/management_operation_transaction.rb +21 -23
  34. data/lib/lithic/models/payment.rb +249 -131
  35. data/lib/lithic/models/payment_create_response.rb +2 -0
  36. data/lib/lithic/models/payment_retry_response.rb +2 -0
  37. data/lib/lithic/models/provision_response.rb +30 -0
  38. data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +32 -1
  39. data/lib/lithic/models/tokenization.rb +1 -0
  40. data/lib/lithic/models/transaction.rb +4 -0
  41. data/lib/lithic/models/verification_method.rb +0 -1
  42. data/lib/lithic/models.rb +2 -0
  43. data/lib/lithic/resources/account_activity.rb +2 -2
  44. data/lib/lithic/resources/auth_rules/v2.rb +0 -72
  45. data/lib/lithic/resources/external_bank_accounts.rb +1 -3
  46. data/lib/lithic/version.rb +1 -1
  47. data/lib/lithic.rb +1 -2
  48. data/rbi/lithic/models/account_activity_list_response.rbi +153 -2629
  49. data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +153 -2629
  50. data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +6 -0
  51. data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +14 -0
  52. data/rbi/lithic/models/auth_rules/conditional_attribute.rbi +8 -0
  53. data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +28 -0
  54. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +14 -0
  55. data/rbi/lithic/models/auth_rules/v2_create_response.rbi +28 -0
  56. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +14 -0
  57. data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +28 -0
  58. data/rbi/lithic/models/auth_rules/v2_list_response.rbi +28 -0
  59. data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +28 -0
  60. data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +28 -0
  61. data/rbi/lithic/models/auth_rules/v2_update_response.rbi +28 -0
  62. data/rbi/lithic/models/book_transfer_response.rbi +67 -68
  63. data/rbi/lithic/models/card_provision_response.rbi +50 -5
  64. data/rbi/lithic/models/event.rbi +0 -5
  65. data/rbi/lithic/models/event_list_params.rbi +0 -5
  66. data/rbi/lithic/models/event_subscription.rbi +0 -5
  67. data/rbi/lithic/models/events/subscription_create_params.rbi +0 -5
  68. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +0 -5
  69. data/rbi/lithic/models/events/subscription_update_params.rbi +0 -5
  70. data/rbi/lithic/models/external_bank_account_create_params.rbi +0 -6
  71. data/rbi/lithic/models/external_payment.rbi +34 -39
  72. data/rbi/lithic/models/financial_account.rbi +74 -73
  73. data/rbi/lithic/models/financial_accounts/financial_account_credit_config.rbi +46 -33
  74. data/rbi/lithic/models/management_operation_transaction.rbi +49 -60
  75. data/rbi/lithic/models/payment.rbi +384 -168
  76. data/rbi/lithic/models/payment_create_response.rbi +1 -0
  77. data/rbi/lithic/models/payment_retry_response.rbi +1 -0
  78. data/rbi/lithic/models/provision_response.rbi +58 -0
  79. data/rbi/lithic/models/three_ds/authentication_retrieve_response.rbi +83 -0
  80. data/rbi/lithic/models/tokenization.rbi +5 -0
  81. data/rbi/lithic/models/transaction.rbi +20 -0
  82. data/rbi/lithic/models/verification_method.rbi +0 -1
  83. data/rbi/lithic/models.rbi +2 -0
  84. data/rbi/lithic/resources/auth_rules/v2.rbi +0 -64
  85. data/rbi/lithic/resources/external_bank_accounts.rbi +0 -2
  86. data/sig/lithic/models/account_activity_list_response.rbs +48 -1036
  87. data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +48 -1036
  88. data/sig/lithic/models/auth_rules/conditional_3ds_action_parameters.rbs +2 -0
  89. data/sig/lithic/models/auth_rules/conditional_attribute.rbs +2 -0
  90. data/sig/lithic/models/auth_rules/v2_apply_response.rbs +4 -0
  91. data/sig/lithic/models/auth_rules/v2_create_params.rbs +2 -0
  92. data/sig/lithic/models/auth_rules/v2_create_response.rbs +4 -0
  93. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +2 -0
  94. data/sig/lithic/models/auth_rules/v2_draft_response.rbs +4 -0
  95. data/sig/lithic/models/auth_rules/v2_list_response.rbs +4 -0
  96. data/sig/lithic/models/auth_rules/v2_promote_response.rbs +4 -0
  97. data/sig/lithic/models/auth_rules/v2_retrieve_response.rbs +4 -0
  98. data/sig/lithic/models/auth_rules/v2_update_response.rbs +4 -0
  99. data/sig/lithic/models/book_transfer_response.rbs +26 -19
  100. data/sig/lithic/models/card_provision_response.rbs +22 -5
  101. data/sig/lithic/models/event.rbs +0 -2
  102. data/sig/lithic/models/event_list_params.rbs +0 -2
  103. data/sig/lithic/models/event_subscription.rbs +0 -2
  104. data/sig/lithic/models/events/subscription_create_params.rbs +0 -2
  105. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +0 -2
  106. data/sig/lithic/models/events/subscription_update_params.rbs +0 -2
  107. data/sig/lithic/models/external_bank_account_create_params.rbs +1 -6
  108. data/sig/lithic/models/external_payment.rbs +19 -26
  109. data/sig/lithic/models/financial_account.rbs +28 -30
  110. data/sig/lithic/models/financial_accounts/financial_account_credit_config.rbs +21 -15
  111. data/sig/lithic/models/management_operation_transaction.rbs +19 -26
  112. data/sig/lithic/models/payment.rbs +191 -74
  113. data/sig/lithic/models/provision_response.rbs +36 -0
  114. data/sig/lithic/models/three_ds/authentication_retrieve_response.rbs +28 -0
  115. data/sig/lithic/models/tokenization.rbs +2 -0
  116. data/sig/lithic/models/transaction.rbs +8 -0
  117. data/sig/lithic/models/verification_method.rbs +1 -7
  118. data/sig/lithic/models.rbs +2 -0
  119. data/sig/lithic/resources/auth_rules/v2.rbs +0 -5
  120. data/sig/lithic/resources/external_bank_accounts.rbs +0 -1
  121. metadata +5 -8
  122. data/lib/lithic/models/auth_rules/v2_report_params.rb +0 -16
  123. data/lib/lithic/models/auth_rules/v2_report_response.rb +0 -18
  124. data/rbi/lithic/models/auth_rules/v2_report_params.rbi +0 -29
  125. data/rbi/lithic/models/auth_rules/v2_report_response.rbi +0 -31
  126. data/sig/lithic/models/auth_rules/v2_report_params.rbs +0 -16
  127. data/sig/lithic/models/auth_rules/v2_report_response.rbs +0 -17
@@ -6,59 +6,51 @@ module Lithic
6
6
  OrHash =
7
7
  T.type_alias { T.any(Lithic::Payment, Lithic::Internal::AnyHash) }
8
8
 
9
- # Globally unique identifier.
9
+ # Unique identifier for the transaction
10
10
  sig { returns(String) }
11
11
  attr_accessor :token
12
12
 
13
- # Payment category
13
+ # Transaction category
14
14
  sig { returns(Lithic::Payment::Category::TaggedSymbol) }
15
15
  attr_accessor :category
16
16
 
17
- # Date and time when the payment first occurred. UTC time zone.
17
+ # ISO 8601 timestamp of when the transaction was created
18
18
  sig { returns(Time) }
19
19
  attr_accessor :created
20
20
 
21
- # 3-character alphabetic ISO 4217 code for the settling currency of the payment.
22
- sig { returns(String) }
23
- attr_accessor :currency
24
-
25
- # A string that provides a description of the payment; may be useful to display to
26
- # users.
21
+ # Transaction descriptor
27
22
  sig { returns(String) }
28
23
  attr_accessor :descriptor
29
24
 
25
+ # Transfer direction
30
26
  sig { returns(Lithic::Payment::Direction::TaggedSymbol) }
31
27
  attr_accessor :direction
32
28
 
33
- # A list of all payment events that have modified this payment.
29
+ # List of transaction events
34
30
  sig { returns(T::Array[Lithic::Payment::Event]) }
35
31
  attr_accessor :events
36
32
 
37
- sig { returns(T.nilable(String)) }
38
- attr_accessor :external_bank_account_token
33
+ # PAYMENT - Payment Transaction
34
+ sig { returns(Symbol) }
35
+ attr_accessor :family
39
36
 
37
+ # Financial account token
40
38
  sig { returns(String) }
41
39
  attr_accessor :financial_account_token
42
40
 
41
+ # Transfer method
43
42
  sig { returns(Lithic::Payment::Method::TaggedSymbol) }
44
43
  attr_accessor :method_
45
44
 
46
- sig { returns(Lithic::Payment::MethodAttributes) }
47
- attr_reader :method_attributes
48
-
49
- sig do
50
- params(
51
- method_attributes: Lithic::Payment::MethodAttributes::OrHash
52
- ).void
53
- end
54
- attr_writer :method_attributes
45
+ # Method-specific attributes
46
+ sig { returns(Lithic::Payment::MethodAttributes::Variants) }
47
+ attr_accessor :method_attributes
55
48
 
56
- # Pending amount of the payment in the currency's smallest unit (e.g., cents). The
57
- # value of this field will go to zero over time once the payment is settled.
49
+ # Pending amount in cents
58
50
  sig { returns(Integer) }
59
51
  attr_accessor :pending_amount
60
52
 
61
- # Account tokens related to a payment transaction
53
+ # Related account tokens for the transaction
62
54
  sig { returns(Lithic::Payment::RelatedAccountTokens) }
63
55
  attr_reader :related_account_tokens
64
56
 
@@ -69,63 +61,67 @@ module Lithic
69
61
  end
70
62
  attr_writer :related_account_tokens
71
63
 
72
- # APPROVED payments were successful while DECLINED payments were declined by
73
- # Lithic or returned.
64
+ # Transaction result
74
65
  sig { returns(Lithic::Payment::Result::TaggedSymbol) }
75
66
  attr_accessor :result
76
67
 
77
- # Amount of the payment that has been settled in the currency's smallest unit
78
- # (e.g., cents).
68
+ # Settled amount in cents
79
69
  sig { returns(Integer) }
80
70
  attr_accessor :settled_amount
81
71
 
72
+ # Transaction source
82
73
  sig { returns(Lithic::Payment::Source::TaggedSymbol) }
83
74
  attr_accessor :source
84
75
 
85
- # Status types:
86
- #
87
- # - `DECLINED` - The payment was declined.
88
- # - `PENDING` - The payment is being processed and has yet to settle or release
89
- # (origination debit).
90
- # - `RETURNED` - The payment has been returned.
91
- # - `SETTLED` - The payment is completed.
76
+ # The status of the transaction
92
77
  sig { returns(Lithic::Payment::Status::TaggedSymbol) }
93
78
  attr_accessor :status
94
79
 
95
- # Date and time when the financial transaction was last updated. UTC time zone.
80
+ # ISO 8601 timestamp of when the transaction was last updated
96
81
  sig { returns(Time) }
97
82
  attr_accessor :updated
98
83
 
84
+ # Currency of the transaction in ISO 4217 format
99
85
  sig { returns(T.nilable(String)) }
100
- attr_accessor :user_defined_id
86
+ attr_reader :currency
87
+
88
+ sig { params(currency: String).void }
89
+ attr_writer :currency
101
90
 
102
- # Date when the financial transaction expected to be released after settlement
91
+ # Expected release date for the transaction
103
92
  sig { returns(T.nilable(Date)) }
104
- attr_reader :expected_release_date
93
+ attr_accessor :expected_release_date
105
94
 
106
- sig { params(expected_release_date: Date).void }
107
- attr_writer :expected_release_date
95
+ # External bank account token
96
+ sig { returns(T.nilable(String)) }
97
+ attr_accessor :external_bank_account_token
108
98
 
109
- # Payment type indicating the specific ACH message or Fedwire transfer type
110
99
  sig { returns(T.nilable(Lithic::Payment::Type::TaggedSymbol)) }
111
100
  attr_reader :type
112
101
 
113
102
  sig { params(type: Lithic::Payment::Type::OrSymbol).void }
114
103
  attr_writer :type
115
104
 
105
+ # User-defined identifier
106
+ sig { returns(T.nilable(String)) }
107
+ attr_accessor :user_defined_id
108
+
109
+ # Payment transaction
116
110
  sig do
117
111
  params(
118
112
  token: String,
119
113
  category: Lithic::Payment::Category::OrSymbol,
120
114
  created: Time,
121
- currency: String,
122
115
  descriptor: String,
123
116
  direction: Lithic::Payment::Direction::OrSymbol,
124
117
  events: T::Array[Lithic::Payment::Event::OrHash],
125
- external_bank_account_token: T.nilable(String),
126
118
  financial_account_token: String,
127
119
  method_: Lithic::Payment::Method::OrSymbol,
128
- method_attributes: Lithic::Payment::MethodAttributes::OrHash,
120
+ method_attributes:
121
+ T.any(
122
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::OrHash,
123
+ Lithic::Payment::MethodAttributes::WireMethodAttributes::OrHash
124
+ ),
129
125
  pending_amount: Integer,
130
126
  related_account_tokens: Lithic::Payment::RelatedAccountTokens::OrHash,
131
127
  result: Lithic::Payment::Result::OrSymbol,
@@ -133,57 +129,58 @@ module Lithic
133
129
  source: Lithic::Payment::Source::OrSymbol,
134
130
  status: Lithic::Payment::Status::OrSymbol,
135
131
  updated: Time,
132
+ currency: String,
133
+ expected_release_date: T.nilable(Date),
134
+ external_bank_account_token: T.nilable(String),
135
+ type: Lithic::Payment::Type::OrSymbol,
136
136
  user_defined_id: T.nilable(String),
137
- expected_release_date: Date,
138
- type: Lithic::Payment::Type::OrSymbol
137
+ family: Symbol
139
138
  ).returns(T.attached_class)
140
139
  end
141
140
  def self.new(
142
- # Globally unique identifier.
141
+ # Unique identifier for the transaction
143
142
  token:,
144
- # Payment category
143
+ # Transaction category
145
144
  category:,
146
- # Date and time when the payment first occurred. UTC time zone.
145
+ # ISO 8601 timestamp of when the transaction was created
147
146
  created:,
148
- # 3-character alphabetic ISO 4217 code for the settling currency of the payment.
149
- currency:,
150
- # A string that provides a description of the payment; may be useful to display to
151
- # users.
147
+ # Transaction descriptor
152
148
  descriptor:,
149
+ # Transfer direction
153
150
  direction:,
154
- # A list of all payment events that have modified this payment.
151
+ # List of transaction events
155
152
  events:,
156
- external_bank_account_token:,
153
+ # Financial account token
157
154
  financial_account_token:,
155
+ # Transfer method
158
156
  method_:,
157
+ # Method-specific attributes
159
158
  method_attributes:,
160
- # Pending amount of the payment in the currency's smallest unit (e.g., cents). The
161
- # value of this field will go to zero over time once the payment is settled.
159
+ # Pending amount in cents
162
160
  pending_amount:,
163
- # Account tokens related to a payment transaction
161
+ # Related account tokens for the transaction
164
162
  related_account_tokens:,
165
- # APPROVED payments were successful while DECLINED payments were declined by
166
- # Lithic or returned.
163
+ # Transaction result
167
164
  result:,
168
- # Amount of the payment that has been settled in the currency's smallest unit
169
- # (e.g., cents).
165
+ # Settled amount in cents
170
166
  settled_amount:,
167
+ # Transaction source
171
168
  source:,
172
- # Status types:
173
- #
174
- # - `DECLINED` - The payment was declined.
175
- # - `PENDING` - The payment is being processed and has yet to settle or release
176
- # (origination debit).
177
- # - `RETURNED` - The payment has been returned.
178
- # - `SETTLED` - The payment is completed.
169
+ # The status of the transaction
179
170
  status:,
180
- # Date and time when the financial transaction was last updated. UTC time zone.
171
+ # ISO 8601 timestamp of when the transaction was last updated
181
172
  updated:,
182
- user_defined_id:,
183
- # Date when the financial transaction expected to be released after settlement
173
+ # Currency of the transaction in ISO 4217 format
174
+ currency: nil,
175
+ # Expected release date for the transaction
184
176
  expected_release_date: nil,
185
- # Payment type indicating the specific ACH message or Fedwire transfer type
186
- type: nil
177
+ # External bank account token
178
+ external_bank_account_token: nil,
179
+ type: nil,
180
+ # User-defined identifier
181
+ user_defined_id: nil,
182
+ # PAYMENT - Payment Transaction
183
+ family: :PAYMENT
187
184
  )
188
185
  end
189
186
 
@@ -193,14 +190,13 @@ module Lithic
193
190
  token: String,
194
191
  category: Lithic::Payment::Category::TaggedSymbol,
195
192
  created: Time,
196
- currency: String,
197
193
  descriptor: String,
198
194
  direction: Lithic::Payment::Direction::TaggedSymbol,
199
195
  events: T::Array[Lithic::Payment::Event],
200
- external_bank_account_token: T.nilable(String),
196
+ family: Symbol,
201
197
  financial_account_token: String,
202
198
  method_: Lithic::Payment::Method::TaggedSymbol,
203
- method_attributes: Lithic::Payment::MethodAttributes,
199
+ method_attributes: Lithic::Payment::MethodAttributes::Variants,
204
200
  pending_amount: Integer,
205
201
  related_account_tokens: Lithic::Payment::RelatedAccountTokens,
206
202
  result: Lithic::Payment::Result::TaggedSymbol,
@@ -208,16 +204,18 @@ module Lithic
208
204
  source: Lithic::Payment::Source::TaggedSymbol,
209
205
  status: Lithic::Payment::Status::TaggedSymbol,
210
206
  updated: Time,
211
- user_defined_id: T.nilable(String),
212
- expected_release_date: Date,
213
- type: Lithic::Payment::Type::TaggedSymbol
207
+ currency: String,
208
+ expected_release_date: T.nilable(Date),
209
+ external_bank_account_token: T.nilable(String),
210
+ type: Lithic::Payment::Type::TaggedSymbol,
211
+ user_defined_id: T.nilable(String)
214
212
  }
215
213
  )
216
214
  end
217
215
  def to_hash
218
216
  end
219
217
 
220
- # Payment category
218
+ # Transaction category
221
219
  module Category
222
220
  extend Lithic::Internal::Type::Enum
223
221
 
@@ -225,6 +223,38 @@ module Lithic
225
223
  OrSymbol = T.type_alias { T.any(Symbol, String) }
226
224
 
227
225
  ACH = T.let(:ACH, Lithic::Payment::Category::TaggedSymbol)
226
+ BALANCE_OR_FUNDING =
227
+ T.let(:BALANCE_OR_FUNDING, Lithic::Payment::Category::TaggedSymbol)
228
+ FEE = T.let(:FEE, Lithic::Payment::Category::TaggedSymbol)
229
+ REWARD = T.let(:REWARD, Lithic::Payment::Category::TaggedSymbol)
230
+ ADJUSTMENT = T.let(:ADJUSTMENT, Lithic::Payment::Category::TaggedSymbol)
231
+ DERECOGNITION =
232
+ T.let(:DERECOGNITION, Lithic::Payment::Category::TaggedSymbol)
233
+ DISPUTE = T.let(:DISPUTE, Lithic::Payment::Category::TaggedSymbol)
234
+ CARD = T.let(:CARD, Lithic::Payment::Category::TaggedSymbol)
235
+ EXTERNAL_ACH =
236
+ T.let(:EXTERNAL_ACH, Lithic::Payment::Category::TaggedSymbol)
237
+ EXTERNAL_CHECK =
238
+ T.let(:EXTERNAL_CHECK, Lithic::Payment::Category::TaggedSymbol)
239
+ EXTERNAL_TRANSFER =
240
+ T.let(:EXTERNAL_TRANSFER, Lithic::Payment::Category::TaggedSymbol)
241
+ EXTERNAL_WIRE =
242
+ T.let(:EXTERNAL_WIRE, Lithic::Payment::Category::TaggedSymbol)
243
+ MANAGEMENT_ADJUSTMENT =
244
+ T.let(:MANAGEMENT_ADJUSTMENT, Lithic::Payment::Category::TaggedSymbol)
245
+ MANAGEMENT_DISPUTE =
246
+ T.let(:MANAGEMENT_DISPUTE, Lithic::Payment::Category::TaggedSymbol)
247
+ MANAGEMENT_FEE =
248
+ T.let(:MANAGEMENT_FEE, Lithic::Payment::Category::TaggedSymbol)
249
+ MANAGEMENT_REWARD =
250
+ T.let(:MANAGEMENT_REWARD, Lithic::Payment::Category::TaggedSymbol)
251
+ MANAGEMENT_DISBURSEMENT =
252
+ T.let(
253
+ :MANAGEMENT_DISBURSEMENT,
254
+ Lithic::Payment::Category::TaggedSymbol
255
+ )
256
+ PROGRAM_FUNDING =
257
+ T.let(:PROGRAM_FUNDING, Lithic::Payment::Category::TaggedSymbol)
228
258
 
229
259
  sig do
230
260
  override.returns(T::Array[Lithic::Payment::Category::TaggedSymbol])
@@ -233,6 +263,7 @@ module Lithic
233
263
  end
234
264
  end
235
265
 
266
+ # Transfer direction
236
267
  module Direction
237
268
  extend Lithic::Internal::Type::Enum
238
269
 
@@ -545,6 +576,7 @@ module Lithic
545
576
  end
546
577
  end
547
578
 
579
+ # Transfer method
548
580
  module Method
549
581
  extend Lithic::Internal::Type::Enum
550
582
 
@@ -555,6 +587,7 @@ module Lithic
555
587
  T.let(:ACH_NEXT_DAY, Lithic::Payment::Method::TaggedSymbol)
556
588
  ACH_SAME_DAY =
557
589
  T.let(:ACH_SAME_DAY, Lithic::Payment::Method::TaggedSymbol)
590
+ WIRE = T.let(:WIRE, Lithic::Payment::Method::TaggedSymbol)
558
591
 
559
592
  sig do
560
593
  override.returns(T::Array[Lithic::Payment::Method::TaggedSymbol])
@@ -563,107 +596,295 @@ module Lithic
563
596
  end
564
597
  end
565
598
 
566
- class MethodAttributes < Lithic::Internal::Type::BaseModel
567
- OrHash =
599
+ # Method-specific attributes
600
+ module MethodAttributes
601
+ extend Lithic::Internal::Type::Union
602
+
603
+ Variants =
568
604
  T.type_alias do
569
- T.any(Lithic::Payment::MethodAttributes, Lithic::Internal::AnyHash)
605
+ T.any(
606
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes,
607
+ Lithic::Payment::MethodAttributes::WireMethodAttributes
608
+ )
570
609
  end
571
610
 
572
- sig { returns(T.nilable(String)) }
573
- attr_accessor :company_id
611
+ class ACHMethodAttributes < Lithic::Internal::Type::BaseModel
612
+ OrHash =
613
+ T.type_alias do
614
+ T.any(
615
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes,
616
+ Lithic::Internal::AnyHash
617
+ )
618
+ end
574
619
 
575
- sig { returns(T.nilable(String)) }
576
- attr_accessor :receipt_routing_number
620
+ # SEC code for ACH transaction
621
+ sig do
622
+ returns(
623
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::TaggedSymbol
624
+ )
625
+ end
626
+ attr_accessor :sec_code
577
627
 
578
- sig { returns(T.nilable(Integer)) }
579
- attr_accessor :retries
628
+ # Addenda information
629
+ sig { returns(T.nilable(String)) }
630
+ attr_accessor :addenda
580
631
 
581
- sig { returns(T.nilable(String)) }
582
- attr_accessor :return_reason_code
632
+ # Company ID for the ACH transaction
633
+ sig { returns(T.nilable(String)) }
634
+ attr_accessor :company_id
583
635
 
584
- sig do
585
- returns(Lithic::Payment::MethodAttributes::SecCode::TaggedSymbol)
586
- end
587
- attr_accessor :sec_code
636
+ # Receipt routing number
637
+ sig { returns(T.nilable(String)) }
638
+ attr_accessor :receipt_routing_number
588
639
 
589
- sig { returns(T::Array[T.nilable(String)]) }
590
- attr_accessor :trace_numbers
640
+ # Number of retries attempted
641
+ sig { returns(T.nilable(Integer)) }
642
+ attr_accessor :retries
591
643
 
592
- sig { returns(T.nilable(String)) }
593
- attr_accessor :addenda
644
+ # Return reason code if the transaction was returned
645
+ sig { returns(T.nilable(String)) }
646
+ attr_accessor :return_reason_code
594
647
 
595
- sig do
596
- params(
597
- company_id: T.nilable(String),
598
- receipt_routing_number: T.nilable(String),
599
- retries: T.nilable(Integer),
600
- return_reason_code: T.nilable(String),
601
- sec_code: Lithic::Payment::MethodAttributes::SecCode::OrSymbol,
602
- trace_numbers: T::Array[T.nilable(String)],
603
- addenda: T.nilable(String)
604
- ).returns(T.attached_class)
605
- end
606
- def self.new(
607
- company_id:,
608
- receipt_routing_number:,
609
- retries:,
610
- return_reason_code:,
611
- sec_code:,
612
- trace_numbers:,
613
- addenda: nil
614
- )
615
- end
648
+ # Trace numbers for the ACH transaction
649
+ sig { returns(T.nilable(T::Array[String])) }
650
+ attr_reader :trace_numbers
616
651
 
617
- sig do
618
- override.returns(
619
- {
652
+ sig { params(trace_numbers: T::Array[String]).void }
653
+ attr_writer :trace_numbers
654
+
655
+ sig do
656
+ params(
657
+ sec_code:
658
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::OrSymbol,
659
+ addenda: T.nilable(String),
620
660
  company_id: T.nilable(String),
621
661
  receipt_routing_number: T.nilable(String),
622
662
  retries: T.nilable(Integer),
623
663
  return_reason_code: T.nilable(String),
624
- sec_code:
625
- Lithic::Payment::MethodAttributes::SecCode::TaggedSymbol,
626
- trace_numbers: T::Array[T.nilable(String)],
627
- addenda: T.nilable(String)
628
- }
664
+ trace_numbers: T::Array[String]
665
+ ).returns(T.attached_class)
666
+ end
667
+ def self.new(
668
+ # SEC code for ACH transaction
669
+ sec_code:,
670
+ # Addenda information
671
+ addenda: nil,
672
+ # Company ID for the ACH transaction
673
+ company_id: nil,
674
+ # Receipt routing number
675
+ receipt_routing_number: nil,
676
+ # Number of retries attempted
677
+ retries: nil,
678
+ # Return reason code if the transaction was returned
679
+ return_reason_code: nil,
680
+ # Trace numbers for the ACH transaction
681
+ trace_numbers: nil
629
682
  )
630
- end
631
- def to_hash
632
- end
683
+ end
633
684
 
634
- module SecCode
635
- extend Lithic::Internal::Type::Enum
685
+ sig do
686
+ override.returns(
687
+ {
688
+ sec_code:
689
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::TaggedSymbol,
690
+ addenda: T.nilable(String),
691
+ company_id: T.nilable(String),
692
+ receipt_routing_number: T.nilable(String),
693
+ retries: T.nilable(Integer),
694
+ return_reason_code: T.nilable(String),
695
+ trace_numbers: T::Array[String]
696
+ }
697
+ )
698
+ end
699
+ def to_hash
700
+ end
636
701
 
637
- TaggedSymbol =
702
+ # SEC code for ACH transaction
703
+ module SecCode
704
+ extend Lithic::Internal::Type::Enum
705
+
706
+ TaggedSymbol =
707
+ T.type_alias do
708
+ T.all(
709
+ Symbol,
710
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode
711
+ )
712
+ end
713
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
714
+
715
+ CCD =
716
+ T.let(
717
+ :CCD,
718
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::TaggedSymbol
719
+ )
720
+ PPD =
721
+ T.let(
722
+ :PPD,
723
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::TaggedSymbol
724
+ )
725
+ WEB =
726
+ T.let(
727
+ :WEB,
728
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::TaggedSymbol
729
+ )
730
+ TEL =
731
+ T.let(
732
+ :TEL,
733
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::TaggedSymbol
734
+ )
735
+ CIE =
736
+ T.let(
737
+ :CIE,
738
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::TaggedSymbol
739
+ )
740
+ CTX =
741
+ T.let(
742
+ :CTX,
743
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::TaggedSymbol
744
+ )
745
+
746
+ sig do
747
+ override.returns(
748
+ T::Array[
749
+ Lithic::Payment::MethodAttributes::ACHMethodAttributes::SecCode::TaggedSymbol
750
+ ]
751
+ )
752
+ end
753
+ def self.values
754
+ end
755
+ end
756
+ end
757
+
758
+ class WireMethodAttributes < Lithic::Internal::Type::BaseModel
759
+ OrHash =
638
760
  T.type_alias do
639
- T.all(Symbol, Lithic::Payment::MethodAttributes::SecCode)
761
+ T.any(
762
+ Lithic::Payment::MethodAttributes::WireMethodAttributes,
763
+ Lithic::Internal::AnyHash
764
+ )
640
765
  end
641
- OrSymbol = T.type_alias { T.any(Symbol, String) }
642
766
 
643
- CCD =
644
- T.let(
645
- :CCD,
646
- Lithic::Payment::MethodAttributes::SecCode::TaggedSymbol
647
- )
648
- PPD =
649
- T.let(
650
- :PPD,
651
- Lithic::Payment::MethodAttributes::SecCode::TaggedSymbol
652
- )
653
- WEB =
654
- T.let(
655
- :WEB,
656
- Lithic::Payment::MethodAttributes::SecCode::TaggedSymbol
767
+ # Type of wire transfer
768
+ sig do
769
+ returns(
770
+ Lithic::Payment::MethodAttributes::WireMethodAttributes::WireNetwork::TaggedSymbol
657
771
  )
772
+ end
773
+ attr_accessor :wire_network
774
+
775
+ sig { returns(T.nilable(Lithic::WirePartyDetails)) }
776
+ attr_reader :creditor
777
+
778
+ sig { params(creditor: Lithic::WirePartyDetails::OrHash).void }
779
+ attr_writer :creditor
780
+
781
+ sig { returns(T.nilable(Lithic::WirePartyDetails)) }
782
+ attr_reader :debtor
783
+
784
+ sig { params(debtor: Lithic::WirePartyDetails::OrHash).void }
785
+ attr_writer :debtor
786
+
787
+ # Point to point reference identifier, as assigned by the instructing party, used
788
+ # for tracking the message through the Fedwire system
789
+ sig { returns(T.nilable(String)) }
790
+ attr_accessor :message_id
791
+
792
+ # Payment details or invoice reference
793
+ sig { returns(T.nilable(String)) }
794
+ attr_accessor :remittance_information
795
+
796
+ # Type of wire message
797
+ sig { returns(T.nilable(String)) }
798
+ attr_reader :wire_message_type
799
+
800
+ sig { params(wire_message_type: String).void }
801
+ attr_writer :wire_message_type
802
+
803
+ sig do
804
+ params(
805
+ wire_network:
806
+ Lithic::Payment::MethodAttributes::WireMethodAttributes::WireNetwork::OrSymbol,
807
+ creditor: Lithic::WirePartyDetails::OrHash,
808
+ debtor: Lithic::WirePartyDetails::OrHash,
809
+ message_id: T.nilable(String),
810
+ remittance_information: T.nilable(String),
811
+ wire_message_type: String
812
+ ).returns(T.attached_class)
813
+ end
814
+ def self.new(
815
+ # Type of wire transfer
816
+ wire_network:,
817
+ creditor: nil,
818
+ debtor: nil,
819
+ # Point to point reference identifier, as assigned by the instructing party, used
820
+ # for tracking the message through the Fedwire system
821
+ message_id: nil,
822
+ # Payment details or invoice reference
823
+ remittance_information: nil,
824
+ # Type of wire message
825
+ wire_message_type: nil
826
+ )
827
+ end
658
828
 
659
829
  sig do
660
830
  override.returns(
661
- T::Array[Lithic::Payment::MethodAttributes::SecCode::TaggedSymbol]
831
+ {
832
+ wire_network:
833
+ Lithic::Payment::MethodAttributes::WireMethodAttributes::WireNetwork::TaggedSymbol,
834
+ creditor: Lithic::WirePartyDetails,
835
+ debtor: Lithic::WirePartyDetails,
836
+ message_id: T.nilable(String),
837
+ remittance_information: T.nilable(String),
838
+ wire_message_type: String
839
+ }
662
840
  )
663
841
  end
664
- def self.values
842
+ def to_hash
843
+ end
844
+
845
+ # Type of wire transfer
846
+ module WireNetwork
847
+ extend Lithic::Internal::Type::Enum
848
+
849
+ TaggedSymbol =
850
+ T.type_alias do
851
+ T.all(
852
+ Symbol,
853
+ Lithic::Payment::MethodAttributes::WireMethodAttributes::WireNetwork
854
+ )
855
+ end
856
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
857
+
858
+ FEDWIRE =
859
+ T.let(
860
+ :FEDWIRE,
861
+ Lithic::Payment::MethodAttributes::WireMethodAttributes::WireNetwork::TaggedSymbol
862
+ )
863
+ SWIFT =
864
+ T.let(
865
+ :SWIFT,
866
+ Lithic::Payment::MethodAttributes::WireMethodAttributes::WireNetwork::TaggedSymbol
867
+ )
868
+
869
+ sig do
870
+ override.returns(
871
+ T::Array[
872
+ Lithic::Payment::MethodAttributes::WireMethodAttributes::WireNetwork::TaggedSymbol
873
+ ]
874
+ )
875
+ end
876
+ def self.values
877
+ end
665
878
  end
666
879
  end
880
+
881
+ sig do
882
+ override.returns(
883
+ T::Array[Lithic::Payment::MethodAttributes::Variants]
884
+ )
885
+ end
886
+ def self.variants
887
+ end
667
888
  end
668
889
 
669
890
  class RelatedAccountTokens < Lithic::Internal::Type::BaseModel
@@ -683,7 +904,7 @@ module Lithic
683
904
  sig { returns(T.nilable(String)) }
684
905
  attr_accessor :business_account_token
685
906
 
686
- # Account tokens related to a payment transaction
907
+ # Related account tokens for the transaction
687
908
  sig do
688
909
  params(
689
910
  account_token: T.nilable(String),
@@ -710,8 +931,7 @@ module Lithic
710
931
  end
711
932
  end
712
933
 
713
- # APPROVED payments were successful while DECLINED payments were declined by
714
- # Lithic or returned.
934
+ # Transaction result
715
935
  module Result
716
936
  extend Lithic::Internal::Type::Enum
717
937
 
@@ -728,14 +948,16 @@ module Lithic
728
948
  end
729
949
  end
730
950
 
951
+ # Transaction source
731
952
  module Source
732
953
  extend Lithic::Internal::Type::Enum
733
954
 
734
955
  TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Payment::Source) }
735
956
  OrSymbol = T.type_alias { T.any(Symbol, String) }
736
957
 
737
- CUSTOMER = T.let(:CUSTOMER, Lithic::Payment::Source::TaggedSymbol)
738
958
  LITHIC = T.let(:LITHIC, Lithic::Payment::Source::TaggedSymbol)
959
+ EXTERNAL = T.let(:EXTERNAL, Lithic::Payment::Source::TaggedSymbol)
960
+ CUSTOMER = T.let(:CUSTOMER, Lithic::Payment::Source::TaggedSymbol)
739
961
 
740
962
  sig do
741
963
  override.returns(T::Array[Lithic::Payment::Source::TaggedSymbol])
@@ -744,23 +966,18 @@ module Lithic
744
966
  end
745
967
  end
746
968
 
747
- # Status types:
748
- #
749
- # - `DECLINED` - The payment was declined.
750
- # - `PENDING` - The payment is being processed and has yet to settle or release
751
- # (origination debit).
752
- # - `RETURNED` - The payment has been returned.
753
- # - `SETTLED` - The payment is completed.
969
+ # The status of the transaction
754
970
  module Status
755
971
  extend Lithic::Internal::Type::Enum
756
972
 
757
973
  TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Payment::Status) }
758
974
  OrSymbol = T.type_alias { T.any(Symbol, String) }
759
975
 
760
- DECLINED = T.let(:DECLINED, Lithic::Payment::Status::TaggedSymbol)
761
976
  PENDING = T.let(:PENDING, Lithic::Payment::Status::TaggedSymbol)
762
- RETURNED = T.let(:RETURNED, Lithic::Payment::Status::TaggedSymbol)
763
977
  SETTLED = T.let(:SETTLED, Lithic::Payment::Status::TaggedSymbol)
978
+ DECLINED = T.let(:DECLINED, Lithic::Payment::Status::TaggedSymbol)
979
+ REVERSED = T.let(:REVERSED, Lithic::Payment::Status::TaggedSymbol)
980
+ CANCELED = T.let(:CANCELED, Lithic::Payment::Status::TaggedSymbol)
764
981
 
765
982
  sig do
766
983
  override.returns(T::Array[Lithic::Payment::Status::TaggedSymbol])
@@ -769,7 +986,6 @@ module Lithic
769
986
  end
770
987
  end
771
988
 
772
- # Payment type indicating the specific ACH message or Fedwire transfer type
773
989
  module Type
774
990
  extend Lithic::Internal::Type::Enum
775
991