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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +1 -1
- data/lib/lithic/client.rb +4 -0
- data/lib/lithic/models/auth_rules/rule_stats.rb +112 -0
- data/lib/lithic/models/auth_rules/v2/backtest_results.rb +6 -238
- data/lib/lithic/models/auth_rules/v2_retrieve_report_params.rb +32 -0
- data/lib/lithic/models/auth_rules/v2_retrieve_report_response.rb +71 -0
- data/lib/lithic/models/card_convert_physical_params.rb +10 -6
- data/lib/lithic/models/card_create_params.rb +10 -6
- data/lib/lithic/models/card_reissue_params.rb +10 -6
- data/lib/lithic/models/card_renew_params.rb +10 -6
- data/lib/lithic/models/external_bank_account_create_params.rb +1 -1
- data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +1 -0
- data/lib/lithic/models/financial_transaction.rb +1 -0
- data/lib/lithic/models/fraud/transaction_report_params.rb +130 -0
- data/lib/lithic/models/fraud/transaction_report_response.rb +160 -0
- data/lib/lithic/models/fraud/transaction_retrieve_params.rb +16 -0
- data/lib/lithic/models/fraud/transaction_retrieve_response.rb +160 -0
- data/lib/lithic/models/non_pci_card.rb +16 -21
- data/lib/lithic/models/payment.rb +7 -1
- data/lib/lithic/models/payment_create_params.rb +7 -1
- data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +111 -79
- data/lib/lithic/models/three_ds/authentication_simulate_params.rb +8 -2
- data/lib/lithic/models/three_ds/authentication_simulate_response.rb +2 -6
- data/lib/lithic/models/three_ds/challenge_response.rb +7 -7
- data/lib/lithic/models/three_ds/challenge_result.rb +1 -1
- data/lib/lithic/models/transfer.rb +1 -0
- data/lib/lithic/models.rb +2 -0
- data/lib/lithic/resources/auth_rules/v2/backtests.rb +8 -7
- data/lib/lithic/resources/auth_rules/v2.rb +45 -4
- data/lib/lithic/resources/fraud/transactions.rb +69 -0
- data/lib/lithic/resources/fraud.rb +18 -0
- data/lib/lithic/resources/three_ds/authentication.rb +6 -6
- data/lib/lithic/resources/three_ds/decisioning.rb +8 -3
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +9 -0
- data/rbi/lithic/client.rbi +3 -0
- data/rbi/lithic/models/auth_rules/rule_stats.rbi +229 -0
- data/rbi/lithic/models/auth_rules/v2/backtest_results.rbi +8 -523
- data/rbi/lithic/models/auth_rules/v2_retrieve_report_params.rbi +56 -0
- data/rbi/lithic/models/auth_rules/v2_retrieve_report_response.rbi +149 -0
- data/rbi/lithic/models/card_convert_physical_params.rbi +15 -9
- data/rbi/lithic/models/card_create_params.rbi +15 -9
- data/rbi/lithic/models/card_reissue_params.rbi +15 -9
- data/rbi/lithic/models/card_renew_params.rbi +15 -9
- data/rbi/lithic/models/external_bank_account_create_params.rbi +2 -2
- data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +5 -0
- data/rbi/lithic/models/financial_transaction.rbi +5 -0
- data/rbi/lithic/models/fraud/transaction_report_params.rbi +263 -0
- data/rbi/lithic/models/fraud/transaction_report_response.rbi +309 -0
- data/rbi/lithic/models/fraud/transaction_retrieve_params.rbi +32 -0
- data/rbi/lithic/models/fraud/transaction_retrieve_response.rbi +309 -0
- data/rbi/lithic/models/non_pci_card.rbi +27 -38
- data/rbi/lithic/models/payment.rbi +9 -3
- data/rbi/lithic/models/payment_create_params.rbi +8 -3
- data/rbi/lithic/models/three_ds/authentication_retrieve_response.rbi +171 -108
- data/rbi/lithic/models/three_ds/authentication_simulate_params.rbi +6 -0
- data/rbi/lithic/models/three_ds/authentication_simulate_response.rbi +2 -4
- data/rbi/lithic/models/three_ds/challenge_response.rbi +7 -10
- data/rbi/lithic/models/three_ds/challenge_result.rbi +1 -1
- data/rbi/lithic/models/transfer.rbi +2 -0
- data/rbi/lithic/models.rbi +2 -0
- data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +8 -7
- data/rbi/lithic/resources/auth_rules/v2.rbi +37 -4
- data/rbi/lithic/resources/cards.rbi +20 -12
- data/rbi/lithic/resources/fraud/transactions.rbi +86 -0
- data/rbi/lithic/resources/fraud.rbi +15 -0
- data/rbi/lithic/resources/three_ds/authentication.rbi +6 -4
- data/rbi/lithic/resources/three_ds/decisioning.rbi +9 -6
- data/sig/lithic/client.rbs +2 -0
- data/sig/lithic/models/auth_rules/rule_stats.rbs +108 -0
- data/sig/lithic/models/auth_rules/v2/backtest_results.rbs +8 -214
- data/sig/lithic/models/auth_rules/v2_retrieve_report_params.rbs +30 -0
- data/sig/lithic/models/auth_rules/v2_retrieve_report_response.rbs +64 -0
- data/sig/lithic/models/external_bank_account_create_params.rbs +2 -2
- data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +2 -0
- data/sig/lithic/models/financial_transaction.rbs +2 -0
- data/sig/lithic/models/fraud/transaction_report_params.rbs +75 -0
- data/sig/lithic/models/fraud/transaction_report_response.rbs +90 -0
- data/sig/lithic/models/fraud/transaction_retrieve_params.rbs +17 -0
- data/sig/lithic/models/fraud/transaction_retrieve_response.rbs +90 -0
- data/sig/lithic/models/non_pci_card.rbs +4 -19
- data/sig/lithic/models/payment.rbs +8 -3
- data/sig/lithic/models/payment_create_params.rbs +8 -3
- data/sig/lithic/models/three_ds/authentication_retrieve_response.rbs +19 -20
- data/sig/lithic/models/transfer.rbs +2 -0
- data/sig/lithic/models.rbs +2 -0
- data/sig/lithic/resources/auth_rules/v2.rbs +7 -0
- data/sig/lithic/resources/fraud/transactions.rbs +22 -0
- data/sig/lithic/resources/fraud.rbs +9 -0
- 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
|
-
#
|
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
|
-
#
|
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
|
13
|
-
#
|
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
|
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
|
31
|
-
#
|
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
|
32
|
+
# Whether the Cardholder has approved or declined the issued Challenge
|
36
33
|
challenge_response:
|
37
34
|
)
|
38
35
|
end
|
data/rbi/lithic/models.rbi
CHANGED
@@ -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`
|
26
|
-
# for `VELOCITY_LIMIT` rules is
|
27
|
-
# where Lithic has pre-calculated
|
28
|
-
# transactions), a backtest may be
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
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
|
-
#
|
234
|
-
#
|
235
|
-
#
|
236
|
-
#
|
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
|
111
|
-
#
|
112
|
-
# - `
|
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
|
300
|
-
#
|
301
|
-
# - `
|
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
|
433
|
-
#
|
434
|
-
# - `
|
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
|
487
|
-
#
|
488
|
-
# - `
|
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
|
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
|
53
|
-
# challenge must precede. Only a single attempt
|
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
|
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
|
17
|
-
#
|
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
|
24
|
+
# Whether the Cardholder has approved or declined the issued Challenge
|
22
25
|
challenge_response:,
|
23
26
|
request_options: {}
|
24
27
|
)
|
data/sig/lithic/client.rbs
CHANGED
@@ -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
|