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
@@ -9,6 +9,7 @@ module Lithic
|
|
9
9
|
include Lithic::Internal::Type::RequestParameters
|
10
10
|
|
11
11
|
# @!attribute merchant
|
12
|
+
# Merchant information for the simulated transaction
|
12
13
|
#
|
13
14
|
# @return [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Merchant]
|
14
15
|
required :merchant, -> { Lithic::ThreeDS::AuthenticationSimulateParams::Merchant }
|
@@ -20,6 +21,7 @@ module Lithic
|
|
20
21
|
required :pan, String
|
21
22
|
|
22
23
|
# @!attribute transaction
|
24
|
+
# Transaction details for the simulation
|
23
25
|
#
|
24
26
|
# @return [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Transaction]
|
25
27
|
required :transaction, -> { Lithic::ThreeDS::AuthenticationSimulateParams::Transaction }
|
@@ -38,11 +40,11 @@ module Lithic
|
|
38
40
|
# Some parameter documentations has been truncated, see
|
39
41
|
# {Lithic::Models::ThreeDS::AuthenticationSimulateParams} for more details.
|
40
42
|
#
|
41
|
-
# @param merchant [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Merchant]
|
43
|
+
# @param merchant [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Merchant] Merchant information for the simulated transaction
|
42
44
|
#
|
43
45
|
# @param pan [String] Sixteen digit card number.
|
44
46
|
#
|
45
|
-
# @param transaction [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Transaction]
|
47
|
+
# @param transaction [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Transaction] Transaction details for the simulation
|
46
48
|
#
|
47
49
|
# @param card_expiry_check [Symbol, Lithic::Models::ThreeDS::AuthenticationSimulateParams::CardExpiryCheck] When set will use the following values as part of the Simulated Authentication.
|
48
50
|
#
|
@@ -83,6 +85,8 @@ module Lithic
|
|
83
85
|
# {Lithic::Models::ThreeDS::AuthenticationSimulateParams::Merchant} for more
|
84
86
|
# details.
|
85
87
|
#
|
88
|
+
# Merchant information for the simulated transaction
|
89
|
+
#
|
86
90
|
# @param id [String] Unique identifier to identify the payment card acceptor. Corresponds to `merchan
|
87
91
|
#
|
88
92
|
# @param country [String] Country of the address provided by the cardholder in ISO 3166-1 alpha-3 format (
|
@@ -106,6 +110,8 @@ module Lithic
|
|
106
110
|
required :currency, String
|
107
111
|
|
108
112
|
# @!method initialize(amount:, currency:)
|
113
|
+
# Transaction details for the simulation
|
114
|
+
#
|
109
115
|
# @param amount [Integer] Amount (in cents) to authenticate.
|
110
116
|
#
|
111
117
|
# @param currency [String] 3-character alphabetic ISO 4217 currency code.
|
@@ -6,17 +6,13 @@ module Lithic
|
|
6
6
|
# @see Lithic::Resources::ThreeDS::Authentication#simulate
|
7
7
|
class AuthenticationSimulateResponse < Lithic::Internal::Type::BaseModel
|
8
8
|
# @!attribute token
|
9
|
-
#
|
10
|
-
# the authorization.
|
9
|
+
# Globally unique identifier for the 3DS authentication.
|
11
10
|
#
|
12
11
|
# @return [String, nil]
|
13
12
|
optional :token, String
|
14
13
|
|
15
14
|
# @!method initialize(token: nil)
|
16
|
-
#
|
17
|
-
# {Lithic::Models::ThreeDS::AuthenticationSimulateResponse} for more details.
|
18
|
-
#
|
19
|
-
# @param token [String] A unique token to reference this transaction with later calls to void or clear t
|
15
|
+
# @param token [String] Globally unique identifier for the 3DS authentication.
|
20
16
|
end
|
21
17
|
end
|
22
18
|
end
|
@@ -5,16 +5,14 @@ module Lithic
|
|
5
5
|
module ThreeDS
|
6
6
|
class ChallengeResponse < Lithic::Internal::Type::BaseModel
|
7
7
|
# @!attribute token
|
8
|
-
# Globally unique identifier for
|
9
|
-
#
|
10
|
-
# Event in the [ThreeDSAuthentication](#/components/schemas/ThreeDSAuthentication)
|
11
|
-
# object
|
8
|
+
# Globally unique identifier for 3DS Authentication that resulted in
|
9
|
+
# PENDING_CHALLENGE authentication result.
|
12
10
|
#
|
13
11
|
# @return [String]
|
14
12
|
required :token, String
|
15
13
|
|
16
14
|
# @!attribute challenge_response
|
17
|
-
# Whether the Cardholder has
|
15
|
+
# Whether the Cardholder has approved or declined the issued Challenge
|
18
16
|
#
|
19
17
|
# @return [Symbol, Lithic::Models::ThreeDS::ChallengeResult]
|
20
18
|
required :challenge_response, enum: -> { Lithic::ThreeDS::ChallengeResult }
|
@@ -23,9 +21,11 @@ module Lithic
|
|
23
21
|
# Some parameter documentations has been truncated, see
|
24
22
|
# {Lithic::Models::ThreeDS::ChallengeResponse} for more details.
|
25
23
|
#
|
26
|
-
#
|
24
|
+
# Response from Card Program to a 3DS Authentication challenge
|
27
25
|
#
|
28
|
-
# @param
|
26
|
+
# @param token [String] Globally unique identifier for 3DS Authentication that resulted in PENDING_CHALL
|
27
|
+
#
|
28
|
+
# @param challenge_response [Symbol, Lithic::Models::ThreeDS::ChallengeResult] Whether the Cardholder has approved or declined the issued Challenge
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
@@ -228,6 +228,7 @@ module Lithic
|
|
228
228
|
CASH_BACK = :CASH_BACK
|
229
229
|
CASH_BACK_REVERSAL = :CASH_BACK_REVERSAL
|
230
230
|
CLEARING = :CLEARING
|
231
|
+
COLLECTION = :COLLECTION
|
231
232
|
CORRECTION_CREDIT = :CORRECTION_CREDIT
|
232
233
|
CORRECTION_DEBIT = :CORRECTION_DEBIT
|
233
234
|
CREDIT_AUTHORIZATION = :CREDIT_AUTHORIZATION
|
data/lib/lithic/models.rb
CHANGED
@@ -242,6 +242,8 @@ module Lithic
|
|
242
242
|
|
243
243
|
FinancialTransaction = Lithic::Models::FinancialTransaction
|
244
244
|
|
245
|
+
Fraud = Lithic::Models::Fraud
|
246
|
+
|
245
247
|
FundingEventListParams = Lithic::Models::FundingEventListParams
|
246
248
|
|
247
249
|
FundingEventRetrieveDetailsParams = Lithic::Models::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`
|
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
|
#
|
33
34
|
# @overload create(auth_rule_token, end_: nil, start: nil, request_options: {})
|
34
35
|
#
|
@@ -246,10 +246,13 @@ module Lithic
|
|
246
246
|
)
|
247
247
|
end
|
248
248
|
|
249
|
-
#
|
250
|
-
#
|
251
|
-
#
|
252
|
-
#
|
249
|
+
# @deprecated
|
250
|
+
#
|
251
|
+
# This endpoint is deprecated and will be removed in the future. Requests a
|
252
|
+
# performance report of an Auth rule to be asynchronously generated. Reports can
|
253
|
+
# only be run on rules in draft or active mode and will included approved and
|
254
|
+
# declined statistics as well as examples. The generated report will be delivered
|
255
|
+
# asynchronously through a webhook with `event_type` =
|
253
256
|
# `auth_rules.performance_report.created`. See the docs on setting up
|
254
257
|
# [webhook subscriptions](https://docs.lithic.com/docs/events-api).
|
255
258
|
#
|
@@ -315,6 +318,44 @@ module Lithic
|
|
315
318
|
)
|
316
319
|
end
|
317
320
|
|
321
|
+
# Retrieves a performance report for an Auth rule containing daily statistics and
|
322
|
+
# evaluation outcomes.
|
323
|
+
#
|
324
|
+
# **Time Range Limitations:**
|
325
|
+
#
|
326
|
+
# - Reports are supported for the past 3 months only
|
327
|
+
# - Maximum interval length is 1 month
|
328
|
+
# - Report data is available only through the previous day in UTC (current day
|
329
|
+
# data is not available)
|
330
|
+
#
|
331
|
+
# The report provides daily statistics for both current and draft versions of the
|
332
|
+
# Auth rule, including approval, decline, and challenge counts along with sample
|
333
|
+
# events.
|
334
|
+
#
|
335
|
+
# @overload retrieve_report(auth_rule_token, begin_:, end_:, request_options: {})
|
336
|
+
#
|
337
|
+
# @param auth_rule_token [String] Globally unique identifier for the Auth Rule.
|
338
|
+
#
|
339
|
+
# @param begin_ [Date] Start date for the report
|
340
|
+
#
|
341
|
+
# @param end_ [Date] End date for the report
|
342
|
+
#
|
343
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
344
|
+
#
|
345
|
+
# @return [Lithic::Models::AuthRules::V2RetrieveReportResponse]
|
346
|
+
#
|
347
|
+
# @see Lithic::Models::AuthRules::V2RetrieveReportParams
|
348
|
+
def retrieve_report(auth_rule_token, params)
|
349
|
+
parsed, options = Lithic::AuthRules::V2RetrieveReportParams.dump_request(params)
|
350
|
+
@client.request(
|
351
|
+
method: :get,
|
352
|
+
path: ["v2/auth_rules/%1$s/report", auth_rule_token],
|
353
|
+
query: parsed.transform_keys(begin_: "begin", end_: "end"),
|
354
|
+
model: Lithic::Models::AuthRules::V2RetrieveReportResponse,
|
355
|
+
options: options
|
356
|
+
)
|
357
|
+
end
|
358
|
+
|
318
359
|
# @api private
|
319
360
|
#
|
320
361
|
# @param client [Lithic::Client]
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
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
|
+
#
|
10
|
+
# @overload retrieve(transaction_token, request_options: {})
|
11
|
+
#
|
12
|
+
# @param transaction_token [String] The token of the transaction that the enhanced data is associated with.
|
13
|
+
#
|
14
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
15
|
+
#
|
16
|
+
# @return [Lithic::Models::Fraud::TransactionRetrieveResponse]
|
17
|
+
#
|
18
|
+
# @see Lithic::Models::Fraud::TransactionRetrieveParams
|
19
|
+
def retrieve(transaction_token, params = {})
|
20
|
+
@client.request(
|
21
|
+
method: :get,
|
22
|
+
path: ["v1/fraud/transactions/%1$s", transaction_token],
|
23
|
+
model: Lithic::Models::Fraud::TransactionRetrieveResponse,
|
24
|
+
options: params[:request_options]
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Some parameter documentations has been truncated, see
|
29
|
+
# {Lithic::Models::Fraud::TransactionReportParams} for more details.
|
30
|
+
#
|
31
|
+
# Report fraud for a specific transaction token by providing details such as fraud
|
32
|
+
# type, fraud status, and any additional comments.
|
33
|
+
#
|
34
|
+
# @overload report(transaction_token, fraud_status:, comment: nil, fraud_type: nil, request_options: {})
|
35
|
+
#
|
36
|
+
# @param transaction_token [String] The token of the transaction that the enhanced data is associated with.
|
37
|
+
#
|
38
|
+
# @param fraud_status [Symbol, Lithic::Models::Fraud::TransactionReportParams::FraudStatus] The fraud status of the transaction, string (enum) supporting the following valu
|
39
|
+
#
|
40
|
+
# @param comment [String] Optional field providing additional information or context about why the transac
|
41
|
+
#
|
42
|
+
# @param fraud_type [Symbol, Lithic::Models::Fraud::TransactionReportParams::FraudType] Specifies the type or category of fraud that the transaction is suspected or con
|
43
|
+
#
|
44
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
45
|
+
#
|
46
|
+
# @return [Lithic::Models::Fraud::TransactionReportResponse]
|
47
|
+
#
|
48
|
+
# @see Lithic::Models::Fraud::TransactionReportParams
|
49
|
+
def report(transaction_token, params)
|
50
|
+
parsed, options = Lithic::Fraud::TransactionReportParams.dump_request(params)
|
51
|
+
@client.request(
|
52
|
+
method: :post,
|
53
|
+
path: ["v1/fraud/transactions/%1$s", transaction_token],
|
54
|
+
body: parsed,
|
55
|
+
model: Lithic::Models::Fraud::TransactionReportResponse,
|
56
|
+
options: options
|
57
|
+
)
|
58
|
+
end
|
59
|
+
|
60
|
+
# @api private
|
61
|
+
#
|
62
|
+
# @param client [Lithic::Client]
|
63
|
+
def initialize(client:)
|
64
|
+
@client = client
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Lithic
|
4
|
+
module Resources
|
5
|
+
class Fraud
|
6
|
+
# @return [Lithic::Resources::Fraud::Transactions]
|
7
|
+
attr_reader :transactions
|
8
|
+
|
9
|
+
# @api private
|
10
|
+
#
|
11
|
+
# @param client [Lithic::Client]
|
12
|
+
def initialize(client:)
|
13
|
+
@client = client
|
14
|
+
@transactions = Lithic::Resources::Fraud::Transactions.new(client: client)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -8,7 +8,7 @@ module Lithic
|
|
8
8
|
#
|
9
9
|
# @overload retrieve(three_ds_authentication_token, request_options: {})
|
10
10
|
#
|
11
|
-
# @param three_ds_authentication_token [String] 3DS
|
11
|
+
# @param three_ds_authentication_token [String] Globally unique identifier for the 3DS authentication.
|
12
12
|
#
|
13
13
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
14
14
|
#
|
@@ -36,11 +36,11 @@ module Lithic
|
|
36
36
|
#
|
37
37
|
# @overload simulate(merchant:, pan:, transaction:, card_expiry_check: nil, request_options: {})
|
38
38
|
#
|
39
|
-
# @param merchant [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Merchant]
|
39
|
+
# @param merchant [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Merchant] Merchant information for the simulated transaction
|
40
40
|
#
|
41
41
|
# @param pan [String] Sixteen digit card number.
|
42
42
|
#
|
43
|
-
# @param transaction [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Transaction]
|
43
|
+
# @param transaction [Lithic::Models::ThreeDS::AuthenticationSimulateParams::Transaction] Transaction details for the simulation
|
44
44
|
#
|
45
45
|
# @param card_expiry_check [Symbol, Lithic::Models::ThreeDS::AuthenticationSimulateParams::CardExpiryCheck] When set will use the following values as part of the Simulated Authentication.
|
46
46
|
#
|
@@ -65,9 +65,9 @@ module Lithic
|
|
65
65
|
# details.
|
66
66
|
#
|
67
67
|
# Endpoint for simulating entering OTP into 3DS Challenge UI. A call to
|
68
|
-
# /v1/three_ds_authentication/simulate
|
69
|
-
# challenge must precede. Only a single attempt
|
70
|
-
# the challenge is either approved or declined.
|
68
|
+
# [/v1/three_ds_authentication/simulate](https://docs.lithic.com/reference/postsimulateauthentication)
|
69
|
+
# that resulted in triggered SMS-OTP challenge must precede. Only a single attempt
|
70
|
+
# is supported; upon entering OTP, the challenge is either approved or declined.
|
71
71
|
#
|
72
72
|
# @overload simulate_otp_entry(token:, otp:, request_options: {})
|
73
73
|
#
|
@@ -7,13 +7,18 @@ module Lithic
|
|
7
7
|
# Some parameter documentations has been truncated, see
|
8
8
|
# {Lithic::Models::ThreeDS::DecisioningChallengeResponseParams} for more details.
|
9
9
|
#
|
10
|
-
# Card program's response to a 3DS Challenge Request
|
10
|
+
# Card program's response to a 3DS Challenge Request. Challenge Request is emitted
|
11
|
+
# as a webhook
|
12
|
+
# [three_ds_authentication.challenge](https://docs.lithic.com/reference/post_three-ds-authentication-challenge)
|
13
|
+
# and your Card Program needs to be configured with Out of Band (OOB) Challenges
|
14
|
+
# in order to receive it (see https://docs.lithic.com/docs/3ds-challenge-flow for
|
15
|
+
# more information).
|
11
16
|
#
|
12
17
|
# @overload challenge_response(token:, challenge_response:, request_options: {})
|
13
18
|
#
|
14
|
-
# @param token [String] Globally unique identifier for
|
19
|
+
# @param token [String] Globally unique identifier for 3DS Authentication that resulted in PENDING_CHALL
|
15
20
|
#
|
16
|
-
# @param challenge_response [Symbol, Lithic::Models::ThreeDS::ChallengeResult] Whether the Cardholder has
|
21
|
+
# @param challenge_response [Symbol, Lithic::Models::ThreeDS::ChallengeResult] Whether the Cardholder has approved or declined the issued Challenge
|
17
22
|
#
|
18
23
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
19
24
|
#
|
data/lib/lithic/version.rb
CHANGED
data/lib/lithic.rb
CHANGED
@@ -85,6 +85,7 @@ require_relative "lithic/models/auth_rules/auth_rule"
|
|
85
85
|
require_relative "lithic/models/auth_rules/auth_rule_condition"
|
86
86
|
require_relative "lithic/models/auth_rules/conditional_attribute"
|
87
87
|
require_relative "lithic/models/auth_rules/conditional_block_parameters"
|
88
|
+
require_relative "lithic/models/auth_rules/rule_stats"
|
88
89
|
require_relative "lithic/models/auth_rules/v2/backtest_create_params"
|
89
90
|
require_relative "lithic/models/auth_rules/v2/backtest_create_response"
|
90
91
|
require_relative "lithic/models/auth_rules/v2/backtest_results"
|
@@ -103,6 +104,8 @@ require_relative "lithic/models/auth_rules/v2_promote_response"
|
|
103
104
|
require_relative "lithic/models/auth_rules/v2_report_params"
|
104
105
|
require_relative "lithic/models/auth_rules/v2_report_response"
|
105
106
|
require_relative "lithic/models/auth_rules/v2_retrieve_params"
|
107
|
+
require_relative "lithic/models/auth_rules/v2_retrieve_report_params"
|
108
|
+
require_relative "lithic/models/auth_rules/v2_retrieve_report_response"
|
106
109
|
require_relative "lithic/models/auth_rules/v2_retrieve_response"
|
107
110
|
require_relative "lithic/models/auth_rules/v2_update_params"
|
108
111
|
require_relative "lithic/models/auth_rules/v2_update_response"
|
@@ -232,6 +235,10 @@ require_relative "lithic/models/financial_accounts/statements/statement_line_ite
|
|
232
235
|
require_relative "lithic/models/financial_account_update_params"
|
233
236
|
require_relative "lithic/models/financial_account_update_status_params"
|
234
237
|
require_relative "lithic/models/financial_transaction"
|
238
|
+
require_relative "lithic/models/fraud/transaction_report_params"
|
239
|
+
require_relative "lithic/models/fraud/transaction_report_response"
|
240
|
+
require_relative "lithic/models/fraud/transaction_retrieve_params"
|
241
|
+
require_relative "lithic/models/fraud/transaction_retrieve_response"
|
235
242
|
require_relative "lithic/models/funding_event_list_params"
|
236
243
|
require_relative "lithic/models/funding_event_list_response"
|
237
244
|
require_relative "lithic/models/funding_event_retrieve_details_params"
|
@@ -366,6 +373,8 @@ require_relative "lithic/resources/financial_accounts/financial_transactions"
|
|
366
373
|
require_relative "lithic/resources/financial_accounts/loan_tapes"
|
367
374
|
require_relative "lithic/resources/financial_accounts/statements"
|
368
375
|
require_relative "lithic/resources/financial_accounts/statements/line_items"
|
376
|
+
require_relative "lithic/resources/fraud"
|
377
|
+
require_relative "lithic/resources/fraud/transactions"
|
369
378
|
require_relative "lithic/resources/funding_events"
|
370
379
|
require_relative "lithic/resources/management_operations"
|
371
380
|
require_relative "lithic/resources/payments"
|
data/rbi/lithic/client.rbi
CHANGED
@@ -100,6 +100,9 @@ module Lithic
|
|
100
100
|
sig { returns(Lithic::Resources::FundingEvents) }
|
101
101
|
attr_reader :funding_events
|
102
102
|
|
103
|
+
sig { returns(Lithic::Resources::Fraud) }
|
104
|
+
attr_reader :fraud
|
105
|
+
|
103
106
|
# Status of api
|
104
107
|
sig do
|
105
108
|
params(request_options: Lithic::RequestOptions::OrHash).returns(
|
@@ -0,0 +1,229 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Lithic
|
4
|
+
module Models
|
5
|
+
module AuthRules
|
6
|
+
class RuleStats < Lithic::Internal::Type::BaseModel
|
7
|
+
OrHash =
|
8
|
+
T.type_alias do
|
9
|
+
T.any(Lithic::AuthRules::RuleStats, Lithic::Internal::AnyHash)
|
10
|
+
end
|
11
|
+
|
12
|
+
# The total number of historical transactions approved by this rule during the
|
13
|
+
# relevant period, or the number of transactions that would have been approved if
|
14
|
+
# the rule was evaluated in shadow mode.
|
15
|
+
sig { returns(T.nilable(Integer)) }
|
16
|
+
attr_reader :approved
|
17
|
+
|
18
|
+
sig { params(approved: Integer).void }
|
19
|
+
attr_writer :approved
|
20
|
+
|
21
|
+
# The total number of historical transactions challenged by this rule during the
|
22
|
+
# relevant period, or the number of transactions that would have been challenged
|
23
|
+
# if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
|
24
|
+
# Rules.
|
25
|
+
sig { returns(T.nilable(Integer)) }
|
26
|
+
attr_reader :challenged
|
27
|
+
|
28
|
+
sig { params(challenged: Integer).void }
|
29
|
+
attr_writer :challenged
|
30
|
+
|
31
|
+
# The total number of historical transactions declined by this rule during the
|
32
|
+
# relevant period, or the number of transactions that would have been declined if
|
33
|
+
# the rule was evaluated in shadow mode.
|
34
|
+
sig { returns(T.nilable(Integer)) }
|
35
|
+
attr_reader :declined
|
36
|
+
|
37
|
+
sig { params(declined: Integer).void }
|
38
|
+
attr_writer :declined
|
39
|
+
|
40
|
+
# Example events and their outcomes.
|
41
|
+
sig do
|
42
|
+
returns(T.nilable(T::Array[Lithic::AuthRules::RuleStats::Example]))
|
43
|
+
end
|
44
|
+
attr_reader :examples
|
45
|
+
|
46
|
+
sig do
|
47
|
+
params(
|
48
|
+
examples: T::Array[Lithic::AuthRules::RuleStats::Example::OrHash]
|
49
|
+
).void
|
50
|
+
end
|
51
|
+
attr_writer :examples
|
52
|
+
|
53
|
+
# The version of the rule, this is incremented whenever the rule's parameters
|
54
|
+
# change.
|
55
|
+
sig { returns(T.nilable(Integer)) }
|
56
|
+
attr_reader :version
|
57
|
+
|
58
|
+
sig { params(version: Integer).void }
|
59
|
+
attr_writer :version
|
60
|
+
|
61
|
+
sig do
|
62
|
+
params(
|
63
|
+
approved: Integer,
|
64
|
+
challenged: Integer,
|
65
|
+
declined: Integer,
|
66
|
+
examples: T::Array[Lithic::AuthRules::RuleStats::Example::OrHash],
|
67
|
+
version: Integer
|
68
|
+
).returns(T.attached_class)
|
69
|
+
end
|
70
|
+
def self.new(
|
71
|
+
# The total number of historical transactions approved by this rule during the
|
72
|
+
# relevant period, or the number of transactions that would have been approved if
|
73
|
+
# the rule was evaluated in shadow mode.
|
74
|
+
approved: nil,
|
75
|
+
# The total number of historical transactions challenged by this rule during the
|
76
|
+
# relevant period, or the number of transactions that would have been challenged
|
77
|
+
# if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
|
78
|
+
# Rules.
|
79
|
+
challenged: nil,
|
80
|
+
# The total number of historical transactions declined by this rule during the
|
81
|
+
# relevant period, or the number of transactions that would have been declined if
|
82
|
+
# the rule was evaluated in shadow mode.
|
83
|
+
declined: nil,
|
84
|
+
# Example events and their outcomes.
|
85
|
+
examples: nil,
|
86
|
+
# The version of the rule, this is incremented whenever the rule's parameters
|
87
|
+
# change.
|
88
|
+
version: nil
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
sig do
|
93
|
+
override.returns(
|
94
|
+
{
|
95
|
+
approved: Integer,
|
96
|
+
challenged: Integer,
|
97
|
+
declined: Integer,
|
98
|
+
examples: T::Array[Lithic::AuthRules::RuleStats::Example],
|
99
|
+
version: Integer
|
100
|
+
}
|
101
|
+
)
|
102
|
+
end
|
103
|
+
def to_hash
|
104
|
+
end
|
105
|
+
|
106
|
+
class Example < Lithic::Internal::Type::BaseModel
|
107
|
+
OrHash =
|
108
|
+
T.type_alias do
|
109
|
+
T.any(
|
110
|
+
Lithic::AuthRules::RuleStats::Example,
|
111
|
+
Lithic::Internal::AnyHash
|
112
|
+
)
|
113
|
+
end
|
114
|
+
|
115
|
+
# Whether the rule would have approved the request.
|
116
|
+
sig { returns(T.nilable(T::Boolean)) }
|
117
|
+
attr_reader :approved
|
118
|
+
|
119
|
+
sig { params(approved: T::Boolean).void }
|
120
|
+
attr_writer :approved
|
121
|
+
|
122
|
+
# The decision made by the rule for this event.
|
123
|
+
sig do
|
124
|
+
returns(
|
125
|
+
T.nilable(
|
126
|
+
Lithic::AuthRules::RuleStats::Example::Decision::TaggedSymbol
|
127
|
+
)
|
128
|
+
)
|
129
|
+
end
|
130
|
+
attr_reader :decision
|
131
|
+
|
132
|
+
sig do
|
133
|
+
params(
|
134
|
+
decision:
|
135
|
+
Lithic::AuthRules::RuleStats::Example::Decision::OrSymbol
|
136
|
+
).void
|
137
|
+
end
|
138
|
+
attr_writer :decision
|
139
|
+
|
140
|
+
# The event token.
|
141
|
+
sig { returns(T.nilable(String)) }
|
142
|
+
attr_reader :event_token
|
143
|
+
|
144
|
+
sig { params(event_token: String).void }
|
145
|
+
attr_writer :event_token
|
146
|
+
|
147
|
+
# The timestamp of the event.
|
148
|
+
sig { returns(T.nilable(Time)) }
|
149
|
+
attr_reader :timestamp
|
150
|
+
|
151
|
+
sig { params(timestamp: Time).void }
|
152
|
+
attr_writer :timestamp
|
153
|
+
|
154
|
+
sig do
|
155
|
+
params(
|
156
|
+
approved: T::Boolean,
|
157
|
+
decision:
|
158
|
+
Lithic::AuthRules::RuleStats::Example::Decision::OrSymbol,
|
159
|
+
event_token: String,
|
160
|
+
timestamp: Time
|
161
|
+
).returns(T.attached_class)
|
162
|
+
end
|
163
|
+
def self.new(
|
164
|
+
# Whether the rule would have approved the request.
|
165
|
+
approved: nil,
|
166
|
+
# The decision made by the rule for this event.
|
167
|
+
decision: nil,
|
168
|
+
# The event token.
|
169
|
+
event_token: nil,
|
170
|
+
# The timestamp of the event.
|
171
|
+
timestamp: nil
|
172
|
+
)
|
173
|
+
end
|
174
|
+
|
175
|
+
sig do
|
176
|
+
override.returns(
|
177
|
+
{
|
178
|
+
approved: T::Boolean,
|
179
|
+
decision:
|
180
|
+
Lithic::AuthRules::RuleStats::Example::Decision::TaggedSymbol,
|
181
|
+
event_token: String,
|
182
|
+
timestamp: Time
|
183
|
+
}
|
184
|
+
)
|
185
|
+
end
|
186
|
+
def to_hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# The decision made by the rule for this event.
|
190
|
+
module Decision
|
191
|
+
extend Lithic::Internal::Type::Enum
|
192
|
+
|
193
|
+
TaggedSymbol =
|
194
|
+
T.type_alias do
|
195
|
+
T.all(Symbol, Lithic::AuthRules::RuleStats::Example::Decision)
|
196
|
+
end
|
197
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
198
|
+
|
199
|
+
APPROVED =
|
200
|
+
T.let(
|
201
|
+
:APPROVED,
|
202
|
+
Lithic::AuthRules::RuleStats::Example::Decision::TaggedSymbol
|
203
|
+
)
|
204
|
+
DECLINED =
|
205
|
+
T.let(
|
206
|
+
:DECLINED,
|
207
|
+
Lithic::AuthRules::RuleStats::Example::Decision::TaggedSymbol
|
208
|
+
)
|
209
|
+
CHALLENGED =
|
210
|
+
T.let(
|
211
|
+
:CHALLENGED,
|
212
|
+
Lithic::AuthRules::RuleStats::Example::Decision::TaggedSymbol
|
213
|
+
)
|
214
|
+
|
215
|
+
sig do
|
216
|
+
override.returns(
|
217
|
+
T::Array[
|
218
|
+
Lithic::AuthRules::RuleStats::Example::Decision::TaggedSymbol
|
219
|
+
]
|
220
|
+
)
|
221
|
+
end
|
222
|
+
def self.values
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|