lithic 0.1.0.pre.alpha.33 → 0.1.0.pre.alpha.35

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 (92) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +4 -0
  5. data/lib/lithic/models/auth_rules/rule_stats.rb +112 -0
  6. data/lib/lithic/models/auth_rules/v2/backtest_results.rb +6 -238
  7. data/lib/lithic/models/auth_rules/v2_retrieve_report_params.rb +32 -0
  8. data/lib/lithic/models/auth_rules/v2_retrieve_report_response.rb +71 -0
  9. data/lib/lithic/models/card_convert_physical_params.rb +10 -6
  10. data/lib/lithic/models/card_create_params.rb +10 -6
  11. data/lib/lithic/models/card_reissue_params.rb +10 -6
  12. data/lib/lithic/models/card_renew_params.rb +10 -6
  13. data/lib/lithic/models/external_bank_account_create_params.rb +1 -1
  14. data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +1 -0
  15. data/lib/lithic/models/financial_transaction.rb +1 -0
  16. data/lib/lithic/models/fraud/transaction_report_params.rb +130 -0
  17. data/lib/lithic/models/fraud/transaction_report_response.rb +160 -0
  18. data/lib/lithic/models/fraud/transaction_retrieve_params.rb +16 -0
  19. data/lib/lithic/models/fraud/transaction_retrieve_response.rb +160 -0
  20. data/lib/lithic/models/non_pci_card.rb +16 -21
  21. data/lib/lithic/models/payment.rb +7 -1
  22. data/lib/lithic/models/payment_create_params.rb +7 -1
  23. data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +111 -79
  24. data/lib/lithic/models/three_ds/authentication_simulate_params.rb +8 -2
  25. data/lib/lithic/models/three_ds/authentication_simulate_response.rb +2 -6
  26. data/lib/lithic/models/three_ds/challenge_response.rb +7 -7
  27. data/lib/lithic/models/three_ds/challenge_result.rb +1 -1
  28. data/lib/lithic/models/transfer.rb +1 -0
  29. data/lib/lithic/models.rb +2 -0
  30. data/lib/lithic/resources/auth_rules/v2/backtests.rb +8 -7
  31. data/lib/lithic/resources/auth_rules/v2.rb +45 -4
  32. data/lib/lithic/resources/fraud/transactions.rb +69 -0
  33. data/lib/lithic/resources/fraud.rb +18 -0
  34. data/lib/lithic/resources/three_ds/authentication.rb +6 -6
  35. data/lib/lithic/resources/three_ds/decisioning.rb +8 -3
  36. data/lib/lithic/version.rb +1 -1
  37. data/lib/lithic.rb +9 -0
  38. data/rbi/lithic/client.rbi +3 -0
  39. data/rbi/lithic/models/auth_rules/rule_stats.rbi +229 -0
  40. data/rbi/lithic/models/auth_rules/v2/backtest_results.rbi +8 -523
  41. data/rbi/lithic/models/auth_rules/v2_retrieve_report_params.rbi +56 -0
  42. data/rbi/lithic/models/auth_rules/v2_retrieve_report_response.rbi +149 -0
  43. data/rbi/lithic/models/card_convert_physical_params.rbi +15 -9
  44. data/rbi/lithic/models/card_create_params.rbi +15 -9
  45. data/rbi/lithic/models/card_reissue_params.rbi +15 -9
  46. data/rbi/lithic/models/card_renew_params.rbi +15 -9
  47. data/rbi/lithic/models/external_bank_account_create_params.rbi +2 -2
  48. data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +5 -0
  49. data/rbi/lithic/models/financial_transaction.rbi +5 -0
  50. data/rbi/lithic/models/fraud/transaction_report_params.rbi +263 -0
  51. data/rbi/lithic/models/fraud/transaction_report_response.rbi +309 -0
  52. data/rbi/lithic/models/fraud/transaction_retrieve_params.rbi +32 -0
  53. data/rbi/lithic/models/fraud/transaction_retrieve_response.rbi +309 -0
  54. data/rbi/lithic/models/non_pci_card.rbi +27 -38
  55. data/rbi/lithic/models/payment.rbi +9 -3
  56. data/rbi/lithic/models/payment_create_params.rbi +8 -3
  57. data/rbi/lithic/models/three_ds/authentication_retrieve_response.rbi +171 -108
  58. data/rbi/lithic/models/three_ds/authentication_simulate_params.rbi +6 -0
  59. data/rbi/lithic/models/three_ds/authentication_simulate_response.rbi +2 -4
  60. data/rbi/lithic/models/three_ds/challenge_response.rbi +7 -10
  61. data/rbi/lithic/models/three_ds/challenge_result.rbi +1 -1
  62. data/rbi/lithic/models/transfer.rbi +2 -0
  63. data/rbi/lithic/models.rbi +2 -0
  64. data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +8 -7
  65. data/rbi/lithic/resources/auth_rules/v2.rbi +37 -4
  66. data/rbi/lithic/resources/cards.rbi +20 -12
  67. data/rbi/lithic/resources/fraud/transactions.rbi +86 -0
  68. data/rbi/lithic/resources/fraud.rbi +15 -0
  69. data/rbi/lithic/resources/three_ds/authentication.rbi +6 -4
  70. data/rbi/lithic/resources/three_ds/decisioning.rbi +9 -6
  71. data/sig/lithic/client.rbs +2 -0
  72. data/sig/lithic/models/auth_rules/rule_stats.rbs +108 -0
  73. data/sig/lithic/models/auth_rules/v2/backtest_results.rbs +8 -214
  74. data/sig/lithic/models/auth_rules/v2_retrieve_report_params.rbs +30 -0
  75. data/sig/lithic/models/auth_rules/v2_retrieve_report_response.rbs +64 -0
  76. data/sig/lithic/models/external_bank_account_create_params.rbs +2 -2
  77. data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +2 -0
  78. data/sig/lithic/models/financial_transaction.rbs +2 -0
  79. data/sig/lithic/models/fraud/transaction_report_params.rbs +75 -0
  80. data/sig/lithic/models/fraud/transaction_report_response.rbs +90 -0
  81. data/sig/lithic/models/fraud/transaction_retrieve_params.rbs +17 -0
  82. data/sig/lithic/models/fraud/transaction_retrieve_response.rbs +90 -0
  83. data/sig/lithic/models/non_pci_card.rbs +4 -19
  84. data/sig/lithic/models/payment.rbs +8 -3
  85. data/sig/lithic/models/payment_create_params.rbs +8 -3
  86. data/sig/lithic/models/three_ds/authentication_retrieve_response.rbs +19 -20
  87. data/sig/lithic/models/transfer.rbs +2 -0
  88. data/sig/lithic/models.rbs +2 -0
  89. data/sig/lithic/resources/auth_rules/v2.rbs +7 -0
  90. data/sig/lithic/resources/fraud/transactions.rbs +22 -0
  91. data/sig/lithic/resources/fraud.rbs +9 -0
  92. metadata +29 -2
