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
@@ -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
|