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,1266 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ class CardAuthorization < Lithic::Internal::Type::BaseModel
6
+ # @!attribute token
7
+ # The provisional transaction group uuid associated with the authorization
8
+ #
9
+ # @return [String]
10
+ required :token, String
11
+
12
+ # @!attribute acquirer_fee
13
+ # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be
14
+ # zero if no fee is assessed. Rebates may be transmitted as a negative value to
15
+ # indicate credited fees.
16
+ #
17
+ # @return [Integer]
18
+ required :acquirer_fee, Integer
19
+
20
+ # @!attribute amount
21
+ # @deprecated
22
+ #
23
+ # Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
24
+ # including any acquirer fees. The contents of this field are identical to
25
+ # `authorization_amount`.
26
+ #
27
+ # @return [Integer]
28
+ required :amount, Integer
29
+
30
+ # @!attribute amounts
31
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
32
+ # amounts reflect the original network authorization values. For programs with
33
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
34
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
35
+ # anticipated final transaction amounts such as tips or fuel fill-ups
36
+ #
37
+ # @return [Lithic::Models::CardAuthorization::Amounts]
38
+ required :amounts, -> { Lithic::CardAuthorization::Amounts }
39
+
40
+ # @!attribute authorization_amount
41
+ # @deprecated
42
+ #
43
+ # Deprecated, use `amounts`. The base transaction amount (in cents) plus the
44
+ # acquirer fee field. This is the amount the issuer should authorize against
45
+ # unless the issuer is paying the acquirer fee on behalf of the cardholder.
46
+ #
47
+ # @return [Integer]
48
+ required :authorization_amount, Integer
49
+
50
+ # @!attribute avs
51
+ #
52
+ # @return [Lithic::Models::CardAuthorization::Avs]
53
+ required :avs, -> { Lithic::CardAuthorization::Avs }
54
+
55
+ # @!attribute card
56
+ # Card object in ASA
57
+ #
58
+ # @return [Lithic::Models::CardAuthorization::Card]
59
+ required :card, -> { Lithic::CardAuthorization::Card }
60
+
61
+ # @!attribute cardholder_currency
62
+ # @deprecated
63
+ #
64
+ # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
65
+ # billing currency.
66
+ #
67
+ # @return [String]
68
+ required :cardholder_currency, String
69
+
70
+ # @!attribute cash_amount
71
+ # The portion of the transaction requested as cash back by the cardholder, and
72
+ # does not include any acquirer fees. The amount field includes the purchase
73
+ # amount, the requested cash back amount, and any acquirer fees.
74
+ #
75
+ # If no cash back was requested, the value of this field will be 0, and the field
76
+ # will always be present.
77
+ #
78
+ # @return [Integer]
79
+ required :cash_amount, Integer
80
+
81
+ # @!attribute created
82
+ # Date and time when the transaction first occurred in UTC.
83
+ #
84
+ # @return [Time]
85
+ required :created, Time
86
+
87
+ # @!attribute merchant
88
+ # Merchant information including full location details.
89
+ #
90
+ # @return [Lithic::Models::CardAuthorization::Merchant]
91
+ required :merchant, -> { Lithic::CardAuthorization::Merchant }
92
+
93
+ # @!attribute merchant_amount
94
+ # @deprecated
95
+ #
96
+ # Deprecated, use `amounts`. The amount that the merchant will receive,
97
+ # denominated in `merchant_currency` and in the smallest currency unit. Note the
98
+ # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
99
+ # different from `authorization_amount` if the merchant is taking payment in a
100
+ # different currency.
101
+ #
102
+ # @return [Integer]
103
+ required :merchant_amount, Integer
104
+
105
+ # @!attribute merchant_currency
106
+ # @deprecated
107
+ #
108
+ # 3-character alphabetic ISO 4217 code for the local currency of the transaction.
109
+ #
110
+ # @return [String]
111
+ required :merchant_currency, String
112
+
113
+ # @!attribute service_location
114
+ # Where the cardholder received the service, when different from the card acceptor
115
+ # location. This is populated from network data elements such as Mastercard DE-122
116
+ # SE1 SF9-14 and Visa F34 DS02.
117
+ #
118
+ # @return [Lithic::Models::CardAuthorization::ServiceLocation, nil]
119
+ required :service_location, -> { Lithic::CardAuthorization::ServiceLocation }, nil?: true
120
+
121
+ # @!attribute settled_amount
122
+ # @deprecated
123
+ #
124
+ # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
125
+ # settled, including any acquirer fees.
126
+ #
127
+ # @return [Integer]
128
+ required :settled_amount, Integer
129
+
130
+ # @!attribute status
131
+ # The type of authorization request that this request is for. Note that
132
+ # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
133
+ # users with credit decisioning via ASA enabled.
134
+ #
135
+ # @return [Symbol, Lithic::Models::CardAuthorization::Status]
136
+ required :status, enum: -> { Lithic::CardAuthorization::Status }
137
+
138
+ # @!attribute transaction_initiator
139
+ # The entity that initiated the transaction.
140
+ #
141
+ # @return [Symbol, Lithic::Models::CardAuthorization::TransactionInitiator]
142
+ required :transaction_initiator, enum: -> { Lithic::CardAuthorization::TransactionInitiator }
143
+
144
+ # @!attribute account_type
145
+ #
146
+ # @return [Symbol, Lithic::Models::CardAuthorization::AccountType, nil]
147
+ optional :account_type, enum: -> { Lithic::CardAuthorization::AccountType }
148
+
149
+ # @!attribute cardholder_authentication
150
+ #
151
+ # @return [Lithic::Models::CardholderAuthentication, nil]
152
+ optional :cardholder_authentication, -> { Lithic::CardholderAuthentication }
153
+
154
+ # @!attribute cashback
155
+ # Deprecated, use `cash_amount`.
156
+ #
157
+ # @return [Integer, nil]
158
+ optional :cashback, Integer
159
+
160
+ # @!attribute conversion_rate
161
+ # @deprecated
162
+ #
163
+ # Deprecated, use `amounts`. If the transaction was requested in a currency other
164
+ # than the settlement currency, this field will be populated to indicate the rate
165
+ # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
166
+ # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
167
+ # currency and the amount is in the settlement currency.
168
+ #
169
+ # @return [Float, nil]
170
+ optional :conversion_rate, Float
171
+
172
+ # @!attribute event_token
173
+ # The event token associated with the authorization. This field is only set for
174
+ # programs enrolled into the beta.
175
+ #
176
+ # @return [String, nil]
177
+ optional :event_token, String
178
+
179
+ # @!attribute fleet_info
180
+ # Optional Object containing information if the Card is a part of a Fleet managed
181
+ # program
182
+ #
183
+ # @return [Lithic::Models::CardAuthorization::FleetInfo, nil]
184
+ optional :fleet_info, -> { Lithic::CardAuthorization::FleetInfo }, nil?: true
185
+
186
+ # @!attribute latest_challenge
187
+ # The latest Authorization Challenge that was issued to the cardholder for this
188
+ # merchant.
189
+ #
190
+ # @return [Lithic::Models::CardAuthorization::LatestChallenge, nil]
191
+ optional :latest_challenge, -> { Lithic::CardAuthorization::LatestChallenge }
192
+
193
+ # @!attribute network
194
+ # Card network of the authorization.
195
+ #
196
+ # @return [Symbol, Lithic::Models::CardAuthorization::Network, nil]
197
+ optional :network, enum: -> { Lithic::CardAuthorization::Network }
198
+
199
+ # @!attribute network_risk_score
200
+ # Network-provided score assessing risk level associated with a given
201
+ # authorization. Scores are on a range of 0-999, with 0 representing the lowest
202
+ # risk and 999 representing the highest risk. For Visa transactions, where the raw
203
+ # score has a range of 0-99, Lithic will normalize the score by multiplying the
204
+ # raw score by 10x.
205
+ #
206
+ # @return [Integer, nil]
207
+ optional :network_risk_score, Integer, nil?: true
208
+
209
+ # @!attribute network_specific_data
210
+ # Contains raw data provided by the card network, including attributes that
211
+ # provide further context about the authorization. If populated by the network,
212
+ # data is organized by Lithic and passed through without further modification.
213
+ # Please consult the official network documentation for more details about these
214
+ # values and how to use them. This object is only available to certain programs-
215
+ # contact your Customer Success Manager to discuss enabling access.
216
+ #
217
+ # @return [Lithic::Models::CardAuthorization::NetworkSpecificData, nil]
218
+ optional :network_specific_data, -> { Lithic::CardAuthorization::NetworkSpecificData }, nil?: true
219
+
220
+ # @!attribute pos
221
+ #
222
+ # @return [Lithic::Models::CardAuthorization::Pos, nil]
223
+ optional :pos, -> { Lithic::CardAuthorization::Pos }
224
+
225
+ # @!attribute token_info
226
+ #
227
+ # @return [Lithic::Models::TokenInfo, nil]
228
+ optional :token_info, -> { Lithic::TokenInfo }, nil?: true
229
+
230
+ # @!attribute ttl
231
+ # Deprecated: approximate time-to-live for the authorization.
232
+ #
233
+ # @return [Time, nil]
234
+ optional :ttl, Time
235
+
236
+ # @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, service_location:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil)
237
+ # Some parameter documentations has been truncated, see
238
+ # {Lithic::Models::CardAuthorization} for more details.
239
+ #
240
+ # Card Authorization
241
+ #
242
+ # @param token [String] The provisional transaction group uuid associated with the authorization
243
+ #
244
+ # @param acquirer_fee [Integer] Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be
245
+ #
246
+ # @param amount [Integer] Deprecated, use `amounts`. Authorization amount of the transaction (in cents), i
247
+ #
248
+ # @param amounts [Lithic::Models::CardAuthorization::Amounts] Structured amounts for this authorization. The `cardholder` and `merchant` amoun
249
+ #
250
+ # @param authorization_amount [Integer] Deprecated, use `amounts`. The base transaction amount (in cents) plus the acqui
251
+ #
252
+ # @param avs [Lithic::Models::CardAuthorization::Avs]
253
+ #
254
+ # @param card [Lithic::Models::CardAuthorization::Card] Card object in ASA
255
+ #
256
+ # @param cardholder_currency [String] Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
257
+ #
258
+ # @param cash_amount [Integer] The portion of the transaction requested as cash back by the cardholder, and doe
259
+ #
260
+ # @param created [Time] Date and time when the transaction first occurred in UTC.
261
+ #
262
+ # @param merchant [Lithic::Models::CardAuthorization::Merchant] Merchant information including full location details.
263
+ #
264
+ # @param merchant_amount [Integer] Deprecated, use `amounts`. The amount that the merchant will receive, denominate
265
+ #
266
+ # @param merchant_currency [String] 3-character alphabetic ISO 4217 code for the local currency of the transaction.
267
+ #
268
+ # @param service_location [Lithic::Models::CardAuthorization::ServiceLocation, nil] Where the cardholder received the service, when different from the card acceptor
269
+ #
270
+ # @param settled_amount [Integer] Deprecated, use `amounts`. Amount (in cents) of the transaction that has been se
271
+ #
272
+ # @param status [Symbol, Lithic::Models::CardAuthorization::Status] The type of authorization request that this request is for. Note that `CREDIT_AU
273
+ #
274
+ # @param transaction_initiator [Symbol, Lithic::Models::CardAuthorization::TransactionInitiator] The entity that initiated the transaction.
275
+ #
276
+ # @param account_type [Symbol, Lithic::Models::CardAuthorization::AccountType]
277
+ #
278
+ # @param cardholder_authentication [Lithic::Models::CardholderAuthentication]
279
+ #
280
+ # @param cashback [Integer] Deprecated, use `cash_amount`.
281
+ #
282
+ # @param conversion_rate [Float] Deprecated, use `amounts`. If the transaction was requested in a currency other
283
+ #
284
+ # @param event_token [String] The event token associated with the authorization. This field is only set for pr
285
+ #
286
+ # @param fleet_info [Lithic::Models::CardAuthorization::FleetInfo, nil] Optional Object containing information if the Card is a part of a Fleet managed
287
+ #
288
+ # @param latest_challenge [Lithic::Models::CardAuthorization::LatestChallenge] The latest Authorization Challenge that was issued to the cardholder for this me
289
+ #
290
+ # @param network [Symbol, Lithic::Models::CardAuthorization::Network] Card network of the authorization.
291
+ #
292
+ # @param network_risk_score [Integer, nil] Network-provided score assessing risk level associated with a given authorizatio
293
+ #
294
+ # @param network_specific_data [Lithic::Models::CardAuthorization::NetworkSpecificData, nil] Contains raw data provided by the card network, including attributes that provid
295
+ #
296
+ # @param pos [Lithic::Models::CardAuthorization::Pos]
297
+ #
298
+ # @param token_info [Lithic::Models::TokenInfo, nil]
299
+ #
300
+ # @param ttl [Time] Deprecated: approximate time-to-live for the authorization.
301
+
302
+ # @see Lithic::Models::CardAuthorization#amounts
303
+ class Amounts < Lithic::Internal::Type::BaseModel
304
+ # @!attribute cardholder
305
+ #
306
+ # @return [Lithic::Models::CardAuthorization::Amounts::Cardholder]
307
+ required :cardholder, -> { Lithic::CardAuthorization::Amounts::Cardholder }
308
+
309
+ # @!attribute hold
310
+ #
311
+ # @return [Lithic::Models::CardAuthorization::Amounts::Hold, nil]
312
+ required :hold, -> { Lithic::CardAuthorization::Amounts::Hold }, nil?: true
313
+
314
+ # @!attribute merchant
315
+ #
316
+ # @return [Lithic::Models::CardAuthorization::Amounts::Merchant]
317
+ required :merchant, -> { Lithic::CardAuthorization::Amounts::Merchant }
318
+
319
+ # @!attribute settlement
320
+ #
321
+ # @return [Lithic::Models::CardAuthorization::Amounts::Settlement, nil]
322
+ required :settlement, -> { Lithic::CardAuthorization::Amounts::Settlement }, nil?: true
323
+
324
+ # @!method initialize(cardholder:, hold:, merchant:, settlement:)
325
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
326
+ # amounts reflect the original network authorization values. For programs with
327
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
328
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
329
+ # anticipated final transaction amounts such as tips or fuel fill-ups
330
+ #
331
+ # @param cardholder [Lithic::Models::CardAuthorization::Amounts::Cardholder]
332
+ # @param hold [Lithic::Models::CardAuthorization::Amounts::Hold, nil]
333
+ # @param merchant [Lithic::Models::CardAuthorization::Amounts::Merchant]
334
+ # @param settlement [Lithic::Models::CardAuthorization::Amounts::Settlement, nil]
335
+
336
+ # @see Lithic::Models::CardAuthorization::Amounts#cardholder
337
+ class Cardholder < Lithic::Internal::Type::BaseModel
338
+ # @!attribute amount
339
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
340
+ #
341
+ # @return [Integer]
342
+ required :amount, Integer
343
+
344
+ # @!attribute conversion_rate
345
+ # Exchange rate used for currency conversion
346
+ #
347
+ # @return [String]
348
+ required :conversion_rate, String
349
+
350
+ # @!attribute currency
351
+ # 3-character alphabetic ISO 4217 currency
352
+ #
353
+ # @return [String]
354
+ required :currency, String
355
+
356
+ # @!method initialize(amount:, conversion_rate:, currency:)
357
+ # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents)
358
+ #
359
+ # @param conversion_rate [String] Exchange rate used for currency conversion
360
+ #
361
+ # @param currency [String] 3-character alphabetic ISO 4217 currency
362
+ end
363
+
364
+ # @see Lithic::Models::CardAuthorization::Amounts#hold
365
+ class Hold < Lithic::Internal::Type::BaseModel
366
+ # @!attribute amount
367
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
368
+ #
369
+ # @return [Integer]
370
+ required :amount, Integer
371
+
372
+ # @!attribute currency
373
+ # 3-character alphabetic ISO 4217 currency
374
+ #
375
+ # @return [String]
376
+ required :currency, String
377
+
378
+ # @!method initialize(amount:, currency:)
379
+ # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents)
380
+ #
381
+ # @param currency [String] 3-character alphabetic ISO 4217 currency
382
+ end
383
+
384
+ # @see Lithic::Models::CardAuthorization::Amounts#merchant
385
+ class Merchant < Lithic::Internal::Type::BaseModel
386
+ # @!attribute amount
387
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
388
+ #
389
+ # @return [Integer]
390
+ required :amount, Integer
391
+
392
+ # @!attribute currency
393
+ # 3-character alphabetic ISO 4217 currency
394
+ #
395
+ # @return [String]
396
+ required :currency, String
397
+
398
+ # @!method initialize(amount:, currency:)
399
+ # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents)
400
+ #
401
+ # @param currency [String] 3-character alphabetic ISO 4217 currency
402
+ end
403
+
404
+ # @see Lithic::Models::CardAuthorization::Amounts#settlement
405
+ class Settlement < Lithic::Internal::Type::BaseModel
406
+ # @!attribute amount
407
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
408
+ #
409
+ # @return [Integer]
410
+ required :amount, Integer
411
+
412
+ # @!attribute currency
413
+ # 3-character alphabetic ISO 4217 currency
414
+ #
415
+ # @return [String]
416
+ required :currency, String
417
+
418
+ # @!method initialize(amount:, currency:)
419
+ # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents)
420
+ #
421
+ # @param currency [String] 3-character alphabetic ISO 4217 currency
422
+ end
423
+ end
424
+
425
+ # @see Lithic::Models::CardAuthorization#avs
426
+ class Avs < Lithic::Internal::Type::BaseModel
427
+ # @!attribute address
428
+ # Cardholder address
429
+ #
430
+ # @return [String]
431
+ required :address, String
432
+
433
+ # @!attribute address_on_file_match
434
+ # Lithic's evaluation result comparing the transaction's address data with the
435
+ # cardholder KYC data if it exists. In the event Lithic does not have any
436
+ # Cardholder KYC data, or the transaction does not contain any address data,
437
+ # NOT_PRESENT will be returned
438
+ #
439
+ # @return [Symbol, Lithic::Models::CardAuthorization::Avs::AddressOnFileMatch]
440
+ required :address_on_file_match, enum: -> { Lithic::CardAuthorization::Avs::AddressOnFileMatch }
441
+
442
+ # @!attribute zipcode
443
+ # Cardholder ZIP code
444
+ #
445
+ # @return [String]
446
+ required :zipcode, String
447
+
448
+ # @!method initialize(address:, address_on_file_match:, zipcode:)
449
+ # Some parameter documentations has been truncated, see
450
+ # {Lithic::Models::CardAuthorization::Avs} for more details.
451
+ #
452
+ # @param address [String] Cardholder address
453
+ #
454
+ # @param address_on_file_match [Symbol, Lithic::Models::CardAuthorization::Avs::AddressOnFileMatch] Lithic's evaluation result comparing the transaction's address data with the car
455
+ #
456
+ # @param zipcode [String] Cardholder ZIP code
457
+
458
+ # Lithic's evaluation result comparing the transaction's address data with the
459
+ # cardholder KYC data if it exists. In the event Lithic does not have any
460
+ # Cardholder KYC data, or the transaction does not contain any address data,
461
+ # NOT_PRESENT will be returned
462
+ #
463
+ # @see Lithic::Models::CardAuthorization::Avs#address_on_file_match
464
+ module AddressOnFileMatch
465
+ extend Lithic::Internal::Type::Enum
466
+
467
+ MATCH = :MATCH
468
+ MATCH_ADDRESS_ONLY = :MATCH_ADDRESS_ONLY
469
+ MATCH_ZIP_ONLY = :MATCH_ZIP_ONLY
470
+ MISMATCH = :MISMATCH
471
+ NOT_PRESENT = :NOT_PRESENT
472
+
473
+ # @!method self.values
474
+ # @return [Array<Symbol>]
475
+ end
476
+ end
477
+
478
+ # @see Lithic::Models::CardAuthorization#card
479
+ class Card < Lithic::Internal::Type::BaseModel
480
+ # @!attribute token
481
+ # Globally unique identifier for the card.
482
+ #
483
+ # @return [String]
484
+ required :token, String
485
+
486
+ # @!attribute last_four
487
+ # Last four digits of the card number
488
+ #
489
+ # @return [String]
490
+ required :last_four, String
491
+
492
+ # @!attribute memo
493
+ # Customizable name to identify the card
494
+ #
495
+ # @return [String]
496
+ required :memo, String
497
+
498
+ # @!attribute spend_limit
499
+ # Amount (in cents) to limit approved authorizations. Purchase requests above the
500
+ # spend limit will be declined (refunds and credits will be approved).
501
+ #
502
+ # Note that while spend limits are enforced based on authorized and settled volume
503
+ # on a card, they are not recommended to be used for balance or
504
+ # reconciliation-level accuracy. Spend limits also cannot block force posted
505
+ # charges (i.e., when a merchant sends a clearing message without a prior
506
+ # authorization).
507
+ #
508
+ # @return [Integer]
509
+ required :spend_limit, Integer
510
+
511
+ # @!attribute spend_limit_duration
512
+ # Note that to support recurring monthly payments, which can occur on different
513
+ # day every month, the time window we consider for MONTHLY velocity starts 6 days
514
+ # after the current calendar date one month prior.
515
+ #
516
+ # @return [Symbol, Lithic::Models::CardAuthorization::Card::SpendLimitDuration]
517
+ required :spend_limit_duration, enum: -> { Lithic::CardAuthorization::Card::SpendLimitDuration }
518
+
519
+ # @!attribute state
520
+ #
521
+ # @return [Symbol, Lithic::Models::CardAuthorization::Card::State]
522
+ required :state, enum: -> { Lithic::CardAuthorization::Card::State }
523
+
524
+ # @!attribute type
525
+ #
526
+ # @return [Symbol, Lithic::Models::CardAuthorization::Card::Type]
527
+ required :type, enum: -> { Lithic::CardAuthorization::Card::Type }
528
+
529
+ # @!method initialize(token:, last_four:, memo:, spend_limit:, spend_limit_duration:, state:, type:)
530
+ # Some parameter documentations has been truncated, see
531
+ # {Lithic::Models::CardAuthorization::Card} for more details.
532
+ #
533
+ # Card object in ASA
534
+ #
535
+ # @param token [String] Globally unique identifier for the card.
536
+ #
537
+ # @param last_four [String] Last four digits of the card number
538
+ #
539
+ # @param memo [String] Customizable name to identify the card
540
+ #
541
+ # @param spend_limit [Integer] Amount (in cents) to limit approved authorizations. Purchase requests above the
542
+ #
543
+ # @param spend_limit_duration [Symbol, Lithic::Models::CardAuthorization::Card::SpendLimitDuration] Note that to support recurring monthly payments, which can occur on different da
544
+ #
545
+ # @param state [Symbol, Lithic::Models::CardAuthorization::Card::State]
546
+ #
547
+ # @param type [Symbol, Lithic::Models::CardAuthorization::Card::Type]
548
+
549
+ # Note that to support recurring monthly payments, which can occur on different
550
+ # day every month, the time window we consider for MONTHLY velocity starts 6 days
551
+ # after the current calendar date one month prior.
552
+ #
553
+ # @see Lithic::Models::CardAuthorization::Card#spend_limit_duration
554
+ module SpendLimitDuration
555
+ extend Lithic::Internal::Type::Enum
556
+
557
+ ANNUALLY = :ANNUALLY
558
+ FOREVER = :FOREVER
559
+ MONTHLY = :MONTHLY
560
+ TRANSACTION = :TRANSACTION
561
+
562
+ # @!method self.values
563
+ # @return [Array<Symbol>]
564
+ end
565
+
566
+ # @see Lithic::Models::CardAuthorization::Card#state
567
+ module State
568
+ extend Lithic::Internal::Type::Enum
569
+
570
+ CLOSED = :CLOSED
571
+ OPEN = :OPEN
572
+ PAUSED = :PAUSED
573
+ PENDING_ACTIVATION = :PENDING_ACTIVATION
574
+ PENDING_FULFILLMENT = :PENDING_FULFILLMENT
575
+
576
+ # @!method self.values
577
+ # @return [Array<Symbol>]
578
+ end
579
+
580
+ # @see Lithic::Models::CardAuthorization::Card#type
581
+ module Type
582
+ extend Lithic::Internal::Type::Enum
583
+
584
+ SINGLE_USE = :SINGLE_USE
585
+ MERCHANT_LOCKED = :MERCHANT_LOCKED
586
+ UNLOCKED = :UNLOCKED
587
+ PHYSICAL = :PHYSICAL
588
+ DIGITAL_WALLET = :DIGITAL_WALLET
589
+ VIRTUAL = :VIRTUAL
590
+
591
+ # @!method self.values
592
+ # @return [Array<Symbol>]
593
+ end
594
+ end
595
+
596
+ # @see Lithic::Models::CardAuthorization#merchant
597
+ class Merchant < Lithic::Models::Merchant
598
+ # @!attribute phone_number
599
+ # Phone number of card acceptor.
600
+ #
601
+ # @return [String, nil]
602
+ required :phone_number, String, nil?: true
603
+
604
+ # @!attribute postal_code
605
+ # Postal code of card acceptor.
606
+ #
607
+ # @return [String, nil]
608
+ required :postal_code, String, nil?: true
609
+
610
+ # @!attribute street_address
611
+ # Street address of card acceptor.
612
+ #
613
+ # @return [String, nil]
614
+ required :street_address, String, nil?: true
615
+
616
+ # @!method initialize(phone_number:, postal_code:, street_address:)
617
+ # Merchant information including full location details.
618
+ #
619
+ # @param phone_number [String, nil] Phone number of card acceptor.
620
+ #
621
+ # @param postal_code [String, nil] Postal code of card acceptor.
622
+ #
623
+ # @param street_address [String, nil] Street address of card acceptor.
624
+ end
625
+
626
+ # @see Lithic::Models::CardAuthorization#service_location
627
+ class ServiceLocation < Lithic::Internal::Type::BaseModel
628
+ # @!attribute city
629
+ # City of service location.
630
+ #
631
+ # @return [String, nil]
632
+ required :city, String, nil?: true
633
+
634
+ # @!attribute country
635
+ # Country code of service location, ISO 3166-1 alpha-3.
636
+ #
637
+ # @return [String, nil]
638
+ required :country, String, nil?: true
639
+
640
+ # @!attribute postal_code
641
+ # Postal code of service location.
642
+ #
643
+ # @return [String, nil]
644
+ required :postal_code, String, nil?: true
645
+
646
+ # @!attribute state
647
+ # State/province code of service location, ISO 3166-2.
648
+ #
649
+ # @return [String, nil]
650
+ required :state, String, nil?: true
651
+
652
+ # @!attribute street_address
653
+ # Street address of service location.
654
+ #
655
+ # @return [String, nil]
656
+ required :street_address, String, nil?: true
657
+
658
+ # @!method initialize(city:, country:, postal_code:, state:, street_address:)
659
+ # Where the cardholder received the service, when different from the card acceptor
660
+ # location. This is populated from network data elements such as Mastercard DE-122
661
+ # SE1 SF9-14 and Visa F34 DS02.
662
+ #
663
+ # @param city [String, nil] City of service location.
664
+ #
665
+ # @param country [String, nil] Country code of service location, ISO 3166-1 alpha-3.
666
+ #
667
+ # @param postal_code [String, nil] Postal code of service location.
668
+ #
669
+ # @param state [String, nil] State/province code of service location, ISO 3166-2.
670
+ #
671
+ # @param street_address [String, nil] Street address of service location.
672
+ end
673
+
674
+ # The type of authorization request that this request is for. Note that
675
+ # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
676
+ # users with credit decisioning via ASA enabled.
677
+ #
678
+ # @see Lithic::Models::CardAuthorization#status
679
+ module Status
680
+ extend Lithic::Internal::Type::Enum
681
+
682
+ AUTHORIZATION = :AUTHORIZATION
683
+ CREDIT_AUTHORIZATION = :CREDIT_AUTHORIZATION
684
+ FINANCIAL_AUTHORIZATION = :FINANCIAL_AUTHORIZATION
685
+ FINANCIAL_CREDIT_AUTHORIZATION = :FINANCIAL_CREDIT_AUTHORIZATION
686
+ BALANCE_INQUIRY = :BALANCE_INQUIRY
687
+
688
+ # @!method self.values
689
+ # @return [Array<Symbol>]
690
+ end
691
+
692
+ # The entity that initiated the transaction.
693
+ #
694
+ # @see Lithic::Models::CardAuthorization#transaction_initiator
695
+ module TransactionInitiator
696
+ extend Lithic::Internal::Type::Enum
697
+
698
+ CARDHOLDER = :CARDHOLDER
699
+ MERCHANT = :MERCHANT
700
+ UNKNOWN = :UNKNOWN
701
+
702
+ # @!method self.values
703
+ # @return [Array<Symbol>]
704
+ end
705
+
706
+ # @see Lithic::Models::CardAuthorization#account_type
707
+ module AccountType
708
+ extend Lithic::Internal::Type::Enum
709
+
710
+ CHECKING = :CHECKING
711
+ SAVINGS = :SAVINGS
712
+
713
+ # @!method self.values
714
+ # @return [Array<Symbol>]
715
+ end
716
+
717
+ # @see Lithic::Models::CardAuthorization#fleet_info
718
+ class FleetInfo < Lithic::Internal::Type::BaseModel
719
+ # @!attribute fleet_prompt_code
720
+ # Code indicating what the driver was prompted to enter at time of purchase. This
721
+ # is configured at a program level and is a static configuration, and does not
722
+ # change on a request to request basis
723
+ #
724
+ # @return [Symbol, Lithic::Models::CardAuthorization::FleetInfo::FleetPromptCode]
725
+ required :fleet_prompt_code, enum: -> { Lithic::CardAuthorization::FleetInfo::FleetPromptCode }
726
+
727
+ # @!attribute fleet_restriction_code
728
+ # Code indicating which restrictions, if any, there are on purchase. This is
729
+ # configured at a program level and is a static configuration, and does not change
730
+ # on a request to request basis
731
+ #
732
+ # @return [Symbol, Lithic::Models::CardAuthorization::FleetInfo::FleetRestrictionCode]
733
+ required :fleet_restriction_code, enum: -> { Lithic::CardAuthorization::FleetInfo::FleetRestrictionCode }
734
+
735
+ # @!attribute driver_number
736
+ # Number representing the driver
737
+ #
738
+ # @return [String, nil]
739
+ optional :driver_number, String, nil?: true
740
+
741
+ # @!attribute vehicle_number
742
+ # Number associated with the vehicle
743
+ #
744
+ # @return [String, nil]
745
+ optional :vehicle_number, String, nil?: true
746
+
747
+ # @!method initialize(fleet_prompt_code:, fleet_restriction_code:, driver_number: nil, vehicle_number: nil)
748
+ # Some parameter documentations has been truncated, see
749
+ # {Lithic::Models::CardAuthorization::FleetInfo} for more details.
750
+ #
751
+ # Optional Object containing information if the Card is a part of a Fleet managed
752
+ # program
753
+ #
754
+ # @param fleet_prompt_code [Symbol, Lithic::Models::CardAuthorization::FleetInfo::FleetPromptCode] Code indicating what the driver was prompted to enter at time of purchase. This
755
+ #
756
+ # @param fleet_restriction_code [Symbol, Lithic::Models::CardAuthorization::FleetInfo::FleetRestrictionCode] Code indicating which restrictions, if any, there are on purchase. This is confi
757
+ #
758
+ # @param driver_number [String, nil] Number representing the driver
759
+ #
760
+ # @param vehicle_number [String, nil] Number associated with the vehicle
761
+
762
+ # Code indicating what the driver was prompted to enter at time of purchase. This
763
+ # is configured at a program level and is a static configuration, and does not
764
+ # change on a request to request basis
765
+ #
766
+ # @see Lithic::Models::CardAuthorization::FleetInfo#fleet_prompt_code
767
+ module FleetPromptCode
768
+ extend Lithic::Internal::Type::Enum
769
+
770
+ NO_PROMPT = :NO_PROMPT
771
+ VEHICLE_NUMBER = :VEHICLE_NUMBER
772
+ DRIVER_NUMBER = :DRIVER_NUMBER
773
+
774
+ # @!method self.values
775
+ # @return [Array<Symbol>]
776
+ end
777
+
778
+ # Code indicating which restrictions, if any, there are on purchase. This is
779
+ # configured at a program level and is a static configuration, and does not change
780
+ # on a request to request basis
781
+ #
782
+ # @see Lithic::Models::CardAuthorization::FleetInfo#fleet_restriction_code
783
+ module FleetRestrictionCode
784
+ extend Lithic::Internal::Type::Enum
785
+
786
+ NO_RESTRICTIONS = :NO_RESTRICTIONS
787
+ FUEL_ONLY = :FUEL_ONLY
788
+
789
+ # @!method self.values
790
+ # @return [Array<Symbol>]
791
+ end
792
+ end
793
+
794
+ # @see Lithic::Models::CardAuthorization#latest_challenge
795
+ class LatestChallenge < Lithic::Internal::Type::BaseModel
796
+ # @!attribute method_
797
+ # The method used to deliver the challenge to the cardholder
798
+ #
799
+ # - `SMS` - Challenge was delivered via SMS
800
+ # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method
801
+ #
802
+ # @return [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Method]
803
+ required :method_, enum: -> { Lithic::CardAuthorization::LatestChallenge::Method }, api_name: :method
804
+
805
+ # @!attribute phone_number
806
+ # The phone number used for sending the Authorization Challenge. Present only when
807
+ # the challenge method is `SMS`.
808
+ #
809
+ # @return [String, nil]
810
+ required :phone_number, String, nil?: true
811
+
812
+ # @!attribute status
813
+ # The status of the Authorization Challenge
814
+ #
815
+ # - `COMPLETED` - Challenge was successfully completed by the cardholder
816
+ # - `DECLINED` - Challenge was declined by the cardholder
817
+ # - `PENDING` - Challenge is still open
818
+ # - `EXPIRED` - Challenge has expired without being completed
819
+ # - `ERROR` - There was an error processing the challenge
820
+ #
821
+ # @return [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Status]
822
+ required :status, enum: -> { Lithic::CardAuthorization::LatestChallenge::Status }
823
+
824
+ # @!attribute completed_at
825
+ # The date and time when the Authorization Challenge was completed in UTC. Present
826
+ # only if the status is `COMPLETED`.
827
+ #
828
+ # @return [Time, nil]
829
+ optional :completed_at, Time
830
+
831
+ # @!method initialize(method_:, phone_number:, status:, completed_at: nil)
832
+ # Some parameter documentations has been truncated, see
833
+ # {Lithic::Models::CardAuthorization::LatestChallenge} for more details.
834
+ #
835
+ # The latest Authorization Challenge that was issued to the cardholder for this
836
+ # merchant.
837
+ #
838
+ # @param method_ [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Method] The method used to deliver the challenge to the cardholder
839
+ #
840
+ # @param phone_number [String, nil] The phone number used for sending the Authorization Challenge. Present only when
841
+ #
842
+ # @param status [Symbol, Lithic::Models::CardAuthorization::LatestChallenge::Status] The status of the Authorization Challenge
843
+ #
844
+ # @param completed_at [Time] The date and time when the Authorization Challenge was completed in UTC. Present
845
+
846
+ # The method used to deliver the challenge to the cardholder
847
+ #
848
+ # - `SMS` - Challenge was delivered via SMS
849
+ # - `OUT_OF_BAND` - Challenge was delivered via an out-of-band method
850
+ #
851
+ # @see Lithic::Models::CardAuthorization::LatestChallenge#method_
852
+ module Method
853
+ extend Lithic::Internal::Type::Enum
854
+
855
+ SMS = :SMS
856
+ OUT_OF_BAND = :OUT_OF_BAND
857
+
858
+ # @!method self.values
859
+ # @return [Array<Symbol>]
860
+ end
861
+
862
+ # The status of the Authorization Challenge
863
+ #
864
+ # - `COMPLETED` - Challenge was successfully completed by the cardholder
865
+ # - `DECLINED` - Challenge was declined by the cardholder
866
+ # - `PENDING` - Challenge is still open
867
+ # - `EXPIRED` - Challenge has expired without being completed
868
+ # - `ERROR` - There was an error processing the challenge
869
+ #
870
+ # @see Lithic::Models::CardAuthorization::LatestChallenge#status
871
+ module Status
872
+ extend Lithic::Internal::Type::Enum
873
+
874
+ COMPLETED = :COMPLETED
875
+ DECLINED = :DECLINED
876
+ PENDING = :PENDING
877
+ EXPIRED = :EXPIRED
878
+ ERROR = :ERROR
879
+
880
+ # @!method self.values
881
+ # @return [Array<Symbol>]
882
+ end
883
+ end
884
+
885
+ # Card network of the authorization.
886
+ #
887
+ # @see Lithic::Models::CardAuthorization#network
888
+ module Network
889
+ extend Lithic::Internal::Type::Enum
890
+
891
+ AMEX = :AMEX
892
+ INTERLINK = :INTERLINK
893
+ MAESTRO = :MAESTRO
894
+ MASTERCARD = :MASTERCARD
895
+ UNKNOWN = :UNKNOWN
896
+ VISA = :VISA
897
+
898
+ # @!method self.values
899
+ # @return [Array<Symbol>]
900
+ end
901
+
902
+ # @see Lithic::Models::CardAuthorization#network_specific_data
903
+ class NetworkSpecificData < Lithic::Internal::Type::BaseModel
904
+ # @!attribute mastercard
905
+ #
906
+ # @return [Lithic::Models::CardAuthorization::NetworkSpecificData::Mastercard, nil]
907
+ optional :mastercard, -> { Lithic::CardAuthorization::NetworkSpecificData::Mastercard }, nil?: true
908
+
909
+ # @!attribute visa
910
+ #
911
+ # @return [Lithic::Models::CardAuthorization::NetworkSpecificData::Visa, nil]
912
+ optional :visa, -> { Lithic::CardAuthorization::NetworkSpecificData::Visa }, nil?: true
913
+
914
+ # @!method initialize(mastercard: nil, visa: nil)
915
+ # Contains raw data provided by the card network, including attributes that
916
+ # provide further context about the authorization. If populated by the network,
917
+ # data is organized by Lithic and passed through without further modification.
918
+ # Please consult the official network documentation for more details about these
919
+ # values and how to use them. This object is only available to certain programs-
920
+ # contact your Customer Success Manager to discuss enabling access.
921
+ #
922
+ # @param mastercard [Lithic::Models::CardAuthorization::NetworkSpecificData::Mastercard, nil]
923
+ # @param visa [Lithic::Models::CardAuthorization::NetworkSpecificData::Visa, nil]
924
+
925
+ # @see Lithic::Models::CardAuthorization::NetworkSpecificData#mastercard
926
+ class Mastercard < Lithic::Internal::Type::BaseModel
927
+ # @!attribute ecommerce_security_level_indicator
928
+ # Indicates the electronic commerce security level and UCAF collection.
929
+ #
930
+ # @return [String, nil]
931
+ optional :ecommerce_security_level_indicator, String, nil?: true
932
+
933
+ # @!attribute on_behalf_service_result
934
+ # The On-behalf Service performed on the transaction and the results. Contains all
935
+ # applicable, on-behalf service results that were performed on a given
936
+ # transaction.
937
+ #
938
+ # @return [Array<Lithic::Models::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult>, nil]
939
+ optional :on_behalf_service_result,
940
+ -> {
941
+ Lithic::Internal::Type::ArrayOf[Lithic::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult]
942
+ },
943
+ nil?: true
944
+
945
+ # @!attribute transaction_type_identifier
946
+ # Indicates the type of additional transaction purpose.
947
+ #
948
+ # @return [String, nil]
949
+ optional :transaction_type_identifier, String, nil?: true
950
+
951
+ # @!method initialize(ecommerce_security_level_indicator: nil, on_behalf_service_result: nil, transaction_type_identifier: nil)
952
+ # Some parameter documentations has been truncated, see
953
+ # {Lithic::Models::CardAuthorization::NetworkSpecificData::Mastercard} for more
954
+ # details.
955
+ #
956
+ # @param ecommerce_security_level_indicator [String, nil] Indicates the electronic commerce security level and UCAF collection.
957
+ #
958
+ # @param on_behalf_service_result [Array<Lithic::Models::CardAuthorization::NetworkSpecificData::Mastercard::OnBehalfServiceResult>, nil] The On-behalf Service performed on the transaction and the results. Contains all
959
+ #
960
+ # @param transaction_type_identifier [String, nil] Indicates the type of additional transaction purpose.
961
+
962
+ class OnBehalfServiceResult < Lithic::Internal::Type::BaseModel
963
+ # @!attribute result_1
964
+ # Indicates the results of the service processing.
965
+ #
966
+ # @return [String]
967
+ required :result_1, String
968
+
969
+ # @!attribute result_2
970
+ # Identifies the results of the service processing.
971
+ #
972
+ # @return [String]
973
+ required :result_2, String
974
+
975
+ # @!attribute service
976
+ # Indicates the service performed on the transaction.
977
+ #
978
+ # @return [String]
979
+ required :service, String
980
+
981
+ # @!method initialize(result_1:, result_2:, service:)
982
+ # @param result_1 [String] Indicates the results of the service processing.
983
+ #
984
+ # @param result_2 [String] Identifies the results of the service processing.
985
+ #
986
+ # @param service [String] Indicates the service performed on the transaction.
987
+ end
988
+ end
989
+
990
+ # @see Lithic::Models::CardAuthorization::NetworkSpecificData#visa
991
+ class Visa < Lithic::Internal::Type::BaseModel
992
+ # @!attribute business_application_identifier
993
+ # Identifies the purpose or category of a transaction, used to classify and
994
+ # process transactions according to Visa’s rules.
995
+ #
996
+ # @return [String, nil]
997
+ optional :business_application_identifier, String, nil?: true
998
+
999
+ # @!method initialize(business_application_identifier: nil)
1000
+ # Some parameter documentations has been truncated, see
1001
+ # {Lithic::Models::CardAuthorization::NetworkSpecificData::Visa} for more details.
1002
+ #
1003
+ # @param business_application_identifier [String, nil] Identifies the purpose or category of a transaction, used to classify and proces
1004
+ end
1005
+ end
1006
+
1007
+ # @see Lithic::Models::CardAuthorization#pos
1008
+ class Pos < Lithic::Internal::Type::BaseModel
1009
+ # @!attribute entry_mode
1010
+ # POS > Entry Mode object in ASA
1011
+ #
1012
+ # @return [Lithic::Models::CardAuthorization::Pos::EntryMode, nil]
1013
+ optional :entry_mode, -> { Lithic::CardAuthorization::Pos::EntryMode }
1014
+
1015
+ # @!attribute terminal
1016
+ #
1017
+ # @return [Lithic::Models::CardAuthorization::Pos::Terminal, nil]
1018
+ optional :terminal, -> { Lithic::CardAuthorization::Pos::Terminal }
1019
+
1020
+ # @!method initialize(entry_mode: nil, terminal: nil)
1021
+ # @param entry_mode [Lithic::Models::CardAuthorization::Pos::EntryMode] POS > Entry Mode object in ASA
1022
+ #
1023
+ # @param terminal [Lithic::Models::CardAuthorization::Pos::Terminal]
1024
+
1025
+ # @see Lithic::Models::CardAuthorization::Pos#entry_mode
1026
+ class EntryMode < Lithic::Internal::Type::BaseModel
1027
+ # @!attribute card
1028
+ # Card Presence Indicator
1029
+ #
1030
+ # @return [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Card, nil]
1031
+ optional :card, enum: -> { Lithic::CardAuthorization::Pos::EntryMode::Card }
1032
+
1033
+ # @!attribute cardholder
1034
+ # Cardholder Presence Indicator
1035
+ #
1036
+ # @return [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Cardholder, nil]
1037
+ optional :cardholder, enum: -> { Lithic::CardAuthorization::Pos::EntryMode::Cardholder }
1038
+
1039
+ # @!attribute pan
1040
+ # Method of entry for the PAN
1041
+ #
1042
+ # @return [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Pan, nil]
1043
+ optional :pan, enum: -> { Lithic::CardAuthorization::Pos::EntryMode::Pan }
1044
+
1045
+ # @!attribute pin_entered
1046
+ # Indicates whether the cardholder entered the PIN. True if the PIN was entered.
1047
+ #
1048
+ # @return [Boolean, nil]
1049
+ optional :pin_entered, Lithic::Internal::Type::Boolean
1050
+
1051
+ # @!method initialize(card: nil, cardholder: nil, pan: nil, pin_entered: nil)
1052
+ # POS > Entry Mode object in ASA
1053
+ #
1054
+ # @param card [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Card] Card Presence Indicator
1055
+ #
1056
+ # @param cardholder [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Cardholder] Cardholder Presence Indicator
1057
+ #
1058
+ # @param pan [Symbol, Lithic::Models::CardAuthorization::Pos::EntryMode::Pan] Method of entry for the PAN
1059
+ #
1060
+ # @param pin_entered [Boolean] Indicates whether the cardholder entered the PIN. True if the PIN was entered.
1061
+
1062
+ # Card Presence Indicator
1063
+ #
1064
+ # @see Lithic::Models::CardAuthorization::Pos::EntryMode#card
1065
+ module Card
1066
+ extend Lithic::Internal::Type::Enum
1067
+
1068
+ PRESENT = :PRESENT
1069
+ NOT_PRESENT = :NOT_PRESENT
1070
+ UNKNOWN = :UNKNOWN
1071
+
1072
+ # @!method self.values
1073
+ # @return [Array<Symbol>]
1074
+ end
1075
+
1076
+ # Cardholder Presence Indicator
1077
+ #
1078
+ # @see Lithic::Models::CardAuthorization::Pos::EntryMode#cardholder
1079
+ module Cardholder
1080
+ extend Lithic::Internal::Type::Enum
1081
+
1082
+ DEFERRED_BILLING = :DEFERRED_BILLING
1083
+ ELECTRONIC_ORDER = :ELECTRONIC_ORDER
1084
+ INSTALLMENT = :INSTALLMENT
1085
+ MAIL_ORDER = :MAIL_ORDER
1086
+ NOT_PRESENT = :NOT_PRESENT
1087
+ PRESENT = :PRESENT
1088
+ REOCCURRING = :REOCCURRING
1089
+ TELEPHONE_ORDER = :TELEPHONE_ORDER
1090
+ UNKNOWN = :UNKNOWN
1091
+
1092
+ # @!method self.values
1093
+ # @return [Array<Symbol>]
1094
+ end
1095
+
1096
+ # Method of entry for the PAN
1097
+ #
1098
+ # @see Lithic::Models::CardAuthorization::Pos::EntryMode#pan
1099
+ module Pan
1100
+ extend Lithic::Internal::Type::Enum
1101
+
1102
+ AUTO_ENTRY = :AUTO_ENTRY
1103
+ BAR_CODE = :BAR_CODE
1104
+ CONTACTLESS = :CONTACTLESS
1105
+ ECOMMERCE = :ECOMMERCE
1106
+ ERROR_KEYED = :ERROR_KEYED
1107
+ ERROR_MAGNETIC_STRIPE = :ERROR_MAGNETIC_STRIPE
1108
+ ICC = :ICC
1109
+ KEY_ENTERED = :KEY_ENTERED
1110
+ MAGNETIC_STRIPE = :MAGNETIC_STRIPE
1111
+ MANUAL = :MANUAL
1112
+ OCR = :OCR
1113
+ SECURE_CARDLESS = :SECURE_CARDLESS
1114
+ UNSPECIFIED = :UNSPECIFIED
1115
+ UNKNOWN = :UNKNOWN
1116
+ CREDENTIAL_ON_FILE = :CREDENTIAL_ON_FILE
1117
+
1118
+ # @!method self.values
1119
+ # @return [Array<Symbol>]
1120
+ end
1121
+ end
1122
+
1123
+ # @see Lithic::Models::CardAuthorization::Pos#terminal
1124
+ class Terminal < Lithic::Internal::Type::BaseModel
1125
+ # @!attribute attended
1126
+ # True if a clerk is present at the sale.
1127
+ #
1128
+ # @return [Boolean]
1129
+ required :attended, Lithic::Internal::Type::Boolean
1130
+
1131
+ # @!attribute card_retention_capable
1132
+ # True if the terminal is capable of retaining the card.
1133
+ #
1134
+ # @return [Boolean]
1135
+ required :card_retention_capable, Lithic::Internal::Type::Boolean
1136
+
1137
+ # @!attribute on_premise
1138
+ # True if the sale was made at the place of business (vs. mobile).
1139
+ #
1140
+ # @return [Boolean]
1141
+ required :on_premise, Lithic::Internal::Type::Boolean
1142
+
1143
+ # @!attribute operator
1144
+ # The person that is designated to swipe the card
1145
+ #
1146
+ # @return [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::Operator]
1147
+ required :operator, enum: -> { Lithic::CardAuthorization::Pos::Terminal::Operator }
1148
+
1149
+ # @!attribute partial_approval_capable
1150
+ # True if the terminal is capable of partial approval. Partial approval is when
1151
+ # part of a transaction is approved and another payment must be used for the
1152
+ # remainder. Example scenario: A $40 transaction is attempted on a prepaid card
1153
+ # with a $25 balance. If partial approval is enabled, $25 can be authorized, at
1154
+ # which point the POS will prompt the user for an additional payment of $15.
1155
+ #
1156
+ # @return [Boolean]
1157
+ required :partial_approval_capable, Lithic::Internal::Type::Boolean
1158
+
1159
+ # @!attribute pin_capability
1160
+ # Status of whether the POS is able to accept PINs
1161
+ #
1162
+ # @return [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::PinCapability]
1163
+ required :pin_capability, enum: -> { Lithic::CardAuthorization::Pos::Terminal::PinCapability }
1164
+
1165
+ # @!attribute type
1166
+ # POS Type
1167
+ #
1168
+ # @return [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::Type]
1169
+ required :type, enum: -> { Lithic::CardAuthorization::Pos::Terminal::Type }
1170
+
1171
+ # @!attribute acceptor_terminal_id
1172
+ # Uniquely identifies a terminal at the card acceptor location of acquiring
1173
+ # institutions or merchant POS Systems. Left justified with trailing spaces.
1174
+ #
1175
+ # @return [String, nil]
1176
+ optional :acceptor_terminal_id, String, nil?: true
1177
+
1178
+ # @!method initialize(attended:, card_retention_capable:, on_premise:, operator:, partial_approval_capable:, pin_capability:, type:, acceptor_terminal_id: nil)
1179
+ # Some parameter documentations has been truncated, see
1180
+ # {Lithic::Models::CardAuthorization::Pos::Terminal} for more details.
1181
+ #
1182
+ # @param attended [Boolean] True if a clerk is present at the sale.
1183
+ #
1184
+ # @param card_retention_capable [Boolean] True if the terminal is capable of retaining the card.
1185
+ #
1186
+ # @param on_premise [Boolean] True if the sale was made at the place of business (vs. mobile).
1187
+ #
1188
+ # @param operator [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::Operator] The person that is designated to swipe the card
1189
+ #
1190
+ # @param partial_approval_capable [Boolean] True if the terminal is capable of partial approval. Partial approval is when pa
1191
+ #
1192
+ # @param pin_capability [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::PinCapability] Status of whether the POS is able to accept PINs
1193
+ #
1194
+ # @param type [Symbol, Lithic::Models::CardAuthorization::Pos::Terminal::Type] POS Type
1195
+ #
1196
+ # @param acceptor_terminal_id [String, nil] Uniquely identifies a terminal at the card acceptor location of acquiring instit
1197
+
1198
+ # The person that is designated to swipe the card
1199
+ #
1200
+ # @see Lithic::Models::CardAuthorization::Pos::Terminal#operator
1201
+ module Operator
1202
+ extend Lithic::Internal::Type::Enum
1203
+
1204
+ ADMINISTRATIVE = :ADMINISTRATIVE
1205
+ CARDHOLDER = :CARDHOLDER
1206
+ CARD_ACCEPTOR = :CARD_ACCEPTOR
1207
+ UNKNOWN = :UNKNOWN
1208
+
1209
+ # @!method self.values
1210
+ # @return [Array<Symbol>]
1211
+ end
1212
+
1213
+ # Status of whether the POS is able to accept PINs
1214
+ #
1215
+ # @see Lithic::Models::CardAuthorization::Pos::Terminal#pin_capability
1216
+ module PinCapability
1217
+ extend Lithic::Internal::Type::Enum
1218
+
1219
+ CAPABLE = :CAPABLE
1220
+ INOPERATIVE = :INOPERATIVE
1221
+ NOT_CAPABLE = :NOT_CAPABLE
1222
+ UNSPECIFIED = :UNSPECIFIED
1223
+
1224
+ # @!method self.values
1225
+ # @return [Array<Symbol>]
1226
+ end
1227
+
1228
+ # POS Type
1229
+ #
1230
+ # @see Lithic::Models::CardAuthorization::Pos::Terminal#type
1231
+ module Type
1232
+ extend Lithic::Internal::Type::Enum
1233
+
1234
+ ADMINISTRATIVE = :ADMINISTRATIVE
1235
+ ATM = :ATM
1236
+ AUTHORIZATION = :AUTHORIZATION
1237
+ COUPON_MACHINE = :COUPON_MACHINE
1238
+ DIAL_TERMINAL = :DIAL_TERMINAL
1239
+ ECOMMERCE = :ECOMMERCE
1240
+ ECR = :ECR
1241
+ FUEL_MACHINE = :FUEL_MACHINE
1242
+ HOME_TERMINAL = :HOME_TERMINAL
1243
+ MICR = :MICR
1244
+ OFF_PREMISE = :OFF_PREMISE
1245
+ PAYMENT = :PAYMENT
1246
+ PDA = :PDA
1247
+ PHONE = :PHONE
1248
+ POINT = :POINT
1249
+ POS_TERMINAL = :POS_TERMINAL
1250
+ PUBLIC_UTILITY = :PUBLIC_UTILITY
1251
+ SELF_SERVICE = :SELF_SERVICE
1252
+ TELEVISION = :TELEVISION
1253
+ TELLER = :TELLER
1254
+ TRAVELERS_CHECK_MACHINE = :TRAVELERS_CHECK_MACHINE
1255
+ VENDING = :VENDING
1256
+ VOICE = :VOICE
1257
+ UNKNOWN = :UNKNOWN
1258
+
1259
+ # @!method self.values
1260
+ # @return [Array<Symbol>]
1261
+ end
1262
+ end
1263
+ end
1264
+ end
1265
+ end
1266
+ end