@@ -15,6 +15,7 @@ module Lithic
15
15
  )
16
16
  end
17
17
 
18
+ # Merchant information for the simulated transaction
18
19
  sig { returns(Lithic::ThreeDS::AuthenticationSimulateParams::Merchant) }
19
20
  attr_reader :merchant
20
21
 
@@ -30,6 +31,7 @@ module Lithic
30
31
  sig { returns(String) }
31
32
  attr_accessor :pan
32
33
 
34
+ # Transaction details for the simulation
33
35
  sig do
34
36
  returns(Lithic::ThreeDS::AuthenticationSimulateParams::Transaction)
35
37
  end
@@ -75,9 +77,11 @@ module Lithic
75
77
  ).returns(T.attached_class)
76
78
  end
77
79
  def self.new(
80
+ # Merchant information for the simulated transaction
78
81
  merchant:,
79
82
  # Sixteen digit card number.
80
83
  pan:,
84
+ # Transaction details for the simulation
81
85
  transaction:,
82
86
  # When set will use the following values as part of the Simulated Authentication.
83
87
  # When not set defaults to MATCH
@@ -132,6 +136,7 @@ module Lithic
132
136
  sig { returns(String) }
133
137
  attr_accessor :name
134
138
 
139
+ # Merchant information for the simulated transaction
135
140
  sig do
136
141
  params(
137
142
  id: String,
@@ -183,6 +188,7 @@ module Lithic
183
188
  sig { returns(String) }
184
189
  attr_accessor :currency
185
190
 
191
+ # Transaction details for the simulation
186
192
  sig do
187
193
  params(amount: Integer, currency: String).returns(T.attached_class)
188
194
  end
@@ -12,8 +12,7 @@ module Lithic
12
12
  )
13
13
  end
14
14
 
15
- # A unique token to reference this transaction with later calls to void or clear
16
- # the authorization.
15
+ # Globally unique identifier for the 3DS authentication.
17
16
  sig { returns(T.nilable(String)) }
18
17
  attr_reader :token
19
18
 
@@ -22,8 +21,7 @@ module Lithic
22
21
 
23
22
  sig { params(token: String).returns(T.attached_class) }
24
23
  def self.new(
25
- # A unique token to reference this transaction with later calls to void or clear
26
- # the authorization.
24
+ # Globally unique identifier for the 3DS authentication.
27
25
  token: nil
28
26
  )
29
27
  end
@@ -9,17 +9,16 @@ module Lithic
9
9
  T.any(Lithic::ThreeDS::ChallengeResponse, Lithic::Internal::AnyHash)
10
10
  end
11
11
 
12
- # Globally unique identifier for the 3DS authentication. This token is sent as
13
- # part of the initial 3DS Decisioning Request and as part of the 3DS Challenge
14
- # Event in the [ThreeDSAuthentication](#/components/schemas/ThreeDSAuthentication)
15
- # object
12
+ # Globally unique identifier for 3DS Authentication that resulted in
13
+ # PENDING_CHALLENGE authentication result.
16
14
  sig { returns(String) }
17
15
  attr_accessor :token
18
16
 
19
- # Whether the Cardholder has Approved or Declined the issued Challenge
17
+ # Whether the Cardholder has approved or declined the issued Challenge
20
18
  sig { returns(Lithic::ThreeDS::ChallengeResult::OrSymbol) }
21
19
  attr_accessor :challenge_response
22
20
 
21
+ # Response from Card Program to a 3DS Authentication challenge
23
22
  sig do
24
23
  params(
25
24
  token: String,
@@ -27,12 +26,10 @@ module Lithic
27
26
  ).returns(T.attached_class)
28
27
  end
29
28
  def self.new(
30
- # Globally unique identifier for the 3DS authentication. This token is sent as
31
- # part of the initial 3DS Decisioning Request and as part of the 3DS Challenge
32
- # Event in the [ThreeDSAuthentication](#/components/schemas/ThreeDSAuthentication)
33
- # object
29
+ # Globally unique identifier for 3DS Authentication that resulted in
30
+ # PENDING_CHALLENGE authentication result.
34
31
  token:,
35
- # Whether the Cardholder has Approved or Declined the issued Challenge
32
+ # Whether the Cardholder has approved or declined the issued Challenge
36
33
  challenge_response:
37
34
  )
38
35
  end
@@ -3,7 +3,7 @@
3
3
  module Lithic
4
4
  module Models
5
5
  module ThreeDS
6
- # Whether the Cardholder has Approved or Declined the issued Challenge
6
+ # Whether the Cardholder has approved or declined the issued Challenge
7
7
  module ChallengeResult
8
8
  extend Lithic::Internal::Type::Enum
9
9
 
@@ -420,6 +420,8 @@ module Lithic
420
420
  )
