lithic 0.13.0 → 0.15.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 (145) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +4 -0
  5. data/lib/lithic/internal/transport/base_client.rb +2 -0
  6. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +4 -4
  7. data/lib/lithic/models/account_retrieve_signals_params.rb +20 -0
  8. data/lib/lithic/models/auth_rules/auth_rule.rb +10 -6
  9. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +2 -2
  10. data/lib/lithic/models/auth_rules/auth_rule_version.rb +5 -3
  11. data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +8 -6
  12. data/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +4 -4
  13. data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +119 -44
  14. data/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb +533 -0
  15. data/lib/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rb +18 -14
  16. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +6 -6
  17. data/lib/lithic/models/auth_rules/conditional_value.rb +3 -2
  18. data/lib/lithic/models/auth_rules/v2_create_params.rb +15 -9
  19. data/lib/lithic/models/auth_rules/v2_draft_params.rb +5 -3
  20. data/lib/lithic/models/balance.rb +8 -6
  21. data/lib/lithic/models/card_authorization.rb +1266 -0
  22. data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +3 -1253
  23. data/lib/lithic/models/card_authorization_challenge_response_params.rb +40 -0
  24. data/lib/lithic/models/card_authorization_challenge_response_webhook_event.rb +1 -0
  25. data/lib/lithic/models/card_authorization_challenge_webhook_event.rb +67 -0
  26. data/lib/lithic/models/card_program.rb +2 -2
  27. data/lib/lithic/models/card_retrieve_signals_params.rb +20 -0
  28. data/lib/lithic/models/event.rb +13 -4
  29. data/lib/lithic/models/event_list_params.rb +7 -2
  30. data/lib/lithic/models/event_subscription.rb +7 -2
  31. data/lib/lithic/models/events/subscription_create_params.rb +7 -2
  32. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
  33. data/lib/lithic/models/events/subscription_update_params.rb +7 -2
  34. data/lib/lithic/models/external_bank_account.rb +1 -1
  35. data/lib/lithic/models/external_bank_account_pause_params.rb +20 -0
  36. data/lib/lithic/models/financial_accounts/statement.rb +4 -4
  37. data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +3 -2
  38. data/lib/lithic/models/financial_event.rb +1 -0
  39. data/lib/lithic/models/kyb_business_entity.rb +2 -2
  40. data/lib/lithic/models/parsed_webhook_event.rb +4 -1
  41. data/lib/lithic/models/settlement_detail.rb +14 -14
  42. data/lib/lithic/models/signals_response.rb +306 -0
  43. data/lib/lithic/models/statement_totals.rb +6 -6
  44. data/lib/lithic/models/tokenization_decline_reason.rb +1 -0
  45. data/lib/lithic/models/transaction.rb +2 -2
  46. data/lib/lithic/models/transfer_limits_response.rb +12 -12
  47. data/lib/lithic/models.rb +14 -0
  48. data/lib/lithic/resources/accounts.rb +27 -0
  49. data/lib/lithic/resources/auth_rules/v2.rb +1 -1
  50. data/lib/lithic/resources/card_authorizations.rb +45 -0
  51. data/lib/lithic/resources/cards.rb +25 -0
  52. data/lib/lithic/resources/external_bank_accounts.rb +19 -0
  53. data/lib/lithic/resources/webhooks.rb +1 -1
  54. data/lib/lithic/version.rb +1 -1
  55. data/lib/lithic.rb +9 -0
  56. data/rbi/lithic/client.rbi +3 -0
  57. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +6 -12
  58. data/rbi/lithic/models/account_retrieve_signals_params.rbi +35 -0
  59. data/rbi/lithic/models/auth_rules/auth_rule.rbi +8 -4
  60. data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +4 -2
  61. data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +9 -6
  62. data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +3 -3
  63. data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +214 -63
  64. data/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi +1147 -0
  65. data/rbi/lithic/models/auth_rules/conditional_card_transaction_update_action_parameters.rbi +24 -18
  66. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +6 -6
  67. data/rbi/lithic/models/auth_rules/conditional_value.rbi +1 -1
  68. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +24 -12
  69. data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +8 -4
  70. data/rbi/lithic/models/balance.rbi +12 -6
  71. data/rbi/lithic/models/card_authorization.rbi +2540 -0
  72. data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +5 -2758
  73. data/rbi/lithic/models/card_authorization_challenge_response_params.rbi +93 -0
  74. data/rbi/lithic/models/card_authorization_challenge_response_webhook_event.rbi +5 -0
  75. data/rbi/lithic/models/card_authorization_challenge_webhook_event.rbi +119 -0
  76. data/rbi/lithic/models/card_program.rbi +3 -6
  77. data/rbi/lithic/models/card_retrieve_signals_params.rbi +35 -0
  78. data/rbi/lithic/models/event.rbi +23 -6
  79. data/rbi/lithic/models/event_list_params.rbi +11 -2
  80. data/rbi/lithic/models/event_subscription.rbi +11 -2
  81. data/rbi/lithic/models/events/subscription_create_params.rbi +11 -2
  82. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
  83. data/rbi/lithic/models/events/subscription_update_params.rbi +11 -2
  84. data/rbi/lithic/models/external_bank_account_pause_params.rbi +41 -0
  85. data/rbi/lithic/models/financial_accounts/statement.rbi +6 -12
  86. data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +8 -6
  87. data/rbi/lithic/models/financial_event.rbi +2 -0
  88. data/rbi/lithic/models/kyb_business_entity.rbi +3 -6
  89. data/rbi/lithic/models/parsed_webhook_event.rbi +1 -0
  90. data/rbi/lithic/models/settlement_detail.rbi +15 -15
  91. data/rbi/lithic/models/signals_response.rbi +352 -0
  92. data/rbi/lithic/models/statement_totals.rbi +9 -18
  93. data/rbi/lithic/models/tokenization_decline_reason.rbi +2 -0
  94. data/rbi/lithic/models/transaction.rbi +3 -3
  95. data/rbi/lithic/models/transfer_limits_response.rbi +48 -48
  96. data/rbi/lithic/models.rbi +17 -0
  97. data/rbi/lithic/resources/accounts.rbi +21 -0
  98. data/rbi/lithic/resources/auth_rules/v2.rbi +2 -1
  99. data/rbi/lithic/resources/card_authorizations.rbi +35 -0
  100. data/rbi/lithic/resources/cards.rbi +19 -0
  101. data/rbi/lithic/resources/external_bank_accounts.rbi +10 -0
  102. data/rbi/lithic/resources/webhooks.rbi +4 -1
  103. data/sig/lithic/client.rbs +2 -0
  104. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +8 -12
  105. data/sig/lithic/models/account_retrieve_signals_params.rbs +23 -0
  106. data/sig/lithic/models/auth_rules/auth_rule.rbs +2 -0
  107. data/sig/lithic/models/auth_rules/auth_rule_version.rbs +1 -0
  108. data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +29 -3
  109. data/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs +276 -0
  110. data/sig/lithic/models/auth_rules/conditional_value.rbs +1 -1
  111. data/sig/lithic/models/auth_rules/v2_create_params.rbs +3 -0
  112. data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -0
  113. data/sig/lithic/models/balance.rbs +17 -9
  114. data/sig/lithic/models/card_authorization.rbs +1038 -0
  115. data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +7 -1013
  116. data/sig/lithic/models/card_authorization_challenge_response_params.rbs +42 -0
  117. data/sig/lithic/models/card_authorization_challenge_response_webhook_event.rbs +2 -1
  118. data/sig/lithic/models/card_authorization_challenge_webhook_event.rbs +53 -0
  119. data/sig/lithic/models/card_program.rbs +4 -6
  120. data/sig/lithic/models/card_retrieve_signals_params.rbs +23 -0
  121. data/sig/lithic/models/event.rbs +2 -0
  122. data/sig/lithic/models/event_list_params.rbs +2 -0
  123. data/sig/lithic/models/event_subscription.rbs +2 -0
  124. data/sig/lithic/models/events/subscription_create_params.rbs +2 -0
  125. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +2 -0
  126. data/sig/lithic/models/events/subscription_update_params.rbs +2 -0
  127. data/sig/lithic/models/external_bank_account_pause_params.rbs +24 -0
  128. data/sig/lithic/models/financial_accounts/statement.rbs +8 -12
  129. data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +6 -6
  130. data/sig/lithic/models/financial_event.rbs +2 -0
  131. data/sig/lithic/models/kyb_business_entity.rbs +4 -6
  132. data/sig/lithic/models/parsed_webhook_event.rbs +1 -0
  133. data/sig/lithic/models/settlement_detail.rbs +18 -18
  134. data/sig/lithic/models/signals_response.rbs +170 -0
  135. data/sig/lithic/models/statement_totals.rbs +12 -18
  136. data/sig/lithic/models/tokenization_decline_reason.rbs +2 -0
  137. data/sig/lithic/models/transaction.rbs +4 -8
  138. data/sig/lithic/models/transfer_limits_response.rbs +24 -36
  139. data/sig/lithic/models.rbs +14 -0
  140. data/sig/lithic/resources/accounts.rbs +5 -0
  141. data/sig/lithic/resources/card_authorizations.rbs +13 -0
  142. data/sig/lithic/resources/cards.rbs +5 -0
  143. data/sig/lithic/resources/external_bank_accounts.rbs +5 -0
  144. data/sig/lithic/resources/webhooks.rbs +1 -0
  145. metadata +29 -2
