lithic 0.1.0.pre.alpha.25 → 0.1.0.pre.alpha.27
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 +29 -0
- data/README.md +94 -54
- data/lib/lithic/client.rb +8 -4
- data/lib/lithic/internal/transport/pooled_net_requester.rb +3 -1
- data/lib/lithic/internal/type/array_of.rb +8 -0
- data/lib/lithic/internal/type/base_model.rb +15 -0
- data/lib/lithic/internal/type/boolean.rb +8 -0
- data/lib/lithic/internal/type/enum.rb +12 -0
- data/lib/lithic/internal/type/file_input.rb +7 -0
- data/lib/lithic/internal/type/hash_of.rb +8 -0
- data/lib/lithic/internal/type/union.rb +12 -0
- data/lib/lithic/internal/type/unknown.rb +8 -0
- data/lib/lithic/internal/util.rb +45 -0
- data/lib/lithic/internal.rb +3 -0
- data/lib/lithic/models/account_holder_update_response.rb +0 -9
- data/lib/lithic/models/auth_rules/auth_rule_condition.rb +0 -4
- data/lib/lithic/models/auth_rules/v2_apply_response.rb +0 -20
- data/lib/lithic/models/auth_rules/v2_create_params.rb +0 -10
- data/lib/lithic/models/auth_rules/v2_create_response.rb +0 -20
- data/lib/lithic/models/auth_rules/v2_draft_params.rb +0 -10
- data/lib/lithic/models/auth_rules/v2_draft_response.rb +0 -20
- data/lib/lithic/models/auth_rules/v2_list_response.rb +0 -20
- data/lib/lithic/models/auth_rules/v2_promote_response.rb +0 -20
- data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +0 -20
- data/lib/lithic/models/auth_rules/v2_update_response.rb +0 -20
- data/lib/lithic/models/auth_rules/velocity_limit_params.rb +0 -4
- data/lib/lithic/models/card_web_provision_params.rb +32 -0
- data/lib/lithic/models/card_web_provision_response.rb +83 -0
- data/lib/lithic/models/funding_event_list_params.rb +43 -0
- data/lib/lithic/models/funding_event_list_response.rb +104 -0
- data/lib/lithic/models/funding_event_retrieve_details_params.rb +14 -0
- data/lib/lithic/models/funding_event_retrieve_details_response.rb +33 -0
- data/lib/lithic/models/funding_event_retrieve_params.rb +14 -0
- data/lib/lithic/models/funding_event_retrieve_response.rb +104 -0
- data/lib/lithic/models.rb +38 -19
- data/lib/lithic/resources/cards.rb +29 -0
- data/lib/lithic/resources/funding_events.rb +84 -0
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +9 -0
- data/rbi/lithic/client.rbi +3 -0
- data/rbi/lithic/internal/transport/pooled_net_requester.rbi +5 -1
- data/rbi/lithic/internal/type/array_of.rbi +6 -0
- data/rbi/lithic/internal/type/base_model.rbi +5 -0
- data/rbi/lithic/internal/type/boolean.rbi +6 -0
- data/rbi/lithic/internal/type/enum.rbi +5 -0
- data/rbi/lithic/internal/type/file_input.rbi +5 -0
- data/rbi/lithic/internal/type/hash_of.rbi +6 -0
- data/rbi/lithic/internal/type/union.rbi +5 -0
- data/rbi/lithic/internal/type/unknown.rbi +6 -0
- data/rbi/lithic/internal/util.rbi +31 -0
- data/rbi/lithic/internal.rbi +3 -0
- data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +12 -4
- data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +4 -20
- data/rbi/lithic/models/auth_rules/v2_create_response.rbi +4 -20
- data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +4 -20
- data/rbi/lithic/models/auth_rules/v2_list_response.rbi +4 -20
- data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +4 -20
- data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +4 -20
- data/rbi/lithic/models/auth_rules/v2_update_response.rbi +4 -20
- data/rbi/lithic/models/card_web_provision_params.rbi +84 -0
- data/rbi/lithic/models/card_web_provision_response.rbi +169 -0
- data/rbi/lithic/models/funding_event_list_params.rbi +72 -0
- data/rbi/lithic/models/funding_event_list_response.rbi +177 -0
- data/rbi/lithic/models/funding_event_retrieve_details_params.rbi +30 -0
- data/rbi/lithic/models/funding_event_retrieve_details_response.rbi +56 -0
- data/rbi/lithic/models/funding_event_retrieve_params.rbi +27 -0
- data/rbi/lithic/models/funding_event_retrieve_response.rbi +177 -0
- data/rbi/lithic/models.rbi +9 -0
- data/rbi/lithic/resources/account_holders.rbi +1 -6
- data/rbi/lithic/resources/cards.rbi +23 -0
- data/rbi/lithic/resources/funding_events.rbi +64 -0
- data/sig/lithic/client.rbs +2 -0
- data/sig/lithic/internal/transport/pooled_net_requester.rbs +2 -0
- data/sig/lithic/internal/type/array_of.rbs +3 -0
- data/sig/lithic/internal/type/base_model.rbs +2 -0
- data/sig/lithic/internal/type/boolean.rbs +3 -0
- data/sig/lithic/internal/type/enum.rbs +2 -0
- data/sig/lithic/internal/type/file_input.rbs +2 -0
- data/sig/lithic/internal/type/hash_of.rbs +3 -0
- data/sig/lithic/internal/type/union.rbs +2 -0
- data/sig/lithic/internal/type/unknown.rbs +3 -0
- data/sig/lithic/internal/util.rbs +12 -0
- data/sig/lithic/internal.rbs +2 -0
- data/sig/lithic/models/card_web_provision_params.rbs +33 -0
- data/sig/lithic/models/card_web_provision_response.rbs +68 -0
- data/sig/lithic/models/funding_event_list_params.rbs +31 -0
- data/sig/lithic/models/funding_event_list_response.rbs +65 -0
- data/sig/lithic/models/funding_event_retrieve_details_params.rbs +13 -0
- data/sig/lithic/models/funding_event_retrieve_details_response.rbs +24 -0
- data/sig/lithic/models/funding_event_retrieve_params.rbs +13 -0
- data/sig/lithic/models/funding_event_retrieve_response.rbs +65 -0
- data/sig/lithic/models.rbs +8 -0
- data/sig/lithic/resources/cards.rbs +6 -0
- data/sig/lithic/resources/funding_events.rbs +24 -0
- metadata +29 -2
data/lib/lithic/models.rb
CHANGED
@@ -5,29 +5,40 @@ module Lithic
|
|
5
5
|
cls.define_sorbet_constant!(:OrHash) { T.type_alias { T.any(cls, Lithic::Internal::AnyHash) } }
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
8
|
+
Lithic::Internal::Util.walk_namespaces(Lithic::Models).each do |mod|
|
9
|
+
case mod
|
10
|
+
in Lithic::Internal::Type::Enum | Lithic::Internal::Type::Union
|
11
|
+
mod.constants.each do |name|
|
12
|
+
case mod.const_get(name)
|
13
|
+
in true | false
|
14
|
+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } }
|
15
|
+
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
16
|
+
in Integer
|
17
|
+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } }
|
18
|
+
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
19
|
+
in Float
|
20
|
+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } }
|
21
|
+
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
22
|
+
in Symbol
|
23
|
+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } }
|
24
|
+
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
25
|
+
else
|
26
|
+
end
|
27
27
|
end
|
28
|
+
else
|
28
29
|
end
|
29
30
|
end
|
30
31
|
|
32
|
+
Lithic::Internal::Util.walk_namespaces(Lithic::Models)
|
33
|
+
.lazy
|
34
|
+
.grep(Lithic::Internal::Type::Union)
|
35
|
+
.each do |mod|
|
36
|
+
const = :Variants
|
37
|
+
next if mod.sorbet_constant_defined?(const)
|
38
|
+
|
39
|
+
mod.define_sorbet_constant!(const) { T.type_alias { mod.to_sorbet_type } }
|
40
|
+
end
|
41
|
+
|
31
42
|
Account = Lithic::Models::Account
|
32
43
|
|
33
44
|
AccountFinancialAccountType = Lithic::Models::AccountFinancialAccountType
|
@@ -129,6 +140,8 @@ module Lithic
|
|
129
140
|
|
130
141
|
CardUpdateParams = Lithic::Models::CardUpdateParams
|
131
142
|
|
143
|
+
CardWebProvisionParams = Lithic::Models::CardWebProvisionParams
|
144
|
+
|
132
145
|
Carrier = Lithic::Models::Carrier
|
133
146
|
|
134
147
|
ClientAPIStatusParams = Lithic::Models::ClientAPIStatusParams
|
@@ -227,6 +240,12 @@ module Lithic
|
|
227
240
|
|
228
241
|
FinancialTransaction = Lithic::Models::FinancialTransaction
|
229
242
|
|
243
|
+
FundingEventListParams = Lithic::Models::FundingEventListParams
|
244
|
+
|
245
|
+
FundingEventRetrieveDetailsParams = Lithic::Models::FundingEventRetrieveDetailsParams
|
246
|
+
|
247
|
+
FundingEventRetrieveParams = Lithic::Models::FundingEventRetrieveParams
|
248
|
+
|
230
249
|
InstanceFinancialAccountType = Lithic::Models::InstanceFinancialAccountType
|
231
250
|
|
232
251
|
KYB = Lithic::Models::KYB
|
@@ -431,6 +431,35 @@ module Lithic
|
|
431
431
|
)
|
432
432
|
end
|
433
433
|
|
434
|
+
# Allow your cardholders to directly add payment cards to the device's digital
|
435
|
+
# wallet from a browser on the web. Currently only suported for Apple Pay.
|
436
|
+
#
|
437
|
+
# This requires some additional setup and configuration. Please
|
438
|
+
# [Contact Us](https://lithic.com/contact) or your Customer Success representative
|
439
|
+
# for more information.
|
440
|
+
#
|
441
|
+
# @overload web_provision(card_token, digital_wallet: nil, request_options: {})
|
442
|
+
#
|
443
|
+
# @param card_token [String] The unique token of the card to add to the device's digital wallet.
|
444
|
+
#
|
445
|
+
# @param digital_wallet [Symbol, Lithic::CardWebProvisionParams::DigitalWallet] Name of digital wallet provider.
|
446
|
+
#
|
447
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
448
|
+
#
|
449
|
+
# @return [Lithic::Models::CardWebProvisionResponse]
|
450
|
+
#
|
451
|
+
# @see Lithic::Models::CardWebProvisionParams
|
452
|
+
def web_provision(card_token, params = {})
|
453
|
+
parsed, options = Lithic::CardWebProvisionParams.dump_request(params)
|
454
|
+
@client.request(
|
455
|
+
method: :post,
|
456
|
+
path: ["v1/cards/%1$s/web_provision", card_token],
|
457
|
+
body: parsed,
|
458
|
+
model: Lithic::Models::CardWebProvisionResponse,
|
459
|
+
options: options
|
460
|
+
)
|
461
|
+
end
|
462
|
+
|
434
463
|
# @api private
|
435
464
|
#
|
436
465
|
# @param client [Lithic::Client]
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Lithic
|
4
|
+
module Resources
|
5
|
+
class FundingEvents
|
6
|
+
# Get funding event for program by id
|
7
|
+
#
|
8
|
+
# @overload retrieve(funding_event_token, request_options: {})
|
9
|
+
#
|
10
|
+
# @param funding_event_token [String] Globally unique identifier for funding event.
|
11
|
+
#
|
12
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
13
|
+
#
|
14
|
+
# @return [Lithic::Models::FundingEventRetrieveResponse]
|
15
|
+
#
|
16
|
+
# @see Lithic::Models::FundingEventRetrieveParams
|
17
|
+
def retrieve(funding_event_token, params = {})
|
18
|
+
@client.request(
|
19
|
+
method: :get,
|
20
|
+
path: ["v1/funding_events/%1$s", funding_event_token],
|
21
|
+
model: Lithic::Models::FundingEventRetrieveResponse,
|
22
|
+
options: params[:request_options]
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
# Some parameter documentations has been truncated, see
|
27
|
+
# {Lithic::Models::FundingEventListParams} for more details.
|
28
|
+
#
|
29
|
+
# Get all funding events for program
|
30
|
+
#
|
31
|
+
# @overload list(ending_before: nil, page_size: nil, starting_after: nil, request_options: {})
|
32
|
+
#
|
33
|
+
# @param ending_before [String] A cursor representing an item's token before which a page of results should end.
|
34
|
+
#
|
35
|
+
# @param page_size [Integer] Page size (for pagination).
|
36
|
+
#
|
37
|
+
# @param starting_after [String] A cursor representing an item's token after which a page of results should begin
|
38
|
+
#
|
39
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
40
|
+
#
|
41
|
+
# @return [Lithic::Internal::CursorPage<Lithic::Models::FundingEventListResponse>]
|
42
|
+
#
|
43
|
+
# @see Lithic::Models::FundingEventListParams
|
44
|
+
def list(params = {})
|
45
|
+
parsed, options = Lithic::FundingEventListParams.dump_request(params)
|
46
|
+
@client.request(
|
47
|
+
method: :get,
|
48
|
+
path: "v1/funding_events",
|
49
|
+
query: parsed,
|
50
|
+
page: Lithic::Internal::CursorPage,
|
51
|
+
model: Lithic::Models::FundingEventListResponse,
|
52
|
+
options: options
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Get funding event details by id
|
57
|
+
#
|
58
|
+
# @overload retrieve_details(funding_event_token, request_options: {})
|
59
|
+
#
|
60
|
+
# @param funding_event_token [String] Globally unique identifier for funding event.
|
61
|
+
#
|
62
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
63
|
+
#
|
64
|
+
# @return [Lithic::Models::FundingEventRetrieveDetailsResponse]
|
65
|
+
#
|
66
|
+
# @see Lithic::Models::FundingEventRetrieveDetailsParams
|
67
|
+
def retrieve_details(funding_event_token, params = {})
|
68
|
+
@client.request(
|
69
|
+
method: :get,
|
70
|
+
path: ["v1/funding_events/%1$s/details", funding_event_token],
|
71
|
+
model: Lithic::Models::FundingEventRetrieveDetailsResponse,
|
72
|
+
options: params[:request_options]
|
73
|
+
)
|
74
|
+
end
|
75
|
+
|
76
|
+
# @api private
|
77
|
+
#
|
78
|
+
# @param client [Lithic::Client]
|
79
|
+
def initialize(client:)
|
80
|
+
@client = client
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
data/lib/lithic/version.rb
CHANGED
data/lib/lithic.rb
CHANGED
@@ -140,6 +140,8 @@ require_relative "lithic/models/cards/financial_transaction_retrieve_params"
|
|
140
140
|
require_relative "lithic/models/card_search_by_pan_params"
|
141
141
|
require_relative "lithic/models/card_spend_limits"
|
142
142
|
require_relative "lithic/models/card_update_params"
|
143
|
+
require_relative "lithic/models/card_web_provision_params"
|
144
|
+
require_relative "lithic/models/card_web_provision_response"
|
143
145
|
require_relative "lithic/models/carrier"
|
144
146
|
require_relative "lithic/models/client_api_status_params"
|
145
147
|
require_relative "lithic/models/credit_products/extended_credit"
|
@@ -227,6 +229,12 @@ require_relative "lithic/models/financial_accounts/statements/statement_line_ite
|
|
227
229
|
require_relative "lithic/models/financial_account_update_params"
|
228
230
|
require_relative "lithic/models/financial_account_update_status_params"
|
229
231
|
require_relative "lithic/models/financial_transaction"
|
232
|
+
require_relative "lithic/models/funding_event_list_params"
|
233
|
+
require_relative "lithic/models/funding_event_list_response"
|
234
|
+
require_relative "lithic/models/funding_event_retrieve_details_params"
|
235
|
+
require_relative "lithic/models/funding_event_retrieve_details_response"
|
236
|
+
require_relative "lithic/models/funding_event_retrieve_params"
|
237
|
+
require_relative "lithic/models/funding_event_retrieve_response"
|
230
238
|
require_relative "lithic/models/instance_financial_account_type"
|
231
239
|
require_relative "lithic/models/kyb"
|
232
240
|
require_relative "lithic/models/kyb_business_entity"
|
@@ -355,6 +363,7 @@ require_relative "lithic/resources/financial_accounts/financial_transactions"
|
|
355
363
|
require_relative "lithic/resources/financial_accounts/loan_tapes"
|
356
364
|
require_relative "lithic/resources/financial_accounts/statements"
|
357
365
|
require_relative "lithic/resources/financial_accounts/statements/line_items"
|
366
|
+
require_relative "lithic/resources/funding_events"
|
358
367
|
require_relative "lithic/resources/management_operations"
|
359
368
|
require_relative "lithic/resources/payments"
|
360
369
|
require_relative "lithic/resources/reports"
|
data/rbi/lithic/client.rbi
CHANGED
@@ -97,6 +97,9 @@ module Lithic
|
|
97
97
|
sig { returns(Lithic::Resources::ManagementOperations) }
|
98
98
|
attr_reader :management_operations
|
99
99
|
|
100
|
+
sig { returns(Lithic::Resources::FundingEvents) }
|
101
|
+
attr_reader :funding_events
|
102
|
+
|
100
103
|
# Status of api
|
101
104
|
sig do
|
102
105
|
params(request_options: Lithic::RequestOptions::OrHash).returns(
|
@@ -22,6 +22,8 @@ module Lithic
|
|
22
22
|
# https://github.com/golang/go/blob/c8eced8580028328fde7c03cbfcb720ce15b2358/src/net/http/transport.go#L49
|
23
23
|
KEEP_ALIVE_TIMEOUT = 30
|
24
24
|
|
25
|
+
DEFAULT_MAX_CONNECTIONS = T.let(T.unsafe(nil), Integer)
|
26
|
+
|
25
27
|
class << self
|
26
28
|
# @api private
|
27
29
|
sig { params(url: URI::Generic).returns(Net::HTTP) }
|
@@ -66,7 +68,9 @@ module Lithic
|
|
66
68
|
|
67
69
|
# @api private
|
68
70
|
sig { params(size: Integer).returns(T.attached_class) }
|
69
|
-
def self.new(
|
71
|
+
def self.new(
|
72
|
+
size: Lithic::Internal::Transport::PooledNetRequester::DEFAULT_MAX_CONNECTIONS
|
73
|
+
)
|
70
74
|
end
|
71
75
|
end
|
72
76
|
end
|
@@ -8,6 +8,7 @@ module Lithic
|
|
8
8
|
# Array of items of a given type.
|
9
9
|
class ArrayOf
|
10
10
|
include Lithic::Internal::Type::Converter
|
11
|
+
include Lithic::Internal::Util::SorbetRuntimeSupport
|
11
12
|
|
12
13
|
abstract!
|
13
14
|
|
@@ -63,6 +64,11 @@ module Lithic
|
|
63
64
|
def dump(value, state:)
|
64
65
|
end
|
65
66
|
|
67
|
+
# @api private
|
68
|
+
sig { returns(T.anything) }
|
69
|
+
def to_sorbet_type
|
70
|
+
end
|
71
|
+
|
66
72
|
# @api private
|
67
73
|
sig { returns(Elem) }
|
68
74
|
protected def item_type
|
@@ -8,6 +8,7 @@ module Lithic
|
|
8
8
|
# Ruby has no Boolean class; this is something for models to refer to.
|
9
9
|
class Boolean
|
10
10
|
extend Lithic::Internal::Type::Converter
|
11
|
+
extend Lithic::Internal::Util::SorbetRuntimeSupport
|
11
12
|
|
12
13
|
abstract!
|
13
14
|
|
@@ -43,6 +44,11 @@ module Lithic
|
|
43
44
|
end
|
44
45
|
def dump(value, state:)
|
45
46
|
end
|
47
|
+
|
48
|
+
# @api private
|
49
|
+
sig { returns(T.anything) }
|
50
|
+
def to_sorbet_type
|
51
|
+
end
|
46
52
|
end
|
47
53
|
end
|
48
54
|
end
|
@@ -8,6 +8,7 @@ module Lithic
|
|
8
8
|
# Hash of items of a given type.
|
9
9
|
class HashOf
|
10
10
|
include Lithic::Internal::Type::Converter
|
11
|
+
include Lithic::Internal::Util::SorbetRuntimeSupport
|
11
12
|
|
12
13
|
abstract!
|
13
14
|
|
@@ -63,6 +64,11 @@ module Lithic
|
|
63
64
|
def dump(value, state:)
|
64
65
|
end
|
65
66
|
|
67
|
+
# @api private
|
68
|
+
sig { returns(T.anything) }
|
69
|
+
def to_sorbet_type
|
70
|
+
end
|
71
|
+
|
66
72
|
# @api private
|
67
73
|
sig { returns(Elem) }
|
68
74
|
protected def item_type
|
@@ -8,6 +8,7 @@ module Lithic
|
|
8
8
|
# When we don't know what to expect for the value.
|
9
9
|
class Unknown
|
10
10
|
extend Lithic::Internal::Type::Converter
|
11
|
+
extend Lithic::Internal::Util::SorbetRuntimeSupport
|
11
12
|
|
12
13
|
abstract!
|
13
14
|
|
@@ -43,6 +44,11 @@ module Lithic
|
|
43
44
|
end
|
44
45
|
def dump(value, state:)
|
45
46
|
end
|
47
|
+
|
48
|
+
# @api private
|
49
|
+
sig { returns(T.anything) }
|
50
|
+
def to_sorbet_type
|
51
|
+
end
|
46
52
|
end
|
47
53
|
end
|
48
54
|
end
|
@@ -11,6 +11,15 @@ module Lithic
|
|
11
11
|
def self.monotonic_secs
|
12
12
|
end
|
13
13
|
|
14
|
+
# @api private
|
15
|
+
sig do
|
16
|
+
params(ns: T.any(Module, T::Class[T.anything])).returns(
|
17
|
+
T::Enumerable[T.any(Module, T::Class[T.anything])]
|
18
|
+
)
|
19
|
+
end
|
20
|
+
def self.walk_namespaces(ns)
|
21
|
+
end
|
22
|
+
|
14
23
|
class << self
|
15
24
|
# @api private
|
16
25
|
sig { returns(String) }
|
@@ -441,10 +450,32 @@ module Lithic
|
|
441
450
|
def const_missing(name)
|
442
451
|
end
|
443
452
|
|
453
|
+
# @api private
|
454
|
+
sig { params(name: Symbol).returns(T::Boolean) }
|
455
|
+
def sorbet_constant_defined?(name)
|
456
|
+
end
|
457
|
+
|
444
458
|
# @api private
|
445
459
|
sig { params(name: Symbol, blk: T.proc.returns(T.anything)).void }
|
446
460
|
def define_sorbet_constant!(name, &blk)
|
447
461
|
end
|
462
|
+
|
463
|
+
# @api private
|
464
|
+
sig { returns(T.anything) }
|
465
|
+
def to_sorbet_type
|
466
|
+
end
|
467
|
+
|
468
|
+
class << self
|
469
|
+
# @api private
|
470
|
+
sig do
|
471
|
+
params(
|
472
|
+
type:
|
473
|
+
T.any(Lithic::Internal::Util::SorbetRuntimeSupport, T.anything)
|
474
|
+
).returns(T.anything)
|
475
|
+
end
|
476
|
+
def to_sorbet_type(type)
|
477
|
+
end
|
478
|
+
end
|
448
479
|
end
|
449
480
|
end
|
450
481
|
end
|
data/rbi/lithic/internal.rbi
CHANGED
@@ -8,6 +8,9 @@ module Lithic
|
|
8
8
|
# this alias might be refined in the future.
|
9
9
|
AnyHash = T.type_alias { T::Hash[Symbol, T.anything] }
|
10
10
|
|
11
|
+
FileInput =
|
12
|
+
T.type_alias { T.any(Pathname, StringIO, IO, String, Lithic::FilePart) }
|
13
|
+
|
11
14
|
OMIT = T.let(Object.new.freeze, T.anything)
|
12
15
|
end
|
13
16
|
end
|
@@ -89,10 +89,18 @@ module Lithic
|
|
89
89
|
attr_writer :operation
|
90
90
|
|
91
91
|
# A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH`
|
92
|
-
sig
|
92
|
+
sig do
|
93
|
+
returns(
|
94
|
+
T.nilable(Lithic::AuthRules::AuthRuleCondition::Value::Variants)
|
95
|
+
)
|
96
|
+
end
|
93
97
|
attr_reader :value
|
94
98
|
|
95
|
-
sig
|
99
|
+
sig do
|
100
|
+
params(
|
101
|
+
value: Lithic::AuthRules::AuthRuleCondition::Value::Variants
|
102
|
+
).void
|
103
|
+
end
|
96
104
|
attr_writer :value
|
97
105
|
|
98
106
|
sig do
|
@@ -100,7 +108,7 @@ module Lithic
|
|
100
108
|
attribute: Lithic::AuthRules::ConditionalAttribute::OrSymbol,
|
101
109
|
operation:
|
102
110
|
Lithic::AuthRules::AuthRuleCondition::Operation::OrSymbol,
|
103
|
-
value:
|
111
|
+
value: Lithic::AuthRules::AuthRuleCondition::Value::Variants
|
104
112
|
).returns(T.attached_class)
|
105
113
|
end
|
106
114
|
def self.new(
|
@@ -165,7 +173,7 @@ module Lithic
|
|
165
173
|
attribute: Lithic::AuthRules::ConditionalAttribute::OrSymbol,
|
166
174
|
operation:
|
167
175
|
Lithic::AuthRules::AuthRuleCondition::Operation::OrSymbol,
|
168
|
-
value:
|
176
|
+
value: Lithic::AuthRules::AuthRuleCondition::Value::Variants
|
169
177
|
}
|
170
178
|
)
|
171
179
|
end
|
@@ -172,11 +172,7 @@ module Lithic
|
|
172
172
|
# Parameters for the Auth Rule
|
173
173
|
sig do
|
174
174
|
returns(
|
175
|
-
|
176
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
177
|
-
Lithic::AuthRules::VelocityLimitParams,
|
178
|
-
Lithic::Models::AuthRules::V2ApplyResponse::CurrentVersion::Parameters::MerchantLockParameters
|
179
|
-
)
|
175
|
+
Lithic::Models::AuthRules::V2ApplyResponse::CurrentVersion::Parameters::Variants
|
180
176
|
)
|
181
177
|
end
|
182
178
|
attr_accessor :parameters
|
@@ -210,11 +206,7 @@ module Lithic
|
|
210
206
|
override.returns(
|
211
207
|
{
|
212
208
|
parameters:
|
213
|
-
|
214
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
215
|
-
Lithic::AuthRules::VelocityLimitParams,
|
216
|
-
Lithic::Models::AuthRules::V2ApplyResponse::CurrentVersion::Parameters::MerchantLockParameters
|
217
|
-
),
|
209
|
+
Lithic::Models::AuthRules::V2ApplyResponse::CurrentVersion::Parameters::Variants,
|
218
210
|
version: Integer
|
219
211
|
}
|
220
212
|
)
|
@@ -377,11 +369,7 @@ module Lithic
|
|
377
369
|
# Parameters for the Auth Rule
|
378
370
|
sig do
|
379
371
|
returns(
|
380
|
-
|
381
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
382
|
-
Lithic::AuthRules::VelocityLimitParams,
|
383
|
-
Lithic::Models::AuthRules::V2ApplyResponse::DraftVersion::Parameters::MerchantLockParameters
|
384
|
-
)
|
372
|
+
Lithic::Models::AuthRules::V2ApplyResponse::DraftVersion::Parameters::Variants
|
385
373
|
)
|
386
374
|
end
|
387
375
|
attr_accessor :parameters
|
@@ -415,11 +403,7 @@ module Lithic
|
|
415
403
|
override.returns(
|
416
404
|
{
|
417
405
|
parameters:
|
418
|
-
|
419
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
420
|
-
Lithic::AuthRules::VelocityLimitParams,
|
421
|
-
Lithic::Models::AuthRules::V2ApplyResponse::DraftVersion::Parameters::MerchantLockParameters
|
422
|
-
),
|
406
|
+
Lithic::Models::AuthRules::V2ApplyResponse::DraftVersion::Parameters::Variants,
|
423
407
|
version: Integer
|
424
408
|
}
|
425
409
|
)
|
@@ -172,11 +172,7 @@ module Lithic
|
|
172
172
|
# Parameters for the Auth Rule
|
173
173
|
sig do
|
174
174
|
returns(
|
175
|
-
|
176
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
177
|
-
Lithic::AuthRules::VelocityLimitParams,
|
178
|
-
Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters
|
179
|
-
)
|
175
|
+
Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Variants
|
180
176
|
)
|
181
177
|
end
|
182
178
|
attr_accessor :parameters
|
@@ -210,11 +206,7 @@ module Lithic
|
|
210
206
|
override.returns(
|
211
207
|
{
|
212
208
|
parameters:
|
213
|
-
|
214
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
215
|
-
Lithic::AuthRules::VelocityLimitParams,
|
216
|
-
Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters
|
217
|
-
),
|
209
|
+
Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::Variants,
|
218
210
|
version: Integer
|
219
211
|
}
|
220
212
|
)
|
@@ -377,11 +369,7 @@ module Lithic
|
|
377
369
|
# Parameters for the Auth Rule
|
378
370
|
sig do
|
379
371
|
returns(
|
380
|
-
|
381
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
382
|
-
Lithic::AuthRules::VelocityLimitParams,
|
383
|
-
Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters
|
384
|
-
)
|
372
|
+
Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Variants
|
385
373
|
)
|
386
374
|
end
|
387
375
|
attr_accessor :parameters
|
@@ -415,11 +403,7 @@ module Lithic
|
|
415
403
|
override.returns(
|
416
404
|
{
|
417
405
|
parameters:
|
418
|
-
|
419
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
420
|
-
Lithic::AuthRules::VelocityLimitParams,
|
421
|
-
Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters
|
422
|
-
),
|
406
|
+
Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::Variants,
|
423
407
|
version: Integer
|
424
408
|
}
|
425
409
|
)
|
@@ -172,11 +172,7 @@ module Lithic
|
|
172
172
|
# Parameters for the Auth Rule
|
173
173
|
sig do
|
174
174
|
returns(
|
175
|
-
|
176
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
177
|
-
Lithic::AuthRules::VelocityLimitParams,
|
178
|
-
Lithic::Models::AuthRules::V2DraftResponse::CurrentVersion::Parameters::MerchantLockParameters
|
179
|
-
)
|
175
|
+
Lithic::Models::AuthRules::V2DraftResponse::CurrentVersion::Parameters::Variants
|
180
176
|
)
|
181
177
|
end
|
182
178
|
attr_accessor :parameters
|
@@ -210,11 +206,7 @@ module Lithic
|
|
210
206
|
override.returns(
|
211
207
|
{
|
212
208
|
parameters:
|
213
|
-
|
214
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
215
|
-
Lithic::AuthRules::VelocityLimitParams,
|
216
|
-
Lithic::Models::AuthRules::V2DraftResponse::CurrentVersion::Parameters::MerchantLockParameters
|
217
|
-
),
|
209
|
+
Lithic::Models::AuthRules::V2DraftResponse::CurrentVersion::Parameters::Variants,
|
218
210
|
version: Integer
|
219
211
|
}
|
220
212
|
)
|
@@ -377,11 +369,7 @@ module Lithic
|
|
377
369
|
# Parameters for the Auth Rule
|
378
370
|
sig do
|
379
371
|
returns(
|
380
|
-
|
381
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
382
|
-
Lithic::AuthRules::VelocityLimitParams,
|
383
|
-
Lithic::Models::AuthRules::V2DraftResponse::DraftVersion::Parameters::MerchantLockParameters
|
384
|
-
)
|
372
|
+
Lithic::Models::AuthRules::V2DraftResponse::DraftVersion::Parameters::Variants
|
385
373
|
)
|
386
374
|
end
|
387
375
|
attr_accessor :parameters
|
@@ -415,11 +403,7 @@ module Lithic
|
|
415
403
|
override.returns(
|
416
404
|
{
|
417
405
|
parameters:
|
418
|
-
|
419
|
-
Lithic::AuthRules::ConditionalBlockParameters,
|
420
|
-
Lithic::AuthRules::VelocityLimitParams,
|
421
|
-
Lithic::Models::AuthRules::V2DraftResponse::DraftVersion::Parameters::MerchantLockParameters
|
422
|
-
),
|
406
|
+
Lithic::Models::AuthRules::V2DraftResponse::DraftVersion::Parameters::Variants,
|
423
407
|
version: Integer
|
424
408
|
}
|
425
409
|
)
|