421
421
  CLEARING =
422
422
  T.let(:CLEARING, Lithic::Transfer::Event::Type::TaggedSymbol)
423
+ COLLECTION =
424
+ T.let(:COLLECTION, Lithic::Transfer::Event::Type::TaggedSymbol)
423
425
  CORRECTION_CREDIT =
424
426
  T.let(
425
427
  :CORRECTION_CREDIT,
@@ -220,6 +220,8 @@ module Lithic
220
220
 
221
221
  FinancialTransaction = Lithic::Models::FinancialTransaction
222
222
 
223
+ Fraud = Lithic::Models::Fraud
224
+
223
225
  FundingEventListParams = Lithic::Models::FundingEventListParams
224
226
 
225
227
  FundingEventRetrieveDetailsParams =
@@ -22,13 +22,14 @@ module Lithic
22
22
  # `/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}`
23
23
  # endpoint.
24
24
  #
25
- # Lithic currently supports backtesting for `CONDITIONAL_BLOCK` rules. Backtesting
26
- # for `VELOCITY_LIMIT` rules is generally not supported. In specific cases (i.e.
27
- # where Lithic has pre-calculated the requested velocity metrics for historical
28
- # transactions), a backtest may be feasible. However, such cases are uncommon and
29
- # customers should not anticipate support for velocity backtests under most
30
- # configurations. If a historical transaction does not feature the required inputs
31
- # to evaluate the rule, then it will not be included in the final backtest report.
25
+ # Lithic currently supports backtesting for `CONDITIONAL_BLOCK` /
26
+ # `CONDITIONAL_3DS_ACTION` rules. Backtesting for `VELOCITY_LIMIT` rules is
27
+ # generally not supported. In specific cases (i.e. where Lithic has pre-calculated
28
+ # the requested velocity metrics for historical transactions), a backtest may be
29
+ # feasible. However, such cases are uncommon and customers should not anticipate
30
+ # support for velocity backtests under most configurations. If a historical
31
+ # transaction does not feature the required inputs to evaluate the rule, then it
32
+ # will not be included in the final backtest report.
32
33
  sig do
33
34
  params(
34
35
  auth_rule_token: String,
@@ -230,10 +230,11 @@ module Lithic
230
230
  )
231
231
  end
232
232
 
233
- # Requests a performance report of an Auth rule to be asynchronously generated.
234
- # Reports can only be run on rules in draft or active mode and will included
235
- # approved and declined statistics as well as examples. The generated report will
236
- # be delivered asynchronously through a webhook with `event_type` =
233
+ # This endpoint is deprecated and will be removed in the future. Requests a
234
+ # performance report of an Auth rule to be asynchronously generated. Reports can
235
+ # only be run on rules in draft or active mode and will included approved and
236
+ # declined statistics as well as examples. The generated report will be delivered
237
+ # asynchronously through a webhook with `event_type` =
237
238
  # `auth_rules.performance_report.created`. See the docs on setting up
238
239
  # [webhook subscriptions](https://docs.lithic.com/docs/events-api).
239
240
  #
@@ -293,6 +294,38 @@ module Lithic
293
294
  )
