lithic 0.1.0.pre.alpha.32 → 0.1.0.pre.alpha.34
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/errors.rb +22 -0
- data/lib/lithic/internal/type/array_of.rb +6 -1
- data/lib/lithic/internal/type/base_model.rb +77 -25
- data/lib/lithic/internal/type/boolean.rb +7 -1
- data/lib/lithic/internal/type/converter.rb +42 -34
- data/lib/lithic/internal/type/enum.rb +10 -2
- data/lib/lithic/internal/type/file_input.rb +6 -1
- data/lib/lithic/internal/type/hash_of.rb +6 -1
- data/lib/lithic/internal/type/union.rb +12 -7
- data/lib/lithic/internal/type/unknown.rb +7 -1
- 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/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/errors.rbi +16 -0
- data/rbi/lithic/internal/type/boolean.rbi +2 -0
- data/rbi/lithic/internal/type/converter.rbi +15 -15
- data/rbi/lithic/internal/type/union.rbi +5 -0
- data/rbi/lithic/internal/type/unknown.rbi +2 -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/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/errors.rbs +9 -0
- data/sig/lithic/internal/type/converter.rbs +7 -1
- 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/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(
|
data/rbi/lithic/errors.rbi
CHANGED
@@ -8,6 +8,22 @@ module Lithic
|
|
8
8
|
end
|
9
9
|
|
10
10
|
class ConversionError < Lithic::Errors::Error
|
11
|
+
sig { returns(T.nilable(StandardError)) }
|
12
|
+
def cause
|
13
|
+
end
|
14
|
+
|
15
|
+
# @api private
|
16
|
+
sig do
|
17
|
+
params(
|
18
|
+
on: T::Class[StandardError],
|
19
|
+
method: Symbol,
|
20
|
+
target: T.anything,
|
21
|
+
value: T.anything,
|
22
|
+
cause: T.nilable(StandardError)
|
23
|
+
).returns(T.attached_class)
|
24
|
+
end
|
25
|
+
def self.new(on:, method:, target:, value:, cause: nil)
|
26
|
+
end
|
11
27
|
end
|
12
28
|
|
13
29
|
class APIError < Lithic::Errors::Error
|
@@ -15,12 +15,14 @@ module Lithic
|
|
15
15
|
CoerceState =
|
16
16
|
T.type_alias do
|
17
17
|
{
|
18
|
-
|
18
|
+
translate_names: T::Boolean,
|
19
|
+
strictness: T::Boolean,
|
19
20
|
exactness: {
|
20
21
|
yes: Integer,
|
21
22
|
no: Integer,
|
22
23
|
maybe: Integer
|
23
24
|
},
|
25
|
+
error: T::Class[StandardError],
|
24
26
|
branched: Integer
|
25
27
|
}
|
26
28
|
end
|
@@ -84,6 +86,15 @@ module Lithic
|
|
84
86
|
def self.type_info(spec)
|
85
87
|
end
|
86
88
|
|
89
|
+
# @api private
|
90
|
+
sig do
|
91
|
+
params(translate_names: T::Boolean).returns(
|
92
|
+
Lithic::Internal::Type::Converter::CoerceState
|
93
|
+
)
|
94
|
+
end
|
95
|
+
def self.new_coerce_state(translate_names: true)
|
96
|
+
end
|
97
|
+
|
87
98
|
# @api private
|
88
99
|
#
|
89
100
|
# Based on `target`, transform `value` into `target`, to the extent possible:
|
@@ -105,14 +116,11 @@ module Lithic
|
|
105
116
|
def self.coerce(
|
106
117
|
target,
|
107
118
|
value,
|
108
|
-
# The `strictness` is one of `true`, `false
|
109
|
-
#
|
110
|
-
# targets:
|
119
|
+
# The `strictness` is one of `true`, `false`. This informs the coercion strategy
|
120
|
+
# when we have to decide between multiple possible conversion targets:
|
111
121
|
#
|
112
122
|
# - `true`: the conversion must be exact, with minimum coercion.
|
113
123
|
# - `false`: the conversion can be approximate, with some coercion.
|
114
|
-
# - `:strong`: the conversion must be exact, with no coercion, and raise an error
|
115
|
-
# if not possible.
|
116
124
|
#
|
117
125
|
# The `exactness` is `Hash` with keys being one of `yes`, `no`, or `maybe`. For
|
118
126
|
# any given conversion attempt, the exactness will be updated based on how closely
|
@@ -124,15 +132,7 @@ module Lithic
|
|
124
132
|
# - `no`: the value cannot be converted to the target type.
|
125
133
|
#
|
126
134
|
# See implementation below for more details.
|
127
|
-
state:
|
128
|
-
strictness: true,
|
129
|
-
exactness: {
|
130
|
-
yes: 0,
|
131
|
-
no: 0,
|
132
|
-
maybe: 0
|
133
|
-
},
|
134
|
-
branched: 0
|
135
|
-
}
|
135
|
+
state: Lithic::Internal::Type::Converter.new_coerce_state
|
136
136
|
)
|
137
137
|
end
|
138
138
|
|
@@ -78,6 +78,11 @@ module Lithic
|
|
78
78
|
end
|
79
79
|
|
80
80
|
# @api private
|
81
|
+
#
|
82
|
+
# Tries to efficiently coerce the given value to one of the known variants.
|
83
|
+
#
|
84
|
+
# If the value cannot match any of the known variants, the coercion is considered
|
85
|
+
# non-viable and returns the original value.
|
81
86
|
sig do
|
82
87
|
override
|
83
88
|
.params(
|