@@ -0,0 +1,2540 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ class CardAuthorization < Lithic::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Lithic::CardAuthorization, Lithic::Internal::AnyHash)
9
+ end
10
+
11
+ # The provisional transaction group uuid associated with the authorization
12
+ sig { returns(String) }
13
+ attr_accessor :token
14
+
15
+ # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be
16
+ # zero if no fee is assessed. Rebates may be transmitted as a negative value to
17
+ # indicate credited fees.
18
+ sig { returns(Integer) }
19
+ attr_accessor :acquirer_fee
20
+
21
+ # Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
22
+ # including any acquirer fees. The contents of this field are identical to
23
+ # `authorization_amount`.
24
+ sig { returns(Integer) }
25
+ attr_accessor :amount
26
+
27
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
28
+ # amounts reflect the original network authorization values. For programs with
29
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
30
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
31
+ # anticipated final transaction amounts such as tips or fuel fill-ups
32
+ sig { returns(Lithic::CardAuthorization::Amounts) }
33
+ attr_reader :amounts
34
+
35
+ sig { params(amounts: Lithic::CardAuthorization::Amounts::OrHash).void }
36
+ attr_writer :amounts
37
+
38
+ # Deprecated, use `amounts`. The base transaction amount (in cents) plus the
39
+ # acquirer fee field. This is the amount the issuer should authorize against
40
+ # unless the issuer is paying the acquirer fee on behalf of the cardholder.
41
+ sig { returns(Integer) }
42
+ attr_accessor :authorization_amount
43
+
44
+ sig { returns(Lithic::CardAuthorization::Avs) }
45
+ attr_reader :avs
46
+
47
+ sig { params(avs: Lithic::CardAuthorization::Avs::OrHash).void }
48
+ attr_writer :avs
49
+
50
+ # Card object in ASA
51
+ sig { returns(Lithic::CardAuthorization::Card) }
52
+ attr_reader :card
53
+
54
+ sig { params(card: Lithic::CardAuthorization::Card::OrHash).void }
55
+ attr_writer :card
56
+
57
+ # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
58
+ # billing currency.
59
+ sig { returns(String) }
60
+ attr_accessor :cardholder_currency
61
+
62
+ # The portion of the transaction requested as cash back by the cardholder, and
63
+ # does not include any acquirer fees. The amount field includes the purchase
64
+ # amount, the requested cash back amount, and any acquirer fees.
65
+ #
66
+ # If no cash back was requested, the value of this field will be 0, and the field
67
+ # will always be present.
68
+ sig { returns(Integer) }
69
+ attr_accessor :cash_amount
70
+
71
+ # Date and time when the transaction first occurred in UTC.
72
+ sig { returns(Time) }
73
+ attr_accessor :created
74
+
75
+ # Merchant information including full location details.
76
+ sig { returns(Lithic::CardAuthorization::Merchant) }
77
+ attr_reader :merchant
78
+
79
+ sig { params(merchant: Lithic::CardAuthorization::Merchant::OrHash).void }
80
+ attr_writer :merchant
81
+
82
+ # Deprecated, use `amounts`. The amount that the merchant will receive,
83
+ # denominated in `merchant_currency` and in the smallest currency unit. Note the
84
+ # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
85
+ # different from `authorization_amount` if the merchant is taking payment in a
86
+ # different currency.
87
+ sig { returns(Integer) }
88
+ attr_accessor :merchant_amount
89
+
90
+ # 3-character alphabetic ISO 4217 code for the local currency of the transaction.
91
+ sig { returns(String) }
92
+ attr_accessor :merchant_currency
93
+
94
+ # Where the cardholder received the service, when different from the card acceptor
95
+ # location. This is populated from network data elements such as Mastercard DE-122
96
+ # SE1 SF9-14 and Visa F34 DS02.
97
+ sig { returns(T.nilable(Lithic::CardAuthorization::ServiceLocation)) }
98
+ attr_reader :service_location
99
+
100
+ sig do
101
+ params(
102
+ service_location:
103
+ T.nilable(Lithic::CardAuthorization::ServiceLocation::OrHash)
104
+ ).void
105
+ end
106
+ attr_writer :service_location
107
+
108
+ # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
109
+ # settled, including any acquirer fees.
110
+ sig { returns(Integer) }
111
+ attr_accessor :settled_amount
112
+
113
+ # The type of authorization request that this request is for. Note that
114
+ # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
115
+ # users with credit decisioning via ASA enabled.
116
+ sig { returns(Lithic::CardAuthorization::Status::TaggedSymbol) }
117
+ attr_accessor :status
118
+
119
+ # The entity that initiated the transaction.
120
+ sig do
121
+ returns(Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol)
122
+ end
123
+ attr_accessor :transaction_initiator
124
+
125
+ sig do
126
+ returns(T.nilable(Lithic::CardAuthorization::AccountType::TaggedSymbol))
127
+ end
128
+ attr_reader :account_type
129
+
130
+ sig do
131
+ params(
132
+ account_type: Lithic::CardAuthorization::AccountType::OrSymbol
133
+ ).void
134
+ end
135
+ attr_writer :account_type
136
+
137
+ sig { returns(T.nilable(Lithic::CardholderAuthentication)) }
138
+ attr_reader :cardholder_authentication
139
+
140
+ sig do
141
+ params(
142
+ cardholder_authentication: Lithic::CardholderAuthentication::OrHash
143
+ ).void
144
+ end
145
+ attr_writer :cardholder_authentication
146
+
147
+ # Deprecated, use `cash_amount`.
148
+ sig { returns(T.nilable(Integer)) }
149
+ attr_reader :cashback
150
+
151
+ sig { params(cashback: Integer).void }
152
+ attr_writer :cashback
153
+
154
+ # Deprecated, use `amounts`. If the transaction was requested in a currency other
155
+ # than the settlement currency, this field will be populated to indicate the rate
156
+ # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
157
+ # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
158
+ # currency and the amount is in the settlement currency.
159
+ sig { returns(T.nilable(Float)) }
160
+ attr_reader :conversion_rate
161
+
162
+ sig { params(conversion_rate: Float).void }
163
+ attr_writer :conversion_rate
164
+
165
+ # The event token associated with the authorization. This field is only set for
166
+ # programs enrolled into the beta.
167
+ sig { returns(T.nilable(String)) }
168
+ attr_reader :event_token
169
+
170
+ sig { params(event_token: String).void }
171
+ attr_writer :event_token
172
+
173
+ # Optional Object containing information if the Card is a part of a Fleet managed
174
+ # program
175
+ sig { returns(T.nilable(Lithic::CardAuthorization::FleetInfo)) }
176
+ attr_reader :fleet_info
177
+
178
+ sig do
179
+ params(
180
+ fleet_info: T.nilable(Lithic::CardAuthorization::FleetInfo::OrHash)
181
+ ).void
182
+ end
183
+ attr_writer :fleet_info
184
+
185
+ # The latest Authorization Challenge that was issued to the cardholder for this
186
+ # merchant.
187
+ sig { returns(T.nilable(Lithic::CardAuthorization::LatestChallenge)) }
188
+ attr_reader :latest_challenge
189
+
190
+ sig do
191
+ params(
192
+ latest_challenge: Lithic::CardAuthorization::LatestChallenge::OrHash
193
+ ).void
194
+ end
195
+ attr_writer :latest_challenge
196
+
197
+ # Card network of the authorization.
198
+ sig do
199
+ returns(T.nilable(Lithic::CardAuthorization::Network::TaggedSymbol))
200
+ end
201
+ attr_reader :network
202
+
203
+ sig { params(network: Lithic::CardAuthorization::Network::OrSymbol).void }
204
+ attr_writer :network
205
+
206
+ # Network-provided score assessing risk level associated with a given
207
+ # authorization. Scores are on a range of 0-999, with 0 representing the lowest
208
+ # risk and 999 representing the highest risk. For Visa transactions, where the raw
209
+ # score has a range of 0-99, Lithic will normalize the score by multiplying the
210
+ # raw score by 10x.
211
+ sig { returns(T.nilable(Integer)) }
212
+ attr_accessor :network_risk_score
213
+
214
+ # Contains raw data provided by the card network, including attributes that
215
+ # provide further context about the authorization. If populated by the network,
216
+ # data is organized by Lithic and passed through without further modification.
217
+ # Please consult the official network documentation for more details about these
218
+ # values and how to use them. This object is only available to certain programs-
219
+ # contact your Customer Success Manager to discuss enabling access.
220
+ sig { returns(T.nilable(Lithic::CardAuthorization::NetworkSpecificData)) }
221
+ attr_reader :network_specific_data
222
+
223
+ sig do
224
+ params(
225
+ network_specific_data:
226
+ T.nilable(Lithic::CardAuthorization::NetworkSpecificData::OrHash)
227
+ ).void
228
+ end
229
+ attr_writer :network_specific_data
230
+
231
+ sig { returns(T.nilable(Lithic::CardAuthorization::Pos)) }
232
+ attr_reader :pos
233
+
234
+ sig { params(pos: Lithic::CardAuthorization::Pos::OrHash).void }
235
+ attr_writer :pos
236
+
237
+ sig { returns(T.nilable(Lithic::TokenInfo)) }
238
+ attr_reader :token_info
239
+
240
+ sig { params(token_info: T.nilable(Lithic::TokenInfo::OrHash)).void }
241
+ attr_writer :token_info
242
+
243
+ # Deprecated: approximate time-to-live for the authorization.
244
+ sig { returns(T.nilable(Time)) }
245
+ attr_reader :ttl
246
+
247
+ sig { params(ttl: Time).void }
248
+ attr_writer :ttl
249
+
250
+ # Card Authorization
251
+ sig do
252
+ params(
253
+ token: String,
254
+ acquirer_fee: Integer,
255
+ amount: Integer,
256
+ amounts: Lithic::CardAuthorization::Amounts::OrHash,
257
+ authorization_amount: Integer,
258
+ avs: Lithic::CardAuthorization::Avs::OrHash,
259
+ card: Lithic::CardAuthorization::Card::OrHash,
260
+ cardholder_currency: String,
261
+ cash_amount: Integer,
262
+ created: Time,
263
+ merchant: Lithic::CardAuthorization::Merchant::OrHash,
264
+ merchant_amount: Integer,
265
+ merchant_currency: String,
266
+ service_location:
267
+ T.nilable(Lithic::CardAuthorization::ServiceLocation::OrHash),
268
+ settled_amount: Integer,
269
+ status: Lithic::CardAuthorization::Status::OrSymbol,
270
+ transaction_initiator:
271
+ Lithic::CardAuthorization::TransactionInitiator::OrSymbol,
272
+ account_type: Lithic::CardAuthorization::AccountType::OrSymbol,
273
+ cardholder_authentication: Lithic::CardholderAuthentication::OrHash,
274
+ cashback: Integer,
275
+ conversion_rate: Float,
276
+ event_token: String,
277
+ fleet_info: T.nilable(Lithic::CardAuthorization::FleetInfo::OrHash),
278
+ latest_challenge: Lithic::CardAuthorization::LatestChallenge::OrHash,
279
+ network: Lithic::CardAuthorization::Network::OrSymbol,
280
+ network_risk_score: T.nilable(Integer),
281
+ network_specific_data:
282
+ T.nilable(Lithic::CardAuthorization::NetworkSpecificData::OrHash),
283
+ pos: Lithic::CardAuthorization::Pos::OrHash,
284
+ token_info: T.nilable(Lithic::TokenInfo::OrHash),
285
+ ttl: Time
286
+ ).returns(T.attached_class)
287
+ end
288
+ def self.new(
289
+ # The provisional transaction group uuid associated with the authorization
290
+ token:,
291
+ # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be
292
+ # zero if no fee is assessed. Rebates may be transmitted as a negative value to
293
+ # indicate credited fees.
294
+ acquirer_fee:,
295
+ # Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
296
+ # including any acquirer fees. The contents of this field are identical to
297
+ # `authorization_amount`.
298
+ amount:,
299
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
300
+ # amounts reflect the original network authorization values. For programs with
301
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
302
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
303
+ # anticipated final transaction amounts such as tips or fuel fill-ups
304
+ amounts:,
305
+ # Deprecated, use `amounts`. The base transaction amount (in cents) plus the
306
+ # acquirer fee field. This is the amount the issuer should authorize against
307
+ # unless the issuer is paying the acquirer fee on behalf of the cardholder.
308
+ authorization_amount:,
309
+ avs:,
310
+ # Card object in ASA
311
+ card:,
312
+ # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
313
+ # billing currency.
314
+ cardholder_currency:,
315
+ # The portion of the transaction requested as cash back by the cardholder, and
316
+ # does not include any acquirer fees. The amount field includes the purchase
317
+ # amount, the requested cash back amount, and any acquirer fees.
318
+ #
319
+ # If no cash back was requested, the value of this field will be 0, and the field
320
+ # will always be present.
321
+ cash_amount:,
322
+ # Date and time when the transaction first occurred in UTC.
323
+ created:,
324
+ # Merchant information including full location details.
325
+ merchant:,
326
+ # Deprecated, use `amounts`. The amount that the merchant will receive,
327
+ # denominated in `merchant_currency` and in the smallest currency unit. Note the
328
+ # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
329
+ # different from `authorization_amount` if the merchant is taking payment in a
330
+ # different currency.
331
+ merchant_amount:,
332
+ # 3-character alphabetic ISO 4217 code for the local currency of the transaction.
333
+ merchant_currency:,
334
+ # Where the cardholder received the service, when different from the card acceptor
335
+ # location. This is populated from network data elements such as Mastercard DE-122
336
+ # SE1 SF9-14 and Visa F34 DS02.
337
+ service_location:,
338
+ # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
339
+ # settled, including any acquirer fees.
340
+ settled_amount:,
341
+ # The type of authorization request that this request is for. Note that
342
+ # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
343
+ # users with credit decisioning via ASA enabled.
344
+ status:,
345
+ # The entity that initiated the transaction.
346
+ transaction_initiator:,
347
+ account_type: nil,
348
+ cardholder_authentication: nil,
349
+ # Deprecated, use `cash_amount`.
350
+ cashback: nil,
351
+ # Deprecated, use `amounts`. If the transaction was requested in a currency other
352
+ # than the settlement currency, this field will be populated to indicate the rate
353
+ # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
354
+ # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
355
+ # currency and the amount is in the settlement currency.
356
+ conversion_rate: nil,
357
+ # The event token associated with the authorization. This field is only set for
358
+ # programs enrolled into the beta.
359
+ event_token: nil,
360
+ # Optional Object containing information if the Card is a part of a Fleet managed
361
+ # program
362
+ fleet_info: nil,
363
+ # The latest Authorization Challenge that was issued to the cardholder for this
364
+ # merchant.
365
+ latest_challenge: nil,
366
+ # Card network of the authorization.
367
+ network: nil,
368
+ # Network-provided score assessing risk level associated with a given
369
+ # authorization. Scores are on a range of 0-999, with 0 representing the lowest
370
+ # risk and 999 representing the highest risk. For Visa transactions, where the raw
371
+ # score has a range of 0-99, Lithic will normalize the score by multiplying the
372
+ # raw score by 10x.
373
+ network_risk_score: nil,
374
+ # Contains raw data provided by the card network, including attributes that
375
+ # provide further context about the authorization. If populated by the network,
376
+ # data is organized by Lithic and passed through without further modification.
377
+ # Please consult the official network documentation for more details about these
378
+ # values and how to use them. This object is only available to certain programs-
379
+ # contact your Customer Success Manager to discuss enabling access.
380
+ network_specific_data: nil,
381
+ pos: nil,
382
+ token_info: nil,
383
+ # Deprecated: approximate time-to-live for the authorization.
384
+ ttl: nil
385
+ )
386
+ end
387
+
388
+ sig do
389
+ override.returns(
390
+ {
391
+ token: String,
392
+ acquirer_fee: Integer,
393
+ amount: Integer,
394
+ amounts: Lithic::CardAuthorization::Amounts,
395
+ authorization_amount: Integer,
396
+ avs: Lithic::CardAuthorization::Avs,
397
+ card: Lithic::CardAuthorization::Card,
398
+ cardholder_currency: String,
399
+ cash_amount: Integer,
400
+ created: Time,
401
+ merchant: Lithic::CardAuthorization::Merchant,
402
+ merchant_amount: Integer,
403
+ merchant_currency: String,
404
+ service_location:
405
+ T.nilable(Lithic::CardAuthorization::ServiceLocation),
406
+ settled_amount: Integer,
407
+ status: Lithic::CardAuthorization::Status::TaggedSymbol,
408
+ transaction_initiator:
409
+ Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol,
410
+ account_type: Lithic::CardAuthorization::AccountType::TaggedSymbol,
411
+ cardholder_authentication: Lithic::CardholderAuthentication,
412
+ cashback: Integer,
413
+ conversion_rate: Float,
414
+ event_token: String,
415
+ fleet_info: T.nilable(Lithic::CardAuthorization::FleetInfo),
416
+ latest_challenge: Lithic::CardAuthorization::LatestChallenge,
417
+ network: Lithic::CardAuthorization::Network::TaggedSymbol,
418
+ network_risk_score: T.nilable(Integer),
419
+ network_specific_data:
420
+ T.nilable(Lithic::CardAuthorization::NetworkSpecificData),
421
+ pos: Lithic::CardAuthorization::Pos,
422
+ token_info: T.nilable(Lithic::TokenInfo),
423
+ ttl: Time
424
+ }
425
+ )
426
+ end
427
+ def to_hash
428
+ end
429
+
430
+ class Amounts < Lithic::Internal::Type::BaseModel
431
+ OrHash =
432
+ T.type_alias do
433
+ T.any(Lithic::CardAuthorization::Amounts, Lithic::Internal::AnyHash)
434
+ end
435
+
436
+ sig { returns(Lithic::CardAuthorization::Amounts::Cardholder) }
437
+ attr_reader :cardholder
438
+
439
+ sig do
440
+ params(
441
+ cardholder: Lithic::CardAuthorization::Amounts::Cardholder::OrHash
442
+ ).void
443
+ end
444
+ attr_writer :cardholder
445
+
446
+ sig { returns(T.nilable(Lithic::CardAuthorization::Amounts::Hold)) }
447
+ attr_reader :hold
448
+
449
+ sig do
450
+ params(
451
+ hold: T.nilable(Lithic::CardAuthorization::Amounts::Hold::OrHash)
452
+ ).void
453
+ end
454
+ attr_writer :hold
455
+
456
+ sig { returns(Lithic::CardAuthorization::Amounts::Merchant) }
457
+ attr_reader :merchant
458
+
459
+ sig do
460
+ params(
461
+ merchant: Lithic::CardAuthorization::Amounts::Merchant::OrHash
462
+ ).void
463
+ end
464
+ attr_writer :merchant
465
+
466
+ sig do
467
+ returns(T.nilable(Lithic::CardAuthorization::Amounts::Settlement))
468
+ end
469
+ attr_reader :settlement
470
+
471
+ sig do
472
+ params(
473
+ settlement:
474
+ T.nilable(Lithic::CardAuthorization::Amounts::Settlement::OrHash)
475
+ ).void
476
+ end
477
+ attr_writer :settlement
478
+
479
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
480
+ # amounts reflect the original network authorization values. For programs with
481
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
482
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
483
+ # anticipated final transaction amounts such as tips or fuel fill-ups
484
+ sig do
485
+ params(
486
+ cardholder: Lithic::CardAuthorization::Amounts::Cardholder::OrHash,
487
+ hold: T.nilable(Lithic::CardAuthorization::Amounts::Hold::OrHash),
488
+ merchant: Lithic::CardAuthorization::Amounts::Merchant::OrHash,
489
+ settlement:
490
+ T.nilable(Lithic::CardAuthorization::Amounts::Settlement::OrHash)
491
+ ).returns(T.attached_class)
492
+ end
493
+ def self.new(cardholder:, hold:, merchant:, settlement:)
494
+ end
495
+
496
+ sig do
497
+ override.returns(
498
+ {
499
+ cardholder: Lithic::CardAuthorization::Amounts::Cardholder,
500
+ hold: T.nilable(Lithic::CardAuthorization::Amounts::Hold),
501
+ merchant: Lithic::CardAuthorization::Amounts::Merchant,
502
+ settlement:
503
+ T.nilable(Lithic::CardAuthorization::Amounts::Settlement)
504
+ }
505
+ )
506
+ end
507
+ def to_hash
508
+ end
509
+
510
+ class Cardholder < Lithic::Internal::Type::BaseModel
511
+ OrHash =
512
+ T.type_alias do
513
+ T.any(
514
+ Lithic::CardAuthorization::Amounts::Cardholder,
515
+ Lithic::Internal::AnyHash
516
+ )
517
+ end
518
+
519
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
520
+ sig { returns(Integer) }
521
+ attr_accessor :amount
522
+
523
+ # Exchange rate used for currency conversion
524
+ sig { returns(String) }
525
+ attr_accessor :conversion_rate
526
+
527
+ # 3-character alphabetic ISO 4217 currency
528
+ sig { returns(String) }
529
+ attr_accessor :currency
530
+
531
+ sig do
532
+ params(
533
+ amount: Integer,
534
+ conversion_rate: String,
535
+ currency: String
536
+ ).returns(T.attached_class)
537
+ end
538
+ def self.new(
539
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
540
+ amount:,
541
+ # Exchange rate used for currency conversion
542
+ conversion_rate:,
543
+ # 3-character alphabetic ISO 4217 currency
544
+ currency:
545
+ )
546
+ end
547
+
548
+ sig do
549
+ override.returns(
550
+ { amount: Integer, conversion_rate: String, currency: String }
551
+ )
552
+ end
553
+ def to_hash
554
+ end
555
+ end
556
+
557
+ class Hold < Lithic::Internal::Type::BaseModel
558
+ OrHash =
559
+ T.type_alias do
560
+ T.any(
561
+ Lithic::CardAuthorization::Amounts::Hold,
562
+ Lithic::Internal::AnyHash
563
+ )
564
+ end
565
+
566
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
567
+ sig { returns(Integer) }
568
+ attr_accessor :amount
569
+
570
+ # 3-character alphabetic ISO 4217 currency
571
+ sig { returns(String) }
572
+ attr_accessor :currency
573
+
574
+ sig do
575
+ params(amount: Integer, currency: String).returns(T.attached_class)
576
+ end
577
+ def self.new(
578
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
579
+ amount:,
580
+ # 3-character alphabetic ISO 4217 currency
581
+ currency:
582
+ )
583
+ end
584
+
585
+ sig { override.returns({ amount: Integer, currency: String }) }
586
+ def to_hash
587
+ end
588
+ end
589
+
590
+ class Merchant < Lithic::Internal::Type::BaseModel
591
+ OrHash =
592
+ T.type_alias do
593
+ T.any(
594
+ Lithic::CardAuthorization::Amounts::Merchant,
595
+ Lithic::Internal::AnyHash
596
+ )
597
+ end
598
+
599
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
600
+ sig { returns(Integer) }
601
+ attr_accessor :amount
602
+
603
+ # 3-character alphabetic ISO 4217 currency
604
+ sig { returns(String) }
605
+ attr_accessor :currency
606
+
607
+ sig do
608
+ params(amount: Integer, currency: String).returns(T.attached_class)
609
+ end
610
+ def self.new(
611
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
612
+ amount:,
613
+ # 3-character alphabetic ISO 4217 currency
614
+ currency:
615
+ )
616
+ end
617
+
618
+ sig { override.returns({ amount: Integer, currency: String }) }
619
+ def to_hash
620
+ end
621
+ end
622
+
623
+ class Settlement < Lithic::Internal::Type::BaseModel
624
+ OrHash =
625
+ T.type_alias do
626
+ T.any(
627
+ Lithic::CardAuthorization::Amounts::Settlement,
628
+ Lithic::Internal::AnyHash
629
+ )
630
+ end
631
+
632
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
633
+ sig { returns(Integer) }
634
+ attr_accessor :amount
635
+
636
+ # 3-character alphabetic ISO 4217 currency
637
+ sig { returns(String) }
638
+ attr_accessor :currency
639
+
640
+ sig do
641
+ params(amount: Integer, currency: String).returns(T.attached_class)
642
+ end
643
+ def self.new(
644
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
645
+ amount:,
646
+ # 3-character alphabetic ISO 4217 currency
647
+ currency:
648
+ )
649
+ end
650
+
651
+ sig { override.returns({ amount: Integer, currency: String }) }
652
+ def to_hash
653
+ end
654
+ end
655
+ end
656
+
657
+ class Avs < Lithic::Internal::Type::BaseModel
658
+ OrHash =
659
+ T.type_alias do
660
+ T.any(Lithic::CardAuthorization::Avs, Lithic::Internal::AnyHash)
661
+ end
662
+
663
+ # Cardholder address
664
+ sig { returns(String) }
665
+ attr_accessor :address
666
+
667
+ # Lithic's evaluation result comparing the transaction's address data with the
668
+ # cardholder KYC data if it exists. In the event Lithic does not have any
669
+ # Cardholder KYC data, or the transaction does not contain any address data,
670
+ # NOT_PRESENT will be returned
671
+ sig do
672
+ returns(
673
+ Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol
674
+ )
675
+ end
676
+ attr_accessor :address_on_file_match
677
+
678
+ # Cardholder ZIP code
679
+ sig { returns(String) }
680
+ attr_accessor :zipcode
681
+
682
+ sig do
683
+ params(
684
+ address: String,
685
+ address_on_file_match:
686
+ Lithic::CardAuthorization::Avs::AddressOnFileMatch::OrSymbol,
687
+ zipcode: String
688
+ ).returns(T.attached_class)
689
+ end
690
+ def self.new(
691
+ # Cardholder address
692
+ address:,
693
+ # Lithic's evaluation result comparing the transaction's address data with the
694
+ # cardholder KYC data if it exists. In the event Lithic does not have any
695
+ # Cardholder KYC data, or the transaction does not contain any address data,
696
+ # NOT_PRESENT will be returned
697
+ address_on_file_match:,
698
+ # Cardholder ZIP code
699
+ zipcode:
700
+ )
701
+ end
702
+
703
+ sig do
704
+ override.returns(
705
+ {
706
+ address: String,
707
+ address_on_file_match:
708
+ Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol,
709
+ zipcode: String
710
+ }
711
+ )
712
+ end
713
+ def to_hash
714
+ end
715
+
716
+ # Lithic's evaluation result comparing the transaction's address data with the
717
+ # cardholder KYC data if it exists. In the event Lithic does not have any
718
+ # Cardholder KYC data, or the transaction does not contain any address data,
719
+ # NOT_PRESENT will be returned
720
+ module AddressOnFileMatch
721
+ extend Lithic::Internal::Type::Enum
722
+
723
+ TaggedSymbol =
724
+ T.type_alias do
725
+ T.all(Symbol, Lithic::CardAuthorization::Avs::AddressOnFileMatch)
726
+ end
727
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
728
+
729
+ MATCH =
730
+ T.let(
731
+ :MATCH,
732
+ Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol
733
+ )
734
+ MATCH_ADDRESS_ONLY =
735
+ T.let(
736
+ :MATCH_ADDRESS_ONLY,
737
+ Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol
738
+ )
739
+ MATCH_ZIP_ONLY =
740
+ T.let(
741
+ :MATCH_ZIP_ONLY,
742
+ Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol
743
+ )
744
+ MISMATCH =
745
+ T.let(
746
+ :MISMATCH,
747
+ Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol
748
+ )
749
+ NOT_PRESENT =
750
+ T.let(
751
+ :NOT_PRESENT,
752
+ Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol
753
+ )
754
+
755
+ sig do
756
+ override.returns(
757
+ T::Array[
758
+ Lithic::CardAuthorization::Avs::AddressOnFileMatch::TaggedSymbol
759
+ ]
760
+ )
761
+ end
762
+ def self.values
763
+ end
764
+ end
765
+ end
766
+
767
+ class Card < Lithic::Internal::Type::BaseModel
768
+ OrHash =
769
+ T.type_alias do
770
+ T.any(Lithic::CardAuthorization::Card, Lithic::Internal::AnyHash)
771
+ end
772
+
773
+ # Globally unique identifier for the card.
774
+ sig { returns(String) }
775
+ attr_accessor :token
776
+
777
+ # Last four digits of the card number
778
+ sig { returns(String) }
779
+ attr_accessor :last_four
780
+
781
+ # Customizable name to identify the card
782
+ sig { returns(String) }
783
+ attr_accessor :memo
784
+
785
+ # Amount (in cents) to limit approved authorizations. Purchase requests above the
786
+ # spend limit will be declined (refunds and credits will be approved).
787
+ #
788
+ # Note that while spend limits are enforced based on authorized and settled volume
789
+ # on a card, they are not recommended to be used for balance or
790
+ # reconciliation-level accuracy. Spend limits also cannot block force posted
791
+ # charges (i.e., when a merchant sends a clearing message without a prior
792
+ # authorization).
793
+ sig { returns(Integer) }
794
+ attr_accessor :spend_limit
795
+
796
+ # Note that to support recurring monthly payments, which can occur on different
797
+ # day every month, the time window we consider for MONTHLY velocity starts 6 days
798
+ # after the current calendar date one month prior.
799
+ sig do
800
+ returns(
801
+ Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol
802
+ )
803
+ end
804
+ attr_accessor :spend_limit_duration
805
+
806
+ sig { returns(Lithic::CardAuthorization::Card::State::TaggedSymbol) }
807
+ attr_accessor :state
808
+
809
+ sig { returns(Lithic::CardAuthorization::Card::Type::TaggedSymbol) }
810
+ attr_accessor :type
811
+
812
+ # Card object in ASA
813
+ sig do
814
+ params(
815
+ token: String,
816
+ last_four: String,
817
+ memo: String,
818
+ spend_limit: Integer,
819
+ spend_limit_duration:
820
+ Lithic::CardAuthorization::Card::SpendLimitDuration::OrSymbol,
821
+ state: Lithic::CardAuthorization::Card::State::OrSymbol,
822
+ type: Lithic::CardAuthorization::Card::Type::OrSymbol
823
+ ).returns(T.attached_class)
824
+ end
825
+ def self.new(
826
+ # Globally unique identifier for the card.
827
+ token:,
828
+ # Last four digits of the card number
829
+ last_four:,
830
+ # Customizable name to identify the card
831
+ memo:,
832
+ # Amount (in cents) to limit approved authorizations. Purchase requests above the
833
+ # spend limit will be declined (refunds and credits will be approved).
834
+ #
835
+ # Note that while spend limits are enforced based on authorized and settled volume
836
+ # on a card, they are not recommended to be used for balance or
837
+ # reconciliation-level accuracy. Spend limits also cannot block force posted
838
+ # charges (i.e., when a merchant sends a clearing message without a prior
839
+ # authorization).
840
+ spend_limit:,
841
+ # Note that to support recurring monthly payments, which can occur on different
842
+ # day every month, the time window we consider for MONTHLY velocity starts 6 days
843
+ # after the current calendar date one month prior.
844
+ spend_limit_duration:,
845
+ state:,
846
+ type:
847
+ )
848
+ end
849
+
850
+ sig do
851
+ override.returns(
852
+ {
853
+ token: String,
854
+ last_four: String,
855
+ memo: String,
856
+ spend_limit: Integer,
857
+ spend_limit_duration:
858
+ Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol,
859
+ state: Lithic::CardAuthorization::Card::State::TaggedSymbol,
860
+ type: Lithic::CardAuthorization::Card::Type::TaggedSymbol
861
+ }
862
+ )
863
+ end
864
+ def to_hash
865
+ end
866
+
867
+ # Note that to support recurring monthly payments, which can occur on different
868
+ # day every month, the time window we consider for MONTHLY velocity starts 6 days
869
+ # after the current calendar date one month prior.
870
+ module SpendLimitDuration
871
+ extend Lithic::Internal::Type::Enum
872
+
873
+ TaggedSymbol =
874
+ T.type_alias do
875
+ T.all(Symbol, Lithic::CardAuthorization::Card::SpendLimitDuration)
876
+ end
877
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
878
+
879
+ ANNUALLY =
880
+ T.let(
881
+ :ANNUALLY,
882
+ Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol
883
+ )
884
+ FOREVER =
885
+ T.let(
886
+ :FOREVER,
887
+ Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol
888
+ )
889
+ MONTHLY =
890
+ T.let(
891
+ :MONTHLY,
892
+ Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol
893
+ )
894
+ TRANSACTION =
895
+ T.let(
896
+ :TRANSACTION,
897
+ Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol
898
+ )
899
+
900
+ sig do
901
+ override.returns(
902
+ T::Array[
903
+ Lithic::CardAuthorization::Card::SpendLimitDuration::TaggedSymbol
904
+ ]
905
+ )
906
+ end
907
+ def self.values
908
+ end
909
+ end
910
+
911
+ module State
912
+ extend Lithic::Internal::Type::Enum
913
+
914
+ TaggedSymbol =
915
+ T.type_alias do
916
+ T.all(Symbol, Lithic::CardAuthorization::Card::State)
917
+ end
918
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
919
+
920
+ CLOSED =
921
+ T.let(:CLOSED, Lithic::CardAuthorization::Card::State::TaggedSymbol)
922
+ OPEN =
923
+ T.let(:OPEN, Lithic::CardAuthorization::Card::State::TaggedSymbol)
924
+ PAUSED =
925
+ T.let(:PAUSED, Lithic::CardAuthorization::Card::State::TaggedSymbol)
926
+ PENDING_ACTIVATION =
927
+ T.let(
928
+ :PENDING_ACTIVATION,
929
+ Lithic::CardAuthorization::Card::State::TaggedSymbol
930
+ )
931
+ PENDING_FULFILLMENT =
932
+ T.let(
933
+ :PENDING_FULFILLMENT,
934
+ Lithic::CardAuthorization::Card::State::TaggedSymbol
935
+ )
936
+
937
+ sig do
938
+ override.returns(
939
+ T::Array[Lithic::CardAuthorization::Card::State::TaggedSymbol]
940
+ )
941
+ end
942
+ def self.values
943
+ end
944
+ end
945
+
946
+ module Type
947
+ extend Lithic::Internal::Type::Enum
948
+
949
+ TaggedSymbol =
950
+ T.type_alias do
951
+ T.all(Symbol, Lithic::CardAuthorization::Card::Type)
952
+ end
953
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
954
+
955
+ SINGLE_USE =
956
+ T.let(
957
+ :SINGLE_USE,
958
+ Lithic::CardAuthorization::Card::Type::TaggedSymbol
959
+ )
960
+ MERCHANT_LOCKED =
961
+ T.let(
962
+ :MERCHANT_LOCKED,
963
+ Lithic::CardAuthorization::Card::Type::TaggedSymbol
964
+ )
965
+ UNLOCKED =
966
+ T.let(
967
+ :UNLOCKED,
968
+ Lithic::CardAuthorization::Card::Type::TaggedSymbol
969
+ )
970
+ PHYSICAL =
971
+ T.let(
972
+ :PHYSICAL,
973
+ Lithic::CardAuthorization::Card::Type::TaggedSymbol
974
+ )
975
+ DIGITAL_WALLET =
976
+ T.let(
977
+ :DIGITAL_WALLET,
978
+ Lithic::CardAuthorization::Card::Type::TaggedSymbol
979
+ )
980
+ VIRTUAL =
981
+ T.let(:VIRTUAL, Lithic::CardAuthorization::Card::Type::TaggedSymbol)
982
+
983
+ sig do
984
+ override.returns(
985
+ T::Array[Lithic::CardAuthorization::Card::Type::TaggedSymbol]
986
+ )
987
+ end
988
+ def self.values
989
+ end
990
+ end
991
+ end
992
+
993
+ class Merchant < Lithic::Models::Merchant
994
+ OrHash =
995
+ T.type_alias do
996
+ T.any(
997
+ Lithic::CardAuthorization::Merchant,
998
+ Lithic::Internal::AnyHash
999
+ )
1000
+ end
1001
+
1002
+ # Phone number of card acceptor.
1003
+ sig { returns(T.nilable(String)) }
1004
+ attr_accessor :phone_number
1005
+
1006
+ # Postal code of card acceptor.
1007
+ sig { returns(T.nilable(String)) }
1008
+ attr_accessor :postal_code
1009
+
1010
+ # Street address of card acceptor.
1011
+ sig { returns(T.nilable(String)) }
1012
+ attr_accessor :street_address
1013
+
1014
+ # Merchant information including full location details.
1015
+ sig do
1016
+ params(
1017
+ phone_number: T.nilable(String),
1018
+ postal_code: T.nilable(String),
1019
+ street_address: T.nilable(String)
1020
+ ).returns(T.attached_class)
1021
+ end
1022
+ def self.new(
1023
+ # Phone number of card acceptor.
1024
+ phone_number:,
1025
+ # Postal code of card acceptor.
1026
+ postal_code:,
1027
+ # Street address of card acceptor.
1028
+ street_address:
1029
+ )
1030
+ end
1031
+
1032
+ sig do
1033
+ override.returns(
1034
+ {
1035
+ phone_number: T.nilable(String),
1036
+ postal_code: T.nilable(String),
1037
+ street_address: T.nilable(String)
1038
+ }
1039
+ )
1040
+ end
1041
+ def to_hash
1042
+ end
1043
+ end
1044
+
1045
+ class ServiceLocation < Lithic::Internal::Type::BaseModel
1046
+ OrHash =
1047
+ T.type_alias do
1048
+ T.any(
1049
+ Lithic::CardAuthorization::ServiceLocation,
1050
+ Lithic::Internal::AnyHash
1051
+ )
1052
+ end
1053
+
1054
+ # City of service location.
1055
+ sig { returns(T.nilable(String)) }
1056
+ attr_accessor :city
1057
+
1058
+ # Country code of service location, ISO 3166-1 alpha-3.
1059
+ sig { returns(T.nilable(String)) }
1060
+ attr_accessor :country
1061
+
1062
+ # Postal code of service location.
1063
+ sig { returns(T.nilable(String)) }
1064
+ attr_accessor :postal_code
1065
+
1066
+ # State/province code of service location, ISO 3166-2.
1067
+ sig { returns(T.nilable(String)) }
1068
+ attr_accessor :state
1069
+
1070
+ # Street address of service location.
1071
+ sig { returns(T.nilable(String)) }
1072
+ attr_accessor :street_address
1073
+
1074
+ # Where the cardholder received the service, when different from the card acceptor
1075
+ # location. This is populated from network data elements such as Mastercard DE-122
1076
+ # SE1 SF9-14 and Visa F34 DS02.
1077
+ sig do
1078
+ params(
1079
+ city: T.nilable(String),
1080
+ country: T.nilable(String),
1081
+ postal_code: T.nilable(String),
1082
+ state: T.nilable(String),
1083
+ street_address: T.nilable(String)
1084
+ ).returns(T.attached_class)
1085
+ end
1086
+ def self.new(
1087
+ # City of service location.
1088
+ city:,
1089
+ # Country code of service location, ISO 3166-1 alpha-3.
1090
+ country:,
1091
+ # Postal code of service location.
1092
+ postal_code:,
1093
+ # State/province code of service location, ISO 3166-2.
1094
+ state:,
1095
+ # Street address of service location.
1096
+ street_address:
1097
+ )
1098
+ end
1099
+
1100
+ sig do
1101
+ override.returns(
1102
+ {
1103
+ city: T.nilable(String),
1104
+ country: T.nilable(String),
1105
+ postal_code: T.nilable(String),
1106
+ state: T.nilable(String),
1107
+ street_address: T.nilable(String)
1108
+ }
1109
+ )
1110
+ end
1111
+ def to_hash
1112
+ end
1113
+ end
1114
+
1115
+ # The type of authorization request that this request is for. Note that
1116
+ # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
1117
+ # users with credit decisioning via ASA enabled.
1118
+ module Status
1119
+ extend Lithic::Internal::Type::Enum
1120
+
1121
+ TaggedSymbol =
1122
+ T.type_alias { T.all(Symbol, Lithic::CardAuthorization::Status) }
1123
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1124
+
1125
+ AUTHORIZATION =
1126
+ T.let(:AUTHORIZATION, Lithic::CardAuthorization::Status::TaggedSymbol)
1127
+ CREDIT_AUTHORIZATION =
1128
+ T.let(
1129
+ :CREDIT_AUTHORIZATION,
1130
+ Lithic::CardAuthorization::Status::TaggedSymbol
1131
+ )
1132
+ FINANCIAL_AUTHORIZATION =
1133
+ T.let(
1134
+ :FINANCIAL_AUTHORIZATION,
1135
+ Lithic::CardAuthorization::Status::TaggedSymbol
1136
+ )
1137
+ FINANCIAL_CREDIT_AUTHORIZATION =
1138
+ T.let(
1139
+ :FINANCIAL_CREDIT_AUTHORIZATION,
1140
+ Lithic::CardAuthorization::Status::TaggedSymbol
1141
+ )
1142
+ BALANCE_INQUIRY =
1143
+ T.let(
1144
+ :BALANCE_INQUIRY,
1145
+ Lithic::CardAuthorization::Status::TaggedSymbol
1146
+ )
1147
+
1148
+ sig do
1149
+ override.returns(
1150
+ T::Array[Lithic::CardAuthorization::Status::TaggedSymbol]
1151
+ )
1152
+ end
1153
+ def self.values
1154
+ end
1155
+ end
1156
+
1157
+ # The entity that initiated the transaction.
1158
+ module TransactionInitiator
1159
+ extend Lithic::Internal::Type::Enum
1160
+
1161
+ TaggedSymbol =
1162
+ T.type_alias do
1163
+ T.all(Symbol, Lithic::CardAuthorization::TransactionInitiator)
1164
+ end
1165
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1166
+
1167
+ CARDHOLDER =
1168
+ T.let(
1169
+ :CARDHOLDER,
1170
+ Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol
1171
+ )
1172
+ MERCHANT =
1173
+ T.let(
1174
+ :MERCHANT,
1175
+ Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol
1176
+ )
1177
+ UNKNOWN =
1178
+ T.let(
1179
+ :UNKNOWN,
1180
+ Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol
1181
+ )
1182
+
1183
+ sig do
1184
+ override.returns(
1185
+ T::Array[
1186
+ Lithic::CardAuthorization::TransactionInitiator::TaggedSymbol
1187
+ ]
1188
+ )
1189
+ end
1190
+ def self.values
1191
+ end
1192
+ end
1193
+
1194
+ module AccountType
1195
+ extend Lithic::Internal::Type::Enum
1196
+
1197
+ TaggedSymbol =
1198
+ T.type_alias { T.all(Symbol, Lithic::CardAuthorization::AccountType) }
1199
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1200
+
1201
+ CHECKING =
1202
+ T.let(:CHECKING, Lithic::CardAuthorization::AccountType::TaggedSymbol)
1203
+ SAVINGS =
1204
+ T.let(:SAVINGS, Lithic::CardAuthorization::AccountType::TaggedSymbol)
1205
+
1206
+ sig do
1207
+ override.returns(
1208
+ T::Array[Lithic::CardAuthorization::AccountType::TaggedSymbol]
1209
+ )
1210
+ end
1211
+ def self.values
1212
+ end
1213
+ end
1214
+
1215
+ class FleetInfo < Lithic::Internal::Type::BaseModel
1216
+ OrHash =
1217
+ T.type_alias do
1218
+ T.any(
1219
+ Lithic::CardAuthorization::FleetInfo,
1220
+ Lithic::Internal::AnyHash
1221
+ )
1222
+ end
1223
+
1224
+ # Code indicating what the driver was prompted to enter at time of purchase. This
1225
+ # is configured at a program level and is a static configuration, and does not
1226
+ # change on a request to request basis
1227
+ sig do
1228
+ returns(
1229
+ Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol
1230
+ )
1231
+ end
1232
+ attr_accessor :fleet_prompt_code
1233
+
1234
+ # Code indicating which restrictions, if any, there are on purchase. This is
1235
+ # configured at a program level and is a static configuration, and does not change
1236
+ # on a request to request basis
1237
+ sig do
1238
+ returns(
1239
+ Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol
1240
+ )
1241
+ end
1242
+ attr_accessor :fleet_restriction_code
1243
+
1244
+ # Number representing the driver
1245
+ sig { returns(T.nilable(String)) }
1246
+ attr_accessor :driver_number
1247
+
1248
+ # Number associated with the vehicle
1249
+ sig { returns(T.nilable(String)) }
1250
+ attr_accessor :vehicle_number
1251
+
1252
+ # Optional Object containing information if the Card is a part of a Fleet managed
1253
+ # program
1254
+ sig do
1255
+ params(
1256
+ fleet_prompt_code:
1257
+ Lithic::CardAuthorization::FleetInfo::FleetPromptCode::OrSymbol,
1258
+ fleet_restriction_code:
1259
+ Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::OrSymbol,
1260
+ driver_number: T.nilable(String),
1261
+ vehicle_number: T.nilable(String)
1262
+ ).returns(T.attached_class)
1263
+ end
1264
+ def self.new(
1265
+ # Code indicating what the driver was prompted to enter at time of purchase. This
1266
+ # is configured at a program level and is a static configuration, and does not
1267
+ # change on a request to request basis
1268
+ fleet_prompt_code:,
1269
+ # Code indicating which restrictions, if any, there are on purchase. This is
1270
+ # configured at a program level and is a static configuration, and does not change
1271
+ # on a request to request basis
1272
+ fleet_restriction_code:,
1273
+ # Number representing the driver
1274
+ driver_number: nil,
1275
+ # Number associated with the vehicle
1276
+ vehicle_number: nil
1277
+ )
1278
+ end
1279
+
1280
+ sig do
1281
+ override.returns(
1282
+ {
1283
+ fleet_prompt_code:
1284
+ Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol,
1285
+ fleet_restriction_code:
1286
+ Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol,
1287
+ driver_number: T.nilable(String),
1288
+ vehicle_number: T.nilable(String)
1289
+ }
1290
+ )
1291
+ end
1292
+ def to_hash
1293
+ end
1294
+
1295
+ # Code indicating what the driver was prompted to enter at time of purchase. This
1296
+ # is configured at a program level and is a static configuration, and does not
1297
+ # change on a request to request basis
1298
+ module FleetPromptCode
1299
+ extend Lithic::Internal::Type::Enum
1300
+
1301
+ TaggedSymbol =
1302
+ T.type_alias do
1303
+ T.all(
1304
+ Symbol,
1305
+ Lithic::CardAuthorization::FleetInfo::FleetPromptCode
1306
+ )
1307
+ end
1308
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1309
+
1310
+ NO_PROMPT =
1311
+ T.let(
1312
+ :NO_PROMPT,
1313
+ Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol
1314
+ )
1315
+ VEHICLE_NUMBER =
1316
+ T.let(
1317
+ :VEHICLE_NUMBER,
1318
+ Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol
1319
+ )
1320
+ DRIVER_NUMBER =
1321
+ T.let(
1322
+ :DRIVER_NUMBER,
1323
+ Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol
1324
+ )
1325
+
1326
+ sig do
1327
+ override.returns(
1328
+ T::Array[
1329
+ Lithic::CardAuthorization::FleetInfo::FleetPromptCode::TaggedSymbol
1330
+ ]
1331
+ )
1332
+ end
1333
+ def self.values
1334
+ end
1335
+ end
1336
+
1337
+ # Code indicating which restrictions, if any, there are on purchase. This is
1338
+ # configured at a program level and is a static configuration, and does not change
1339
+ # on a request to request basis
1340
+ module FleetRestrictionCode
1341
+ extend Lithic::Internal::Type::Enum
1342
+
1343
+ TaggedSymbol =
1344
+ T.type_alias do
1345
+ T.all(
1346
+ Symbol,
1347
+ Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode
1348
+ )
1349
+ end
1350
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1351
+
1352
+ NO_RESTRICTIONS =
1353
+ T.let(
1354
+ :NO_RESTRICTIONS,
1355
+ Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol
1356
+ )
1357
+ FUEL_ONLY =
1358
+ T.let(
1359
+ :FUEL_ONLY,
1360
+ Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol
1361
+ )
1362
+
1363
+ sig do
1364
+ override.returns(
1365
+ T::Array[
1366
+ Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode::TaggedSymbol
1367
+ ]
1368
+ )
1369
+ end
1370
+ def self.values
1371
+ end
1372
+ end
1373
+ end
1374
+
1375
+ class LatestChallenge < Lithic::Internal::Type::BaseModel
1376
+ OrHash =
1377
+ T.type_alias do
1378
+ T.any(
1379
+ Lithic::CardAuthorization::LatestChallenge,
1380
+ Lithic::Internal::AnyHash
1381
+ )
1382
+ end
1383
+
1384
+ # The method used to deliver the challenge to the cardholder
1385
+ #
1386
+ # - `SMS` - Challenge was delivered via SMS
1387
+ # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method
1388
+ sig do
1389
+ returns(
1390
+ Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol
1391
+ )
1392
+ end
1393
+ attr_accessor :method_
1394
+
1395
+ # The phone number used for sending the Authorization Challenge. Present only when
1396
+ # the challenge method is `SMS`.
1397
+ sig { returns(T.nilable(String)) }
1398
+ attr_accessor :phone_number
1399
+
1400
+ # The status of the Authorization Challenge
1401
+ #
1402
+ # - `COMPLETED` - Challenge was successfully completed by the cardholder
1403
+ # - `DECLINED` - Challenge was declined by the cardholder
1404
+ # - `PENDING` - Challenge is still open
1405
+ # - `EXPIRED` - Challenge has expired without being completed
1406
+ # - `ERROR` - There was an error processing the challenge
1407
+ sig do
1408
+ returns(
1409
+ Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol
1410
+ )
1411
+ end
1412
+ attr_accessor :status
1413
+
1414
+ # The date and time when the Authorization Challenge was completed in UTC. Present
1415
+ # only if the status is `COMPLETED`.
1416
+ sig { returns(T.nilable(Time)) }
1417
+ attr_reader :completed_at
1418
+
1419
+ sig { params(completed_at: Time).void }
1420
+ attr_writer :completed_at
1421
+
1422
+ # The latest Authorization Challenge that was issued to the cardholder for this
1423
+ # merchant.
1424
+ sig do
1425
+ params(
1426
+ method_:
1427
+ Lithic::CardAuthorization::LatestChallenge::Method::OrSymbol,
1428
+ phone_number: T.nilable(String),
1429
+ status:
1430
+ Lithic::CardAuthorization::LatestChallenge::Status::OrSymbol,
1431
+ completed_at: Time
1432
+ ).returns(T.attached_class)
1433
+ end
1434
+ def self.new(
1435
+ # The method used to deliver the challenge to the cardholder
1436
+ #
1437
+ # - `SMS` - Challenge was delivered via SMS
1438
+ # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method
1439
+ method_:,
1440
+ # The phone number used for sending the Authorization Challenge. Present only when
1441
+ # the challenge method is `SMS`.
1442
+ phone_number:,
1443
+ # The status of the Authorization Challenge
1444
+ #
1445
+ # - `COMPLETED` - Challenge was successfully completed by the cardholder
1446
+ # - `DECLINED` - Challenge was declined by the cardholder
1447
+ # - `PENDING` - Challenge is still open
1448
+ # - `EXPIRED` - Challenge has expired without being completed
1449
+ # - `ERROR` - There was an error processing the challenge
1450
+ status:,
1451
+ # The date and time when the Authorization Challenge was completed in UTC. Present
1452
+ # only if the status is `COMPLETED`.
1453
+ completed_at: nil
1454
+ )
1455
+ end
1456
+
1457
+ sig do
1458
+ override.returns(
1459
+ {
1460
+ method_:
1461
+ Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol,
1462
+ phone_number: T.nilable(String),
1463
+ status:
1464
+ Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol,
1465
+ completed_at: Time
1466
+ }
1467
+ )
1468
+ end
1469
+ def to_hash
1470
+ end
1471
+
1472
+ # The method used to deliver the challenge to the cardholder
1473
+ #
1474
+ # - `SMS` - Challenge was delivered via SMS
1475
+ # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method
1476
+ module Method
1477
+ extend Lithic::Internal::Type::Enum
1478
+
1479
+ TaggedSymbol =
1480
+ T.type_alias do
1481
+ T.all(Symbol, Lithic::CardAuthorization::LatestChallenge::Method)
1482
+ end
1483
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1484
+
1485
+ SMS =
1486
+ T.let(
1487
+ :SMS,
1488
+ Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol
1489
+ )
1490
+ OUT_OF_BAND =
1491
+ T.let(
1492
+ :OUT_OF_BAND,
1493
+ Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol
1494
+ )
1495
+
1496
+ sig do
1497
+ override.returns(
1498
+ T::Array[
1499
+ Lithic::CardAuthorization::LatestChallenge::Method::TaggedSymbol
1500
+ ]
1501
+ )
1502
+ end
1503
+ def self.values
1504
+ end
1505
+ end
1506
+
1507
+ # The status of the Authorization Challenge
1508
+ #
1509
+ # - `COMPLETED` - Challenge was successfully completed by the cardholder
1510
+ # - `DECLINED` - Challenge was declined by the cardholder
1511
+ # - `PENDING` - Challenge is still open
1512
+ # - `EXPIRED` - Challenge has expired without being completed
1513
+ # - `ERROR` - There was an error processing the challenge
1514
+ module Status
1515
+ extend Lithic::Internal::Type::Enum
1516
+
1517
+ TaggedSymbol =
1518
+ T.type_alias do
1519
+ T.all(Symbol, Lithic::CardAuthorization::LatestChallenge::Status)
1520
+ end
1521
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1522
+
1523
+ COMPLETED =
1524
+ T.let(
1525
+ :COMPLETED,
1526
+ Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol
1527
+ )
1528
+ DECLINED =
1529
+ T.let(
1530
+ :DECLINED,
1531
+ Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol
1532
+ )
1533
+ PENDING =
1534
+ T.let(
1535
+ :PENDING,
1536
+ Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol
1537
+ )
1538
+ EXPIRED =
1539
+ T.let(
1540
+ :EXPIRED,
1541
+ Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol
1542
+ )
1543
+ ERROR =
1544
+ T.let(
1545
+ :ERROR,
1546
+ Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol
1547
+ )
1548
+
1549
+ sig do
1550
+ override.returns(
1551
+ T::Array[
1552
+ Lithic::CardAuthorization::LatestChallenge::Status::TaggedSymbol
1553
+ ]
1554
+ )
1555
+ end
1556
+ def self.values
1557
+ end
1558
+ end
1559
+ end
1560
+
1561
+ # Card network of the authorization.
1562
+ module Network
1563
+ extend Lithic::Internal::Type::Enum
1564
+
1565
+ TaggedSymbol =
1566
+ T.type_alias { T.all(Symbol, Lithic::CardAuthorization::Network) }
1567
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1568
+
1569
+ AMEX = T.let(:AMEX, Lithic::CardAuthorization::Network::TaggedSymbol)
1570
+ INTERLINK =
1571
+ T.let(:INTERLINK, Lithic::CardAuthorization::Network::TaggedSymbol)
1572
+ MAESTRO =
1573
+ T.let(:MAESTRO, Lithic::CardAuthorization::Network::TaggedSymbol)
1574
+ MASTERCARD =
1575
+ T.let(:MASTERCARD, Lithic::CardAuthorization::Network::TaggedSymbol)
1576
+ UNKNOWN =
1577
+ T.let(:UNKNOWN, Lithic::CardAuthorization::Network::TaggedSymbol)
1578
+ VISA = T.let(:VISA, Lithic::CardAuthorization::Network::TaggedSymbol)
1579
+
1580
+ sig do
1581
+ override.returns(
1582
+ T::Array[Lithic::CardAuthorization::Network::TaggedSymbol]
1583
+ )
1584
+ end
1585
+ def self.values
1586
+ end
1587
+ end
1588
+
1589
+ class NetworkSpecificData < Lithic::Internal::Type::BaseModel
1590
+ OrHash =
1591
+ T.type_alias do
1592
+ T.any(
1593
+ Lithic::CardAuthorization::NetworkSpecificData,
1594
+ Lithic::Internal::AnyHash
1595
+ )
1596
+ end
1597
+
1598
+ sig do
1599
+ returns(
1600
+ T.nilable(
1601
+ Lithic::CardAuthorization::NetworkSpecificData::Mastercard
1602
+ )
1603
+ )
1604
+ end
1605
+ attr_reader :mastercard
1606
+
1607
+ sig do
1608
+ params(
1609
+ mastercard:
1610
+ T.nilable(
1611
+ Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OrHash
1612
+ )
1613
+ ).void
1614
+ end
1615
+ attr_writer :mastercard
1616
+
1617
+ sig do
1618
+ returns(
1619
+ T.nilable(Lithic::CardAuthorization::NetworkSpecificData::Visa)
1620
+ )
1621
+ end
1622
+ attr_reader :visa
1623
+
1624
+ sig do
1625
+ params(
1626
+ visa:
1627
+ T.nilable(
1628
+ Lithic::CardAuthorization::NetworkSpecificData::Visa::OrHash
1629
+ )
1630
+ ).void
1631
+ end
1632
+ attr_writer :visa
1633
+
1634
+ # Contains raw data provided by the card network, including attributes that
1635
+ # provide further context about the authorization. If populated by the network,
1636
+ # data is organized by Lithic and passed through without further modification.
1637
+ # Please consult the official network documentation for more details about these
1638
+ # values and how to use them. This object is only available to certain programs-
1639
+ # contact your Customer Success Manager to discuss enabling access.
1640
+ sig do
1641
+ params(
1642
+ mastercard:
1643
+ T.nilable(
1644
+ Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OrHash
1645
+ ),
1646
+ visa:
1647
+ T.nilable(
1648
+ Lithic::CardAuthorization::NetworkSpecificData::Visa::OrHash
1649
+ )
1650
+ ).returns(T.attached_class)
1651
+ end
1652
+ def self.new(mastercard: nil, visa: nil)
1653
+ end
1654
+
1655
+ sig do
1656
+ override.returns(
1657
+ {
1658
+ mastercard:
1659
+ T.nilable(
1660
+ Lithic::CardAuthorization::NetworkSpecificData::Mastercard
1661
+ ),
1662
+ visa:
1663
+ T.nilable(Lithic::CardAuthorization::NetworkSpecificData::Visa)
1664
+ }
1665
+ )
1666
+ end
1667
+ def to_hash
1668
+ end
1669
+
1670
+ class Mastercard < Lithic::Internal::Type::BaseModel
1671
+ OrHash =
1672
+ T.type_alias do
1673
+ T.any(
1674
+ Lithic::CardAuthorization::NetworkSpecificData::Mastercard,
1675
+ Lithic::Internal::AnyHash
1676
+ )
1677
+ end
1678
+
1679
+ # Indicates the electronic commerce security level and UCAF collection.
1680
+ sig { returns(T.nilable(String)) }
1681
+ attr_accessor :ecommerce_security_level_indicator
1682
+
1683
+ # The On-behalf Service performed on the transaction and the results. Contains all
1684
+ # applicable, on-behalf service results that were performed on a given
1685
+ # transaction.
1686
+ sig do
1687
+ returns(
1688
+ T.nilable(
1689
+ T::Array[
1690
+ Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult
1691
+ ]
1692
+ )
1693
+ )
1694
+ end
1695
+ attr_accessor :on_behalf_service_result
1696
+
1697
+ # Indicates the type of additional transaction purpose.
1698
+ sig { returns(T.nilable(String)) }
1699
+ attr_accessor :transaction_type_identifier
1700
+
1701
+ sig do
1702
+ params(
1703
+ ecommerce_security_level_indicator: T.nilable(String),
1704
+ on_behalf_service_result:
1705
+ T.nilable(
1706
+ T::Array[
1707
+ Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult::OrHash
1708
+ ]
1709
+ ),
1710
+ transaction_type_identifier: T.nilable(String)
1711
+ ).returns(T.attached_class)
1712
+ end
1713
+ def self.new(
1714
+ # Indicates the electronic commerce security level and UCAF collection.
1715
+ ecommerce_security_level_indicator: nil,
1716
+ # The On-behalf Service performed on the transaction and the results. Contains all
1717
+ # applicable, on-behalf service results that were performed on a given
1718
+ # transaction.
1719
+ on_behalf_service_result: nil,
1720
+ # Indicates the type of additional transaction purpose.
1721
+ transaction_type_identifier: nil
1722
+ )
1723
+ end
1724
+
1725
+ sig do
1726
+ override.returns(
1727
+ {
1728
+ ecommerce_security_level_indicator: T.nilable(String),
1729
+ on_behalf_service_result:
1730
+ T.nilable(
1731
+ T::Array[
1732
+ Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult
1733
+ ]
1734
+ ),
1735
+ transaction_type_identifier: T.nilable(String)
1736
+ }
1737
+ )
1738
+ end
1739
+ def to_hash
1740
+ end
1741
+
1742
+ class OnBehalfServiceResult < Lithic::Internal::Type::BaseModel
1743
+ OrHash =
1744
+ T.type_alias do
1745
+ T.any(
1746
+ Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult,
1747
+ Lithic::Internal::AnyHash
1748
+ )
1749
+ end
1750
+
1751
+ # Indicates the results of the service processing.
1752
+ sig { returns(String) }
1753
+ attr_accessor :result_1
1754
+
1755
+ # Identifies the results of the service processing.
1756
+ sig { returns(String) }
1757
+ attr_accessor :result_2
1758
+
1759
+ # Indicates the service performed on the transaction.
1760
+ sig { returns(String) }
1761
+ attr_accessor :service
1762
+
1763
+ sig do
1764
+ params(
1765
+ result_1: String,
1766
+ result_2: String,
1767
+ service: String
1768
+ ).returns(T.attached_class)
1769
+ end
1770
+ def self.new(
1771
+ # Indicates the results of the service processing.
1772
+ result_1:,
1773
+ # Identifies the results of the service processing.
1774
+ result_2:,
1775
+ # Indicates the service performed on the transaction.
1776
+ service:
1777
+ )
1778
+ end
1779
+
1780
+ sig do
1781
+ override.returns(
1782
+ { result_1: String, result_2: String, service: String }
1783
+ )
1784
+ end
1785
+ def to_hash
1786
+ end
1787
+ end
1788
+ end
1789
+
1790
+ class Visa < Lithic::Internal::Type::BaseModel
1791
+ OrHash =
1792
+ T.type_alias do
1793
+ T.any(
1794
+ Lithic::CardAuthorization::NetworkSpecificData::Visa,
1795
+ Lithic::Internal::AnyHash
1796
+ )
1797
+ end
1798
+
1799
+ # Identifies the purpose or category of a transaction, used to classify and
1800
+ # process transactions according to Visa’s rules.
1801
+ sig { returns(T.nilable(String)) }
1802
+ attr_accessor :business_application_identifier
1803
+
1804
+ sig do
1805
+ params(business_application_identifier: T.nilable(String)).returns(
1806
+ T.attached_class
1807
+ )
1808
+ end
1809
+ def self.new(
1810
+ # Identifies the purpose or category of a transaction, used to classify and
1811
+ # process transactions according to Visa’s rules.
1812
+ business_application_identifier: nil
1813
+ )
1814
+ end
1815
+
1816
+ sig do
1817
+ override.returns(
1818
+ { business_application_identifier: T.nilable(String) }
1819
+ )
1820
+ end
1821
+ def to_hash
1822
+ end
1823
+ end
1824
+ end
1825
+
1826
+ class Pos < Lithic::Internal::Type::BaseModel
1827
+ OrHash =
1828
+ T.type_alias do
1829
+ T.any(Lithic::CardAuthorization::Pos, Lithic::Internal::AnyHash)
1830
+ end
1831
+
1832
+ # POS > Entry Mode object in ASA
1833
+ sig { returns(T.nilable(Lithic::CardAuthorization::Pos::EntryMode)) }
1834
+ attr_reader :entry_mode
1835
+
1836
+ sig do
1837
+ params(
1838
+ entry_mode: Lithic::CardAuthorization::Pos::EntryMode::OrHash
1839
+ ).void
1840
+ end
1841
+ attr_writer :entry_mode
1842
+
1843
+ sig { returns(T.nilable(Lithic::CardAuthorization::Pos::Terminal)) }
1844
+ attr_reader :terminal
1845
+
1846
+ sig do
1847
+ params(
1848
+ terminal: Lithic::CardAuthorization::Pos::Terminal::OrHash
1849
+ ).void
1850
+ end
1851
+ attr_writer :terminal
1852
+
1853
+ sig do
1854
+ params(
1855
+ entry_mode: Lithic::CardAuthorization::Pos::EntryMode::OrHash,
1856
+ terminal: Lithic::CardAuthorization::Pos::Terminal::OrHash
1857
+ ).returns(T.attached_class)
1858
+ end
1859
+ def self.new(
1860
+ # POS > Entry Mode object in ASA
1861
+ entry_mode: nil,
1862
+ terminal: nil
1863
+ )
1864
+ end
1865
+
1866
+ sig do
1867
+ override.returns(
1868
+ {
1869
+ entry_mode: Lithic::CardAuthorization::Pos::EntryMode,
1870
+ terminal: Lithic::CardAuthorization::Pos::Terminal
1871
+ }
1872
+ )
1873
+ end
1874
+ def to_hash
1875
+ end
1876
+
1877
+ class EntryMode < Lithic::Internal::Type::BaseModel
1878
+ OrHash =
1879
+ T.type_alias do
1880
+ T.any(
1881
+ Lithic::CardAuthorization::Pos::EntryMode,
1882
+ Lithic::Internal::AnyHash
1883
+ )
1884
+ end
1885
+
1886
+ # Card Presence Indicator
1887
+ sig do
1888
+ returns(
1889
+ T.nilable(
1890
+ Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol
1891
+ )
1892
+ )
1893
+ end
1894
+ attr_reader :card
1895
+
1896
+ sig do
1897
+ params(
1898
+ card: Lithic::CardAuthorization::Pos::EntryMode::Card::OrSymbol
1899
+ ).void
1900
+ end
1901
+ attr_writer :card
1902
+
1903
+ # Cardholder Presence Indicator
1904
+ sig do
1905
+ returns(
1906
+ T.nilable(
1907
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
1908
+ )
1909
+ )
1910
+ end
1911
+ attr_reader :cardholder
1912
+
1913
+ sig do
1914
+ params(
1915
+ cardholder:
1916
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::OrSymbol
1917
+ ).void
1918
+ end
1919
+ attr_writer :cardholder
1920
+
1921
+ # Method of entry for the PAN
1922
+ sig do
1923
+ returns(
1924
+ T.nilable(
1925
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
1926
+ )
1927
+ )
1928
+ end
1929
+ attr_reader :pan
1930
+
1931
+ sig do
1932
+ params(
1933
+ pan: Lithic::CardAuthorization::Pos::EntryMode::Pan::OrSymbol
1934
+ ).void
1935
+ end
1936
+ attr_writer :pan
1937
+
1938
+ # Indicates whether the cardholder entered the PIN. True if the PIN was entered.
1939
+ sig { returns(T.nilable(T::Boolean)) }
1940
+ attr_reader :pin_entered
1941
+
1942
+ sig { params(pin_entered: T::Boolean).void }
1943
+ attr_writer :pin_entered
1944
+
1945
+ # POS > Entry Mode object in ASA
1946
+ sig do
1947
+ params(
1948
+ card: Lithic::CardAuthorization::Pos::EntryMode::Card::OrSymbol,
1949
+ cardholder:
1950
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::OrSymbol,
1951
+ pan: Lithic::CardAuthorization::Pos::EntryMode::Pan::OrSymbol,
1952
+ pin_entered: T::Boolean
1953
+ ).returns(T.attached_class)
1954
+ end
1955
+ def self.new(
1956
+ # Card Presence Indicator
1957
+ card: nil,
1958
+ # Cardholder Presence Indicator
1959
+ cardholder: nil,
1960
+ # Method of entry for the PAN
1961
+ pan: nil,
1962
+ # Indicates whether the cardholder entered the PIN. True if the PIN was entered.
1963
+ pin_entered: nil
1964
+ )
1965
+ end
1966
+
1967
+ sig do
1968
+ override.returns(
1969
+ {
1970
+ card:
1971
+ Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol,
1972
+ cardholder:
1973
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol,
1974
+ pan:
1975
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol,
1976
+ pin_entered: T::Boolean
1977
+ }
1978
+ )
1979
+ end
1980
+ def to_hash
1981
+ end
1982
+
1983
+ # Card Presence Indicator
1984
+ module Card
1985
+ extend Lithic::Internal::Type::Enum
1986
+
1987
+ TaggedSymbol =
1988
+ T.type_alias do
1989
+ T.all(Symbol, Lithic::CardAuthorization::Pos::EntryMode::Card)
1990
+ end
1991
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1992
+
1993
+ PRESENT =
1994
+ T.let(
1995
+ :PRESENT,
1996
+ Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol
1997
+ )
1998
+ NOT_PRESENT =
1999
+ T.let(
2000
+ :NOT_PRESENT,
2001
+ Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol
2002
+ )
2003
+ UNKNOWN =
2004
+ T.let(
2005
+ :UNKNOWN,
2006
+ Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol
2007
+ )
2008
+
2009
+ sig do
2010
+ override.returns(
2011
+ T::Array[
2012
+ Lithic::CardAuthorization::Pos::EntryMode::Card::TaggedSymbol
2013
+ ]
2014
+ )
2015
+ end
2016
+ def self.values
2017
+ end
2018
+ end
2019
+
2020
+ # Cardholder Presence Indicator
2021
+ module Cardholder
2022
+ extend Lithic::Internal::Type::Enum
2023
+
2024
+ TaggedSymbol =
2025
+ T.type_alias do
2026
+ T.all(
2027
+ Symbol,
2028
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder
2029
+ )
2030
+ end
2031
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2032
+
2033
+ DEFERRED_BILLING =
2034
+ T.let(
2035
+ :DEFERRED_BILLING,
2036
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2037
+ )
2038
+ ELECTRONIC_ORDER =
2039
+ T.let(
2040
+ :ELECTRONIC_ORDER,
2041
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2042
+ )
2043
+ INSTALLMENT =
2044
+ T.let(
2045
+ :INSTALLMENT,
2046
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2047
+ )
2048
+ MAIL_ORDER =
2049
+ T.let(
2050
+ :MAIL_ORDER,
2051
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2052
+ )
2053
+ NOT_PRESENT =
2054
+ T.let(
2055
+ :NOT_PRESENT,
2056
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2057
+ )
2058
+ PRESENT =
2059
+ T.let(
2060
+ :PRESENT,
2061
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2062
+ )
2063
+ REOCCURRING =
2064
+ T.let(
2065
+ :REOCCURRING,
2066
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2067
+ )
2068
+ TELEPHONE_ORDER =
2069
+ T.let(
2070
+ :TELEPHONE_ORDER,
2071
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2072
+ )
2073
+ UNKNOWN =
2074
+ T.let(
2075
+ :UNKNOWN,
2076
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2077
+ )
2078
+
2079
+ sig do
2080
+ override.returns(
2081
+ T::Array[
2082
+ Lithic::CardAuthorization::Pos::EntryMode::Cardholder::TaggedSymbol
2083
+ ]
2084
+ )
2085
+ end
2086
+ def self.values
2087
+ end
2088
+ end
2089
+
2090
+ # Method of entry for the PAN
2091
+ module Pan
2092
+ extend Lithic::Internal::Type::Enum
2093
+
2094
+ TaggedSymbol =
2095
+ T.type_alias do
2096
+ T.all(Symbol, Lithic::CardAuthorization::Pos::EntryMode::Pan)
2097
+ end
2098
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2099
+
2100
+ AUTO_ENTRY =
2101
+ T.let(
2102
+ :AUTO_ENTRY,
2103
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2104
+ )
2105
+ BAR_CODE =
2106
+ T.let(
2107
+ :BAR_CODE,
2108
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2109
+ )
2110
+ CONTACTLESS =
2111
+ T.let(
2112
+ :CONTACTLESS,
2113
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2114
+ )
2115
+ ECOMMERCE =
2116
+ T.let(
2117
+ :ECOMMERCE,
2118
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2119
+ )
2120
+ ERROR_KEYED =
2121
+ T.let(
2122
+ :ERROR_KEYED,
2123
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2124
+ )
2125
+ ERROR_MAGNETIC_STRIPE =
2126
+ T.let(
2127
+ :ERROR_MAGNETIC_STRIPE,
2128
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2129
+ )
2130
+ ICC =
2131
+ T.let(
2132
+ :ICC,
2133
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2134
+ )
2135
+ KEY_ENTERED =
2136
+ T.let(
2137
+ :KEY_ENTERED,
2138
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2139
+ )
2140
+ MAGNETIC_STRIPE =
2141
+ T.let(
2142
+ :MAGNETIC_STRIPE,
2143
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2144
+ )
2145
+ MANUAL =
2146
+ T.let(
2147
+ :MANUAL,
2148
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2149
+ )
2150
+ OCR =
2151
+ T.let(
2152
+ :OCR,
2153
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2154
+ )
2155
+ SECURE_CARDLESS =
2156
+ T.let(
2157
+ :SECURE_CARDLESS,
2158
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2159
+ )
2160
+ UNSPECIFIED =
2161
+ T.let(
2162
+ :UNSPECIFIED,
2163
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2164
+ )
2165
+ UNKNOWN =
2166
+ T.let(
2167
+ :UNKNOWN,
2168
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2169
+ )
2170
+ CREDENTIAL_ON_FILE =
2171
+ T.let(
2172
+ :CREDENTIAL_ON_FILE,
2173
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2174
+ )
2175
+
2176
+ sig do
2177
+ override.returns(
2178
+ T::Array[
2179
+ Lithic::CardAuthorization::Pos::EntryMode::Pan::TaggedSymbol
2180
+ ]
2181
+ )
2182
+ end
2183
+ def self.values
2184
+ end
2185
+ end
2186
+ end
2187
+
2188
+ class Terminal < Lithic::Internal::Type::BaseModel
2189
+ OrHash =
2190
+ T.type_alias do
2191
+ T.any(
2192
+ Lithic::CardAuthorization::Pos::Terminal,
2193
+ Lithic::Internal::AnyHash
2194
+ )
2195
+ end
2196
+
2197
+ # True if a clerk is present at the sale.
2198
+ sig { returns(T::Boolean) }
2199
+ attr_accessor :attended
2200
+
2201
+ # True if the terminal is capable of retaining the card.
2202
+ sig { returns(T::Boolean) }
2203
+ attr_accessor :card_retention_capable
2204
+
2205
+ # True if the sale was made at the place of business (vs. mobile).
2206
+ sig { returns(T::Boolean) }
2207
+ attr_accessor :on_premise
2208
+
2209
+ # The person that is designated to swipe the card
2210
+ sig do
2211
+ returns(
2212
+ Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol
2213
+ )
2214
+ end
2215
+ attr_accessor :operator
2216
+
2217
+ # True if the terminal is capable of partial approval. Partial approval is when
2218
+ # part of a transaction is approved and another payment must be used for the
2219
+ # remainder. Example scenario: A $40 transaction is attempted on a prepaid card
2220
+ # with a $25 balance. If partial approval is enabled, $25 can be authorized, at
2221
+ # which point the POS will prompt the user for an additional payment of $15.
2222
+ sig { returns(T::Boolean) }
2223
+ attr_accessor :partial_approval_capable
2224
+
2225
+ # Status of whether the POS is able to accept PINs
2226
+ sig do
2227
+ returns(
2228
+ Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol
2229
+ )
2230
+ end
2231
+ attr_accessor :pin_capability
2232
+
2233
+ # POS Type
2234
+ sig do
2235
+ returns(
2236
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2237
+ )
2238
+ end
2239
+ attr_accessor :type
2240
+
2241
+ # Uniquely identifies a terminal at the card acceptor location of acquiring
2242
+ # institutions or merchant POS Systems. Left justified with trailing spaces.
2243
+ sig { returns(T.nilable(String)) }
2244
+ attr_accessor :acceptor_terminal_id
2245
+
2246
+ sig do
2247
+ params(
2248
+ attended: T::Boolean,
2249
+ card_retention_capable: T::Boolean,
2250
+ on_premise: T::Boolean,
2251
+ operator:
2252
+ Lithic::CardAuthorization::Pos::Terminal::Operator::OrSymbol,
2253
+ partial_approval_capable: T::Boolean,
2254
+ pin_capability:
2255
+ Lithic::CardAuthorization::Pos::Terminal::PinCapability::OrSymbol,
2256
+ type: Lithic::CardAuthorization::Pos::Terminal::Type::OrSymbol,
2257
+ acceptor_terminal_id: T.nilable(String)
2258
+ ).returns(T.attached_class)
2259
+ end
2260
+ def self.new(
2261
+ # True if a clerk is present at the sale.
2262
+ attended:,
2263
+ # True if the terminal is capable of retaining the card.
2264
+ card_retention_capable:,
2265
+ # True if the sale was made at the place of business (vs. mobile).
2266
+ on_premise:,
2267
+ # The person that is designated to swipe the card
2268
+ operator:,
2269
+ # True if the terminal is capable of partial approval. Partial approval is when
2270
+ # part of a transaction is approved and another payment must be used for the
2271
+ # remainder. Example scenario: A $40 transaction is attempted on a prepaid card
2272
+ # with a $25 balance. If partial approval is enabled, $25 can be authorized, at
2273
+ # which point the POS will prompt the user for an additional payment of $15.
2274
+ partial_approval_capable:,
2275
+ # Status of whether the POS is able to accept PINs
2276
+ pin_capability:,
2277
+ # POS Type
2278
+ type:,
2279
+ # Uniquely identifies a terminal at the card acceptor location of acquiring
2280
+ # institutions or merchant POS Systems. Left justified with trailing spaces.
2281
+ acceptor_terminal_id: nil
2282
+ )
2283
+ end
2284
+
2285
+ sig do
2286
+ override.returns(
2287
+ {
2288
+ attended: T::Boolean,
2289
+ card_retention_capable: T::Boolean,
2290
+ on_premise: T::Boolean,
2291
+ operator:
2292
+ Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol,
2293
+ partial_approval_capable: T::Boolean,
2294
+ pin_capability:
2295
+ Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol,
2296
+ type:
2297
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol,
2298
+ acceptor_terminal_id: T.nilable(String)
2299
+ }
2300
+ )
2301
+ end
2302
+ def to_hash
2303
+ end
2304
+
2305
+ # The person that is designated to swipe the card
2306
+ module Operator
2307
+ extend Lithic::Internal::Type::Enum
2308
+
2309
+ TaggedSymbol =
2310
+ T.type_alias do
2311
+ T.all(
2312
+ Symbol,
2313
+ Lithic::CardAuthorization::Pos::Terminal::Operator
2314
+ )
2315
+ end
2316
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2317
+
2318
+ ADMINISTRATIVE =
2319
+ T.let(
2320
+ :ADMINISTRATIVE,
2321
+ Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol
2322
+ )
2323
+ CARDHOLDER =
2324
+ T.let(
2325
+ :CARDHOLDER,
2326
+ Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol
2327
+ )
2328
+ CARD_ACCEPTOR =
2329
+ T.let(
2330
+ :CARD_ACCEPTOR,
2331
+ Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol
2332
+ )
2333
+ UNKNOWN =
2334
+ T.let(
2335
+ :UNKNOWN,
2336
+ Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol
2337
+ )
2338
+
2339
+ sig do
2340
+ override.returns(
2341
+ T::Array[
2342
+ Lithic::CardAuthorization::Pos::Terminal::Operator::TaggedSymbol
2343
+ ]
2344
+ )
2345
+ end
2346
+ def self.values
2347
+ end
2348
+ end
2349
+
2350
+ # Status of whether the POS is able to accept PINs
2351
+ module PinCapability
2352
+ extend Lithic::Internal::Type::Enum
2353
+
2354
+ TaggedSymbol =
2355
+ T.type_alias do
2356
+ T.all(
2357
+ Symbol,
2358
+ Lithic::CardAuthorization::Pos::Terminal::PinCapability
2359
+ )
2360
+ end
2361
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2362
+
2363
+ CAPABLE =
2364
+ T.let(
2365
+ :CAPABLE,
2366
+ Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol
2367
+ )
2368
+ INOPERATIVE =
2369
+ T.let(
2370
+ :INOPERATIVE,
2371
+ Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol
2372
+ )
2373
+ NOT_CAPABLE =
2374
+ T.let(
2375
+ :NOT_CAPABLE,
2376
+ Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol
2377
+ )
2378
+ UNSPECIFIED =
2379
+ T.let(
2380
+ :UNSPECIFIED,
2381
+ Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol
2382
+ )
2383
+
2384
+ sig do
2385
+ override.returns(
2386
+ T::Array[
2387
+ Lithic::CardAuthorization::Pos::Terminal::PinCapability::TaggedSymbol
2388
+ ]
2389
+ )
2390
+ end
2391
+ def self.values
2392
+ end
2393
+ end
2394
+
2395
+ # POS Type
2396
+ module Type
2397
+ extend Lithic::Internal::Type::Enum
2398
+
2399
+ TaggedSymbol =
2400
+ T.type_alias do
2401
+ T.all(Symbol, Lithic::CardAuthorization::Pos::Terminal::Type)
2402
+ end
2403
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2404
+
2405
+ ADMINISTRATIVE =
2406
+ T.let(
2407
+ :ADMINISTRATIVE,
2408
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2409
+ )
2410
+ ATM =
2411
+ T.let(
2412
+ :ATM,
2413
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2414
+ )
2415
+ AUTHORIZATION =
2416
+ T.let(
2417
+ :AUTHORIZATION,
2418
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2419
+ )
2420
+ COUPON_MACHINE =
2421
+ T.let(
2422
+ :COUPON_MACHINE,
2423
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2424
+ )
2425
+ DIAL_TERMINAL =
2426
+ T.let(
2427
+ :DIAL_TERMINAL,
2428
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2429
+ )
2430
+ ECOMMERCE =
2431
+ T.let(
2432
+ :ECOMMERCE,
2433
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2434
+ )
2435
+ ECR =
2436
+ T.let(
2437
+ :ECR,
2438
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2439
+ )
2440
+ FUEL_MACHINE =
2441
+ T.let(
2442
+ :FUEL_MACHINE,
2443
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2444
+ )
2445
+ HOME_TERMINAL =
2446
+ T.let(
2447
+ :HOME_TERMINAL,
2448
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2449
+ )
2450
+ MICR =
2451
+ T.let(
2452
+ :MICR,
2453
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2454
+ )
2455
+ OFF_PREMISE =
2456
+ T.let(
2457
+ :OFF_PREMISE,
2458
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2459
+ )
2460
+ PAYMENT =
2461
+ T.let(
2462
+ :PAYMENT,
2463
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2464
+ )
2465
+ PDA =
2466
+ T.let(
2467
+ :PDA,
2468
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2469
+ )
2470
+ PHONE =
2471
+ T.let(
2472
+ :PHONE,
2473
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2474
+ )
2475
+ POINT =
2476
+ T.let(
2477
+ :POINT,
2478
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2479
+ )
2480
+ POS_TERMINAL =
2481
+ T.let(
2482
+ :POS_TERMINAL,
2483
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2484
+ )
2485
+ PUBLIC_UTILITY =
2486
+ T.let(
2487
+ :PUBLIC_UTILITY,
2488
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2489
+ )
2490
+ SELF_SERVICE =
2491
+ T.let(
2492
+ :SELF_SERVICE,
2493
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2494
+ )
2495
+ TELEVISION =
2496
+ T.let(
2497
+ :TELEVISION,
2498
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2499
+ )
2500
+ TELLER =
2501
+ T.let(
2502
+ :TELLER,
2503
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2504
+ )
2505
+ TRAVELERS_CHECK_MACHINE =
2506
+ T.let(
2507
+ :TRAVELERS_CHECK_MACHINE,
2508
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2509
+ )
2510
+ VENDING =
2511
+ T.let(
2512
+ :VENDING,
2513
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2514
+ )
2515
+ VOICE =
2516
+ T.let(
2517
+ :VOICE,
2518
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2519
+ )
2520
+ UNKNOWN =
2521
+ T.let(
2522
+ :UNKNOWN,
2523
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2524
+ )
2525
+
2526
+ sig do
2527
+ override.returns(
2528
+ T::Array[
2529
+ Lithic::CardAuthorization::Pos::Terminal::Type::TaggedSymbol
2530
+ ]
2531
+ )
2532
+ end
2533
+ def self.values
2534
+ end
2535
+ end
2536
+ end
2537
+ end
2538
+ end
2539
+ end
2540
+ end