294
295
  end
295
296
 
297
+ # Retrieves a performance report for an Auth rule containing daily statistics and
298
+ # evaluation outcomes.
299
+ #
300
+ # **Time Range Limitations:**
301
+ #
302
+ # - Reports are supported for the past 3 months only
303
+ # - Maximum interval length is 1 month
304
+ # - Report data is available only through the previous day in UTC (current day
305
+ # data is not available)
306
+ #
307
+ # The report provides daily statistics for both current and draft versions of the
308
+ # Auth rule, including approval, decline, and challenge counts along with sample
309
+ # events.
310
+ sig do
311
+ params(
312
+ auth_rule_token: String,
313
+ begin_: Date,
314
+ end_: Date,
315
+ request_options: Lithic::RequestOptions::OrHash
316
+ ).returns(Lithic::Models::AuthRules::V2RetrieveReportResponse)
317
+ end
318
+ def retrieve_report(
319
+ # Globally unique identifier for the Auth Rule.
320
+ auth_rule_token,
321
+ # Start date for the report
322
+ begin_:,
323
+ # End date for the report
324
+ end_:,
325
+ request_options: {}
326
+ )
327
+ end
328
+
296
329
  # @api private
297
330
  sig { params(client: Lithic::Client).returns(T.attached_class) }
298
331
  def self.new(client:)
@@ -107,10 +107,12 @@ module Lithic
107
107
  # - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
108
108
  # with tracking
109
109
  # - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
110
- # - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
111
- # - `2_DAY` - FedEx 2-day shipping, with tracking
112
- # - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
110
+ # - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day
111
+ # shipping, with tracking
112
+ # - `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with
113
113
  # tracking
114
+ # - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
115
+ # or similar international option, with tracking
114
116
  shipping_method: nil,
115
117
  # Amount (in cents) to limit approved authorizations (e.g. 100000 would be a
116
118
  # $1,000 limit). Transaction requests above the spend limit will be declined. Note
@@ -296,10 +298,12 @@ module Lithic
296
298
  # - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
297
299
  # with tracking
298
300
  # - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
