lithic 0.1.0.pre.alpha.31 → 0.1.0.pre.alpha.33
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 +23 -0
- data/README.md +1 -1
- 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/account.rb +10 -10
- data/lib/lithic/models/account_update_params.rb +1 -0
- data/lib/lithic/models/auth_rules/velocity_limit_params.rb +1 -0
- data/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb +3 -0
- data/lib/lithic/models/financial_account.rb +1 -0
- data/lib/lithic/models/financial_account_register_account_number_params.rb +20 -0
- data/lib/lithic/models/instance_financial_account_type.rb +1 -0
- data/lib/lithic/models/settlement_detail.rb +4 -2
- data/lib/lithic/models/transaction.rb +1 -0
- data/lib/lithic/models/verification_method.rb +1 -0
- data/lib/lithic/models.rb +2 -0
- data/lib/lithic/resources/financial_accounts.rb +24 -0
- data/lib/lithic/resources/three_ds/authentication.rb +3 -1
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +1 -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/account.rbi +15 -15
- data/rbi/lithic/models/account_update_params.rbi +2 -0
- data/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi +7 -0
- data/rbi/lithic/models/financial_account.rbi +2 -0
- data/rbi/lithic/models/financial_account_register_account_number_params.rbi +38 -0
- data/rbi/lithic/models/instance_financial_account_type.rbi +2 -0
- data/rbi/lithic/models/settlement_detail.rbi +6 -2
- data/rbi/lithic/models/transaction.rbi +5 -0
- data/rbi/lithic/models/verification_method.rbi +1 -0
- data/rbi/lithic/models.rbi +3 -0
- data/rbi/lithic/resources/financial_accounts.rbi +16 -0
- data/rbi/lithic/resources/three_ds/authentication.rbi +3 -1
- data/sig/lithic/errors.rbs +9 -0
- data/sig/lithic/internal/type/converter.rbs +7 -1
- data/sig/lithic/models/account_update_params.rbs +2 -1
- data/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs +2 -1
- data/sig/lithic/models/financial_account.rbs +2 -0
- data/sig/lithic/models/financial_account_register_account_number_params.rbs +23 -0
- data/sig/lithic/models/instance_financial_account_type.rbs +2 -0
- data/sig/lithic/models/transaction.rbs +3 -1
- data/sig/lithic/models/verification_method.rbs +7 -1
- data/sig/lithic/models.rbs +2 -0
- data/sig/lithic/resources/financial_accounts.rbs +6 -0
- metadata +5 -2
@@ -113,6 +113,7 @@ module Lithic
|
|
113
113
|
# * `DAY`: Velocity over the current day since midnight Eastern Time.
|
114
114
|
# * `WEEK`: Velocity over the current week since 00:00 / 12 AM on Monday in Eastern Time.
|
115
115
|
# * `MONTH`: Velocity over the current month since 00:00 / 12 AM on the first of the month in Eastern Time.
|
116
|
+
# * `YEAR`: Velocity over the current year since 00:00 / 12 AM on January 1st in Eastern Time.
|
116
117
|
variant enum: -> { Lithic::AuthRules::VelocityLimitParamsPeriodWindow }
|
117
118
|
|
118
119
|
# @!method self.variants
|
@@ -10,12 +10,15 @@ module Lithic
|
|
10
10
|
# Eastern Time.
|
11
11
|
# - `MONTH`: Velocity over the current month since 00:00 / 12 AM on the first of
|
12
12
|
# the month in Eastern Time.
|
13
|
+
# - `YEAR`: Velocity over the current year since 00:00 / 12 AM on January 1st in
|
14
|
+
# Eastern Time.
|
13
15
|
module VelocityLimitParamsPeriodWindow
|
14
16
|
extend Lithic::Internal::Type::Enum
|
15
17
|
|
16
18
|
DAY = :DAY
|
17
19
|
WEEK = :WEEK
|
18
20
|
MONTH = :MONTH
|
21
|
+
YEAR = :YEAR
|
19
22
|
|
20
23
|
# @!method self.values
|
21
24
|
# @return [Array<Symbol>]
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Lithic
|
4
|
+
module Models
|
5
|
+
# @see Lithic::Resources::FinancialAccounts#register_account_number
|
6
|
+
class FinancialAccountRegisterAccountNumberParams < Lithic::Internal::Type::BaseModel
|
7
|
+
extend Lithic::Internal::Type::RequestParameters::Converter
|
8
|
+
include Lithic::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
# @!attribute account_number
|
11
|
+
#
|
12
|
+
# @return [String]
|
13
|
+
required :account_number, String
|
14
|
+
|
15
|
+
# @!method initialize(account_number:, request_options: {})
|
16
|
+
# @param account_number [String]
|
17
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -98,7 +98,9 @@ module Lithic
|
|
98
98
|
required :report_date, String
|
99
99
|
|
100
100
|
# @!attribute settlement_date
|
101
|
-
# Date of when money movement is triggered for the transaction.
|
101
|
+
# Date of when money movement is triggered for the transaction. One exception
|
102
|
+
# applies - for Mastercard dual message settlement, this is the settlement
|
103
|
+
# advisement date, which is distinct from the date of money movement.
|
102
104
|
#
|
103
105
|
# @return [String]
|
104
106
|
required :settlement_date, String
|
@@ -168,7 +170,7 @@ module Lithic
|
|
168
170
|
#
|
169
171
|
# @param report_date [String] Date of when the report was first generated.
|
170
172
|
#
|
171
|
-
# @param settlement_date [String] Date of when money movement is triggered for the transaction.
|
173
|
+
# @param settlement_date [String] Date of when money movement is triggered for the transaction. One exception appl
|
172
174
|
#
|
173
175
|
# @param transaction_token [String] Globally unique identifier denoting the associated Transaction object.
|
174
176
|
#
|
data/lib/lithic/models.rb
CHANGED
@@ -230,6 +230,8 @@ module Lithic
|
|
230
230
|
|
231
231
|
FinancialAccountListParams = Lithic::Models::FinancialAccountListParams
|
232
232
|
|
233
|
+
FinancialAccountRegisterAccountNumberParams = Lithic::Models::FinancialAccountRegisterAccountNumberParams
|
234
|
+
|
233
235
|
FinancialAccountRetrieveParams = Lithic::Models::FinancialAccountRetrieveParams
|
234
236
|
|
235
237
|
FinancialAccounts = Lithic::Models::FinancialAccounts
|
@@ -119,6 +119,30 @@ module Lithic
|
|
119
119
|
)
|
120
120
|
end
|
121
121
|
|
122
|
+
# Register account number
|
123
|
+
#
|
124
|
+
# @overload register_account_number(financial_account_token, account_number:, request_options: {})
|
125
|
+
#
|
126
|
+
# @param financial_account_token [String] Globally unique identifier for financial account.
|
127
|
+
#
|
128
|
+
# @param account_number [String]
|
129
|
+
#
|
130
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
131
|
+
#
|
132
|
+
# @return [nil]
|
133
|
+
#
|
134
|
+
# @see Lithic::Models::FinancialAccountRegisterAccountNumberParams
|
135
|
+
def register_account_number(financial_account_token, params)
|
136
|
+
parsed, options = Lithic::FinancialAccountRegisterAccountNumberParams.dump_request(params)
|
137
|
+
@client.request(
|
138
|
+
method: :post,
|
139
|
+
path: ["v1/financial_accounts/%1$s/register_account_number", financial_account_token],
|
140
|
+
body: parsed,
|
141
|
+
model: NilClass,
|
142
|
+
options: options
|
143
|
+
)
|
144
|
+
end
|
145
|
+
|
122
146
|
# Update financial account status
|
123
147
|
#
|
124
148
|
# @overload update_status(financial_account_token, status:, substatus:, request_options: {})
|
@@ -30,7 +30,9 @@ module Lithic
|
|
30
30
|
# Simulates a 3DS authentication request from the payment network as if it came
|
31
31
|
# from an ACS. If you're configured for 3DS Customer Decisioning, simulating
|
32
32
|
# authentications requires your customer decisioning endpoint to be set up
|
33
|
-
# properly (respond with a valid JSON).
|
33
|
+
# properly (respond with a valid JSON). If the authentication decision is to
|
34
|
+
# challenge, ensure that the account holder associated with the card transaction
|
35
|
+
# has a valid phone number configured to receive the OTP code via SMS.
|
34
36
|
#
|
35
37
|
# @overload simulate(merchant:, pan:, transaction:, card_expiry_check: nil, request_options: {})
|
36
38
|
#
|
data/lib/lithic/version.rb
CHANGED
data/lib/lithic.rb
CHANGED
@@ -211,6 +211,7 @@ require_relative "lithic/models/external_payment_settle_params"
|
|
211
211
|
require_relative "lithic/models/financial_account"
|
212
212
|
require_relative "lithic/models/financial_account_create_params"
|
213
213
|
require_relative "lithic/models/financial_account_list_params"
|
214
|
+
require_relative "lithic/models/financial_account_register_account_number_params"
|
214
215
|
require_relative "lithic/models/financial_account_retrieve_params"
|
215
216
|
require_relative "lithic/models/financial_accounts/balance_list_params"
|
216
217
|
require_relative "lithic/models/financial_accounts/balance_list_response"
|
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(
|
@@ -33,11 +33,11 @@ module Lithic
|
|
33
33
|
# - `PAUSED` - Account will not be able to transact or create new cards. It can be
|
34
34
|
# set back to `ACTIVE`.
|
35
35
|
# - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED`
|
36
|
-
# accounts are
|
37
|
-
#
|
38
|
-
# risk/compliance reasons. Please contact
|
39
|
-
# [support@lithic.com](mailto:support@lithic.com) if you believe this was
|
40
|
-
#
|
36
|
+
# accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states.
|
37
|
+
# Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to
|
38
|
+
# failure to pass KYB/KYC or for risk/compliance reasons. Please contact
|
39
|
+
# [support@lithic.com](mailto:support@lithic.com) if you believe this was done
|
40
|
+
# by mistake.
|
41
41
|
sig { returns(Lithic::Account::State::TaggedSymbol) }
|
42
42
|
attr_accessor :state
|
43
43
|
|
@@ -107,11 +107,11 @@ module Lithic
|
|
107
107
|
# - `PAUSED` - Account will not be able to transact or create new cards. It can be
|
108
108
|
# set back to `ACTIVE`.
|
109
109
|
# - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED`
|
110
|
-
# accounts are
|
111
|
-
#
|
112
|
-
# risk/compliance reasons. Please contact
|
113
|
-
# [support@lithic.com](mailto:support@lithic.com) if you believe this was
|
114
|
-
#
|
110
|
+
# accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states.
|
111
|
+
# Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to
|
112
|
+
# failure to pass KYB/KYC or for risk/compliance reasons. Please contact
|
113
|
+
# [support@lithic.com](mailto:support@lithic.com) if you believe this was done
|
114
|
+
# by mistake.
|
115
115
|
state:,
|
116
116
|
account_holder: nil,
|
117
117
|
# List of identifiers for the Auth Rule(s) that are applied on the account. This
|
@@ -195,11 +195,11 @@ module Lithic
|
|
195
195
|
# - `PAUSED` - Account will not be able to transact or create new cards. It can be
|
196
196
|
# set back to `ACTIVE`.
|
197
197
|
# - `CLOSED` - Account will not be able to transact or create new cards. `CLOSED`
|
198
|
-
# accounts are
|
199
|
-
#
|
200
|
-
# risk/compliance reasons. Please contact
|
201
|
-
# [support@lithic.com](mailto:support@lithic.com) if you believe this was
|
202
|
-
#
|
198
|
+
# accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states.
|
199
|
+
# Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to
|
200
|
+
# failure to pass KYB/KYC or for risk/compliance reasons. Please contact
|
201
|
+
# [support@lithic.com](mailto:support@lithic.com) if you believe this was done
|
202
|
+
# by mistake.
|
203
203
|
module State
|
204
204
|
extend Lithic::Internal::Type::Enum
|
205
205
|
|
@@ -129,6 +129,8 @@ module Lithic
|
|
129
129
|
T.let(:ACTIVE, Lithic::AccountUpdateParams::State::TaggedSymbol)
|
130
130
|
PAUSED =
|
131
131
|
T.let(:PAUSED, Lithic::AccountUpdateParams::State::TaggedSymbol)
|
132
|
+
CLOSED =
|
133
|
+
T.let(:CLOSED, Lithic::AccountUpdateParams::State::TaggedSymbol)
|
132
134
|
|
133
135
|
sig do
|
134
136
|
override.returns(
|
@@ -10,6 +10,8 @@ module Lithic
|
|
10
10
|
# Eastern Time.
|
11
11
|
# - `MONTH`: Velocity over the current month since 00:00 / 12 AM on the first of
|
12
12
|
# the month in Eastern Time.
|
13
|
+
# - `YEAR`: Velocity over the current year since 00:00 / 12 AM on January 1st in
|
14
|
+
# Eastern Time.
|
13
15
|
module VelocityLimitParamsPeriodWindow
|
14
16
|
extend Lithic::Internal::Type::Enum
|
15
17
|
|
@@ -34,6 +36,11 @@ module Lithic
|
|
34
36
|
:MONTH,
|
35
37
|
Lithic::AuthRules::VelocityLimitParamsPeriodWindow::TaggedSymbol
|
36
38
|
)
|
39
|
+
YEAR =
|
40
|
+
T.let(
|
41
|
+
:YEAR,
|
42
|
+
Lithic::AuthRules::VelocityLimitParamsPeriodWindow::TaggedSymbol
|
43
|
+
)
|
37
44
|
|
38
45
|
sig do
|
39
46
|
override.returns(
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Lithic
|
4
|
+
module Models
|
5
|
+
class FinancialAccountRegisterAccountNumberParams < Lithic::Internal::Type::BaseModel
|
6
|
+
extend Lithic::Internal::Type::RequestParameters::Converter
|
7
|
+
include Lithic::Internal::Type::RequestParameters
|
8
|
+
|
9
|
+
OrHash =
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
Lithic::FinancialAccountRegisterAccountNumberParams,
|
13
|
+
Lithic::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
sig { returns(String) }
|
18
|
+
attr_accessor :account_number
|
19
|
+
|
20
|
+
sig do
|
21
|
+
params(
|
22
|
+
account_number: String,
|
23
|
+
request_options: Lithic::RequestOptions::OrHash
|
24
|
+
).returns(T.attached_class)
|
25
|
+
end
|
26
|
+
def self.new(account_number:, request_options: {})
|
27
|
+
end
|
28
|
+
|
29
|
+
sig do
|
30
|
+
override.returns(
|
31
|
+
{ account_number: String, request_options: Lithic::RequestOptions }
|
32
|
+
)
|
33
|
+
end
|
34
|
+
def to_hash
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -79,7 +79,9 @@ module Lithic
|
|
79
79
|
sig { returns(String) }
|
80
80
|
attr_accessor :report_date
|
81
81
|
|
82
|
-
# Date of when money movement is triggered for the transaction.
|
82
|
+
# Date of when money movement is triggered for the transaction. One exception
|
83
|
+
# applies - for Mastercard dual message settlement, this is the settlement
|
84
|
+
# advisement date, which is distinct from the date of money movement.
|
83
85
|
sig { returns(String) }
|
84
86
|
attr_accessor :settlement_date
|
85
87
|
|
@@ -168,7 +170,9 @@ module Lithic
|
|
168
170
|
other_fees_gross_amount:,
|
169
171
|
# Date of when the report was first generated.
|
170
172
|
report_date:,
|
171
|
-
# Date of when money movement is triggered for the transaction.
|
173
|
+
# Date of when money movement is triggered for the transaction. One exception
|
174
|
+
# applies - for Mastercard dual message settlement, this is the settlement
|
175
|
+
# advisement date, which is distinct from the date of money movement.
|
172
176
|
settlement_date:,
|
173
177
|
# Globally unique identifier denoting the associated Transaction object.
|
174
178
|
transaction_token:,
|
@@ -815,6 +815,11 @@ module Lithic
|
|
815
815
|
end
|
816
816
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
817
817
|
|
818
|
+
CUSTOMER_RULES =
|
819
|
+
T.let(
|
820
|
+
:CUSTOMER_RULES,
|
821
|
+
Lithic::Transaction::CardholderAuthentication::DecisionMadeBy::TaggedSymbol
|
822
|
+
)
|
818
823
|
CUSTOMER_ENDPOINT =
|
819
824
|
T.let(
|
820
825
|
:CUSTOMER_ENDPOINT,
|
@@ -15,6 +15,7 @@ module Lithic
|
|
15
15
|
PRENOTE = T.let(:PRENOTE, Lithic::VerificationMethod::TaggedSymbol)
|
16
16
|
EXTERNALLY_VERIFIED =
|
17
17
|
T.let(:EXTERNALLY_VERIFIED, Lithic::VerificationMethod::TaggedSymbol)
|
18
|
+
UNVERIFIED = T.let(:UNVERIFIED, Lithic::VerificationMethod::TaggedSymbol)
|
18
19
|
|
19
20
|
sig do
|
20
21
|
override.returns(T::Array[Lithic::VerificationMethod::TaggedSymbol])
|
data/rbi/lithic/models.rbi
CHANGED
@@ -205,6 +205,9 @@ module Lithic
|
|
205
205
|
|
206
206
|
FinancialAccountListParams = Lithic::Models::FinancialAccountListParams
|
207
207
|
|
208
|
+
FinancialAccountRegisterAccountNumberParams =
|
209
|
+
Lithic::Models::FinancialAccountRegisterAccountNumberParams
|
210
|
+
|
208
211
|
FinancialAccountRetrieveParams =
|
209
212
|
Lithic::Models::FinancialAccountRetrieveParams
|
210
213
|
|
@@ -88,6 +88,22 @@ module Lithic
|
|
88
88
|
)
|
89
89
|
end
|
90
90
|
|
91
|
+
# Register account number
|
92
|
+
sig do
|
93
|
+
params(
|
94
|
+
financial_account_token: String,
|
95
|
+
account_number: String,
|
96
|
+
request_options: Lithic::RequestOptions::OrHash
|
97
|
+
).void
|
98
|
+
end
|
99
|
+
def register_account_number(
|
100
|
+
# Globally unique identifier for financial account.
|
101
|
+
financial_account_token,
|
102
|
+
account_number:,
|
103
|
+
request_options: {}
|
104
|
+
)
|
105
|
+
end
|
106
|
+
|
91
107
|
# Update financial account status
|
92
108
|
sig do
|
93
109
|
params(
|
@@ -21,7 +21,9 @@ module Lithic
|
|
21
21
|
# Simulates a 3DS authentication request from the payment network as if it came
|
22
22
|
# from an ACS. If you're configured for 3DS Customer Decisioning, simulating
|
23
23
|
# authentications requires your customer decisioning endpoint to be set up
|
24
|
-
# properly (respond with a valid JSON).
|
24
|
+
# properly (respond with a valid JSON). If the authentication decision is to
|
25
|
+
# challenge, ensure that the account holder associated with the card transaction
|
26
|
+
# has a valid phone number configured to receive the OTP code via SMS.
|
25
27
|
sig do
|
26
28
|
params(
|
27
29
|
merchant:
|
data/sig/lithic/errors.rbs
CHANGED
@@ -5,6 +5,15 @@ module Lithic
|
|
5
5
|
end
|
6
6
|
|
7
7
|
class ConversionError < Lithic::Errors::Error
|
8
|
+
def cause: -> StandardError?
|
9
|
+
|
10
|
+
def initialize: (
|
11
|
+
on: Class,
|
12
|
+
method: Symbol,
|
13
|
+
target: top,
|
14
|
+
value: top,
|
15
|
+
?cause: StandardError?
|
16
|
+
) -> void
|
8
17
|
end
|
9
18
|
|
10
19
|
class APIError < Lithic::Errors::Error
|
@@ -8,8 +8,10 @@ module Lithic
|
|
8
8
|
|
9
9
|
type coerce_state =
|
10
10
|
{
|
11
|
-
|
11
|
+
translate_names: bool,
|
12
|
+
strictness: bool,
|
12
13
|
exactness: { yes: Integer, no: Integer, maybe: Integer },
|
14
|
+
error: Class,
|
13
15
|
branched: Integer
|
14
16
|
}
|
15
17
|
|
@@ -37,6 +39,10 @@ module Lithic
|
|
37
39
|
| Lithic::Internal::Type::Converter::input spec
|
38
40
|
) -> (^-> top)
|
39
41
|
|
42
|
+
def self.new_coerce_state: (
|
43
|
+
?translate_names: bool
|
44
|
+
) -> Lithic::Internal::Type::Converter::coerce_state
|
45
|
+
|
40
46
|
def self.coerce: (
|
41
47
|
Lithic::Internal::Type::Converter::input target,
|
42
48
|
top value,
|
@@ -56,13 +56,14 @@ module Lithic
|
|
56
56
|
request_options: Lithic::RequestOptions
|
57
57
|
}
|
58
58
|
|
59
|
-
type state = :ACTIVE | :PAUSED
|
59
|
+
type state = :ACTIVE | :PAUSED | :CLOSED
|
60
60
|
|
61
61
|
module State
|
62
62
|
extend Lithic::Internal::Type::Enum
|
63
63
|
|
64
64
|
ACTIVE: :ACTIVE
|
65
65
|
PAUSED: :PAUSED
|
66
|
+
CLOSED: :CLOSED
|
66
67
|
|
67
68
|
def self?.values: -> ::Array[Lithic::Models::AccountUpdateParams::state]
|
68
69
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Lithic
|
2
2
|
module Models
|
3
3
|
module AuthRules
|
4
|
-
type velocity_limit_params_period_window = :DAY | :WEEK | :MONTH
|
4
|
+
type velocity_limit_params_period_window = :DAY | :WEEK | :MONTH | :YEAR
|
5
5
|
|
6
6
|
module VelocityLimitParamsPeriodWindow
|
7
7
|
extend Lithic::Internal::Type::Enum
|
@@ -9,6 +9,7 @@ module Lithic
|
|
9
9
|
DAY: :DAY
|
10
10
|
WEEK: :WEEK
|
11
11
|
MONTH: :MONTH
|
12
|
+
YEAR: :YEAR
|
12
13
|
|
13
14
|
def self?.values: -> ::Array[Lithic::Models::AuthRules::velocity_limit_params_period_window]
|
14
15
|
end
|
@@ -165,6 +165,7 @@ module Lithic
|
|
165
165
|
| :CHARGED_OFF_PRINCIPAL
|
166
166
|
| :SECURITY
|
167
167
|
| :PROGRAM_RECEIVABLES
|
168
|
+
| :COLLECTION
|
168
169
|
|
169
170
|
module Type
|
170
171
|
extend Lithic::Internal::Type::Enum
|
@@ -177,6 +178,7 @@ module Lithic
|
|
177
178
|
CHARGED_OFF_PRINCIPAL: :CHARGED_OFF_PRINCIPAL
|
178
179
|
SECURITY: :SECURITY
|
179
180
|
PROGRAM_RECEIVABLES: :PROGRAM_RECEIVABLES
|
181
|
+
COLLECTION: :COLLECTION
|
180
182
|
|
181
183
|
def self?.values: -> ::Array[Lithic::Models::FinancialAccount::type_]
|
182
184
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Lithic
|
2
|
+
module Models
|
3
|
+
type financial_account_register_account_number_params =
|
4
|
+
{ account_number: String } & Lithic::Internal::Type::request_parameters
|
5
|
+
|
6
|
+
class FinancialAccountRegisterAccountNumberParams < Lithic::Internal::Type::BaseModel
|
7
|
+
extend Lithic::Internal::Type::RequestParameters::Converter
|
8
|
+
include Lithic::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
attr_accessor account_number: String
|
11
|
+
|
12
|
+
def initialize: (
|
13
|
+
account_number: String,
|
14
|
+
?request_options: Lithic::request_opts
|
15
|
+
) -> void
|
16
|
+
|
17
|
+
def to_hash: -> {
|
18
|
+
account_number: String,
|
19
|
+
request_options: Lithic::RequestOptions
|
20
|
+
}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|