299
- # - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
300
- # - `2_DAY` - FedEx 2-day shipping, with tracking
301
- # - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
301
+ # - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day
302
+ # shipping, with tracking
303
+ # - `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with
302
304
  # tracking
305
+ # - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
306
+ # or similar international option, with tracking
303
307
  shipping_method: nil,
304
308
  request_options: {}
305
309
  )
@@ -429,10 +433,12 @@ module Lithic
429
433
  # - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
430
434
  # with tracking
431
435
  # - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
432
- # - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
433
- # - `2_DAY` - FedEx 2-day shipping, with tracking
434
- # - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
436
+ # - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day
437
+ # shipping, with tracking
438
+ # - `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with
435
439
  # tracking
440
+ # - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
441
+ # or similar international option, with tracking
436
442
  shipping_method: nil,
437
443
  request_options: {}
438
444
  )
@@ -483,10 +489,12 @@ module Lithic
483
489
  # - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
484
490
  # with tracking
485
491
  # - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
486
- # - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
487
- # - `2_DAY` - FedEx 2-day shipping, with tracking
488
- # - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
492
+ # - `EXPRESS` - FedEx or UPS depending on card manufacturer, Express, 3-day
493
+ # shipping, with tracking
494
+ # - `2_DAY` - FedEx or UPS depending on card manufacturer, 2-day shipping, with
489
495
  # tracking
496
+ # - `EXPEDITED` - FedEx or UPS depending on card manufacturer, Standard Overnight
497
+ # or similar international option, with tracking
490
498
  shipping_method: nil,
491
499
  request_options: {}
492
500
  )
@@ -0,0 +1,86 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Resources
5
+ class Fraud
6
+ class Transactions
7
+ # Retrieve a fraud report for a specific transaction identified by its unique
8
+ # transaction token.
9
+ sig do
10
+ params(
11
+ transaction_token: String,
12
+ request_options: Lithic::RequestOptions::OrHash
13
+ ).returns(Lithic::Models::Fraud::TransactionRetrieveResponse)
14
+ end
15
+ def retrieve(
16
+ # The token of the transaction that the enhanced data is associated with.
17
+ transaction_token,
18
+ request_options: {}
19
+ )
20
+ end
21
+
22
+ # Report fraud for a specific transaction token by providing details such as fraud
23
+ # type, fraud status, and any additional comments.
24
+ sig do
25
+ params(
26
+ transaction_token: String,
27
+ fraud_status:
28
+ Lithic::Fraud::TransactionReportParams::FraudStatus::OrSymbol,
29
+ comment: String,
30
+ fraud_type:
31
+ Lithic::Fraud::TransactionReportParams::FraudType::OrSymbol,
32
+ request_options: Lithic::RequestOptions::OrHash
33
+ ).returns(Lithic::Models::Fraud::TransactionReportResponse)
34
+ end
35
+ def report(
36
+ # The token of the transaction that the enhanced data is associated with.
37
+ transaction_token,
38
+ # The fraud status of the transaction, string (enum) supporting the following
39
+ # values:
40
+ #
41
+ # - `SUSPECTED_FRAUD`: The transaction is suspected to be fraudulent, but this
42
+ # hasn’t been confirmed.
43
+ # - `FRAUDULENT`: The transaction is confirmed to be fraudulent. A transaction may
44
+ # immediately be moved into this state, or be graduated into this state from the
45
+ # `SUSPECTED_FRAUD` state.
46
+ # - `NOT_FRAUDULENT`: The transaction is (explicitly) marked as not fraudulent. A
47
+ # transaction may immediately be moved into this state, or be graduated into
48
+ # this state from the `SUSPECTED_FRAUD` state.
49
+ fraud_status:,
50
+ # Optional field providing additional information or context about why the
51
+ # transaction is considered fraudulent.
52
+ comment: nil,
53
+ # Specifies the type or category of fraud that the transaction is suspected or
54
+ # confirmed to involve, string (enum) supporting the following values:
55
+ #
56
+ # - `FIRST_PARTY_FRAUD`: First-party fraud occurs when a legitimate account or
57
+ # cardholder intentionally misuses financial services for personal gain. This
58
+ # includes actions such as disputing legitimate transactions to obtain a refund,
59
+ # abusing return policies, or defaulting on credit obligations without intent to
60
+ # repay.
61
+ # - `ACCOUNT_TAKEOVER`: Account takeover fraud occurs when a fraudster gains
62
+ # unauthorized access to an existing account, modifies account settings, and
63
+ # carries out fraudulent transactions.
64
+ # - `CARD_COMPROMISED`: Card compromised fraud occurs when a fraudster gains
65
+ # access to card details without taking over the account, such as through
66
+ # physical card theft, cloning, or online data breaches.
67
+ # - `IDENTITY_THEFT`: Identity theft fraud occurs when a fraudster uses stolen
68
+ # personal information, such as Social Security numbers or addresses, to open
69
+ # accounts, apply for loans, or conduct financial transactions in someone's
70
+ # name.
71
+ # - `CARDHOLDER_MANIPULATION`: This type of fraud occurs when a fraudster
72
+ # manipulates or coerces a legitimate cardholder into unauthorized transactions,
73
+ # often through social engineering tactics.
74
+ fraud_type: nil,
75
+ request_options: {}
76
+ )
77
+ end
78
+
79
+ # @api private
80
+ sig { params(client: Lithic::Client).returns(T.attached_class) }
81
+ def self.new(client:)
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,15 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Resources
5
+ class Fraud
6
+ sig { returns(Lithic::Resources::Fraud::Transactions) }
7
+ attr_reader :transactions
8
+
9
+ # @api private
10
+ sig { params(client: Lithic::Client).returns(T.attached_class) }
11
+ def self.new(client:)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -12,7 +12,7 @@ module Lithic
12
12
  ).returns(Lithic::Models::ThreeDS::AuthenticationRetrieveResponse)
13
13
  end
14
14
  def retrieve(
15
- # 3DS Authentication Token
15
+ # Globally unique identifier for the 3DS authentication.
16
16
  three_ds_authentication_token,
17
17
  request_options: {}
18
18
  )
@@ -37,9 +37,11 @@ module Lithic
37
37
  ).returns(Lithic::Models::ThreeDS::AuthenticationSimulateResponse)
38
38
  end
39
39
  def simulate(
40
+ # Merchant information for the simulated transaction
40
41
  merchant:,
41
42
  # Sixteen digit card number.
42
43
  pan:,
44
+ # Transaction details for the simulation
43
45
  transaction:,
44
46
  # When set will use the following values as part of the Simulated Authentication.
45
47
  # When not set defaults to MATCH
@@ -49,9 +51,9 @@ module Lithic
49
51
  end
50
52
 
51
53
  # Endpoint for simulating entering OTP into 3DS Challenge UI. A call to
52
- # /v1/three_ds_authentication/simulate that resulted in triggered SMS-OTP
53
- # challenge must precede. Only a single attempt is supported; upon entering OTP,
54
- # the challenge is either approved or declined.
54
+ # [/v1/three_ds_authentication/simulate](https://docs.lithic.com/reference/postsimulateauthentication)
55
+ # that resulted in triggered SMS-OTP challenge must precede. Only a single attempt
56
+ # is supported; upon entering OTP, the challenge is either approved or declined.
55
57
  sig do
56
58
  params(
57
59
  token: String,
@@ -4,7 +4,12 @@ module Lithic
4
4
  module Resources
5
5
  class ThreeDS
6
6
  class Decisioning
7
- # Card program's response to a 3DS Challenge Request (CReq)
7
+ # Card program's response to a 3DS Challenge Request. Challenge Request is emitted
8
+ # as a webhook
9
+ # [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge)
10
+ # and your Card Program needs to be configured with Out of Band (OOB) Challenges
11
+ # in order to receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for
12
+ # more information).
8
13
  sig do
9
14
  params(
10
15
  token: String,
@@ -13,12 +18,10 @@ module Lithic
13
18
  ).void
14
19
  end
15
20
  def challenge_response(
16
- # Globally unique identifier for the 3DS authentication. This token is sent as
17
- # part of the initial 3DS Decisioning Request and as part of the 3DS Challenge
18
- # Event in the [ThreeDSAuthentication](#/components/schemas/ThreeDSAuthentication)
19
- # object
21
+ # Globally unique identifier for 3DS Authentication that resulted in
22
+ # PENDING_CHALLENGE authentication result.
20
23
  token:,
21
- # Whether the Cardholder has Approved or Declined the issued Challenge
24
+ # Whether the Cardholder has approved or declined the issued Challenge
22
25
  challenge_response:,
23
26
  request_options: {}
24
27
  )
@@ -67,6 +67,8 @@ module Lithic
67
67
 
68
68
  attr_reader funding_events: Lithic::Resources::FundingEvents
69
69
 
70
+ attr_reader fraud: Lithic::Resources::Fraud
71
+
70
72
  def api_status: (
71
73
  ?request_options: Lithic::request_opts
72
74
  ) -> Lithic::APIStatus
@@ -0,0 +1,108 @@
1
+ module Lithic
2
+ module Models
3
+ module AuthRules
4
+ type rule_stats =
5
+ {
6
+ approved: Integer,
7
+ challenged: Integer,
8
+ declined: Integer,
9
+ examples: ::Array[Lithic::AuthRules::RuleStats::Example],
10
+ version: Integer
11
+ }
12
+
13
+ class RuleStats < Lithic::Internal::Type::BaseModel
14
+ attr_reader approved: Integer?
15
+
16
+ def approved=: (Integer) -> Integer
17
+
18
+ attr_reader challenged: Integer?
19
+
20
+ def challenged=: (Integer) -> Integer
21
+
22
+ attr_reader declined: Integer?
23
+
24
+ def declined=: (Integer) -> Integer
25
+
26
+ attr_reader examples: ::Array[Lithic::AuthRules::RuleStats::Example]?
27
+
28
+ def examples=: (
29
+ ::Array[Lithic::AuthRules::RuleStats::Example]
30
+ ) -> ::Array[Lithic::AuthRules::RuleStats::Example]
31
+
32
+ attr_reader version: Integer?
33
+
34
+ def version=: (Integer) -> Integer
35
+
36
+ def initialize: (
37
+ ?approved: Integer,
38
+ ?challenged: Integer,
39
+ ?declined: Integer,
40
+ ?examples: ::Array[Lithic::AuthRules::RuleStats::Example],
41
+ ?version: Integer
42
+ ) -> void
43
+
44
+ def to_hash: -> {
45
+ approved: Integer,
46
+ challenged: Integer,
47
+ declined: Integer,
48
+ examples: ::Array[Lithic::AuthRules::RuleStats::Example],
49
+ version: Integer
50
+ }
51
+
52
+ type example =
53
+ {
54
+ approved: bool,
55
+ decision: Lithic::Models::AuthRules::RuleStats::Example::decision,
56
+ event_token: String,
57
+ timestamp: Time
58
+ }
59
+
60
+ class Example < Lithic::Internal::Type::BaseModel
61
+ attr_reader approved: bool?
62
+
63
+ def approved=: (bool) -> bool
64
+
65
+ attr_reader decision: Lithic::Models::AuthRules::RuleStats::Example::decision?
66
+
67
+ def decision=: (
68
+ Lithic::Models::AuthRules::RuleStats::Example::decision
69
+ ) -> Lithic::Models::AuthRules::RuleStats::Example::decision
70
+
71
+ attr_reader event_token: String?
72
+
73
+ def event_token=: (String) -> String
74
+
75
+ attr_reader timestamp: Time?
76
+
77
+ def timestamp=: (Time) -> Time
78
+
79
+ def initialize: (
80
+ ?approved: bool,
81
+ ?decision: Lithic::Models::AuthRules::RuleStats::Example::decision,
82
+ ?event_token: String,
83
+ ?timestamp: Time
84
+ ) -> void
85
+
86
+ def to_hash: -> {
87
+ approved: bool,
88
+ decision: Lithic::Models::AuthRules::RuleStats::Example::decision,
89
+ event_token: String,
90
+ timestamp: Time
91
+ }
92
+
93
+ type decision = :APPROVED | :DECLINED | :CHALLENGED
94
+
95
+ module Decision
96
+ extend Lithic::Internal::Type::Enum
97
+
98
+ APPROVED: :APPROVED
99
+ DECLINED: :DECLINED
100
+ CHALLENGED: :CHALLENGED
101
+
102
+ def self?.values: -> ::Array[Lithic::Models::AuthRules::RuleStats::Example::decision]
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end