lithic 0.1.0.pre.alpha.40 → 0.1.0.pre.alpha.42
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 +22 -0
- data/README.md +1 -1
- data/lib/lithic/client.rb +4 -0
- data/lib/lithic/internal/transport/base_client.rb +1 -1
- data/lib/lithic/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/lithic/internal/type/array_of.rb +1 -0
- data/lib/lithic/internal/type/base_model.rb +3 -1
- data/lib/lithic/internal/type/converter.rb +27 -0
- data/lib/lithic/internal/type/hash_of.rb +1 -0
- data/lib/lithic/internal/type/union.rb +9 -7
- data/lib/lithic/internal/util.rb +1 -1
- data/lib/lithic/models/account_activity_list_params.rb +158 -0
- data/lib/lithic/models/account_activity_list_response.rb +1435 -0
- data/lib/lithic/models/account_activity_retrieve_transaction_params.rb +14 -0
- data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +1451 -0
- data/lib/lithic/models/account_holder.rb +16 -19
- data/lib/lithic/models/account_holder_create_params.rb +41 -47
- data/lib/lithic/models/account_holder_simulate_enrollment_review_params.rb +1 -3
- data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +25 -20
- data/lib/lithic/models/account_holder_update_params.rb +2 -6
- data/lib/lithic/models/account_holder_update_response.rb +25 -20
- data/lib/lithic/models/auth_rules/auth_rule_condition.rb +5 -1
- data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +8 -12
- data/lib/lithic/models/auth_rules/v2_apply_params.rb +13 -5
- data/lib/lithic/models/auth_rules/v2_apply_response.rb +510 -18
- data/lib/lithic/models/auth_rules/v2_create_params.rb +283 -16
- data/lib/lithic/models/auth_rules/v2_create_response.rb +510 -18
- data/lib/lithic/models/auth_rules/v2_draft_params.rb +239 -3
- data/lib/lithic/models/auth_rules/v2_draft_response.rb +510 -18
- data/lib/lithic/models/auth_rules/v2_list_params.rb +11 -1
- data/lib/lithic/models/auth_rules/v2_list_response.rb +510 -18
- data/lib/lithic/models/auth_rules/v2_promote_response.rb +510 -18
- data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +510 -18
- data/lib/lithic/models/auth_rules/v2_update_params.rb +1 -9
- data/lib/lithic/models/auth_rules/v2_update_response.rb +510 -18
- data/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb +4 -16
- data/lib/lithic/models/book_transfer_create_params.rb +34 -6
- data/lib/lithic/models/book_transfer_response.rb +124 -28
- data/lib/lithic/models/document.rb +1 -3
- data/lib/lithic/models/event.rb +6 -0
- data/lib/lithic/models/event_list_params.rb +2 -0
- data/lib/lithic/models/event_subscription.rb +2 -0
- data/lib/lithic/models/events/subscription_create_params.rb +3 -3
- data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +2 -0
- data/lib/lithic/models/events/subscription_update_params.rb +3 -3
- data/lib/lithic/models/external_bank_account_list_params.rb +2 -6
- data/lib/lithic/models/external_payment.rb +89 -48
- data/lib/lithic/models/financial_account.rb +1 -0
- data/lib/lithic/models/financial_accounts/loan_tape.rb +5 -18
- data/lib/lithic/models/financial_accounts/statement.rb +3 -10
- data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +2 -7
- data/lib/lithic/models/financial_transaction.rb +2 -0
- data/lib/lithic/models/instance_financial_account_type.rb +1 -0
- data/lib/lithic/models/kyb.rb +2 -2
- data/lib/lithic/models/management_operation_transaction.rb +90 -63
- data/lib/lithic/models/payment.rb +60 -1
- data/lib/lithic/models/reports/settlement_list_details_params.rb +2 -2
- data/lib/lithic/models/settlement_detail.rb +1 -0
- data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +173 -38
- data/lib/lithic/models/three_ds/authentication_simulate_params.rb +1 -4
- data/lib/lithic/models/tokenization.rb +1 -1
- data/lib/lithic/models/transaction.rb +4 -0
- data/lib/lithic/models/transactions/events/enhanced_data.rb +3 -11
- data/lib/lithic/models/transfer.rb +2 -0
- data/lib/lithic/models/wire_party_details.rb +40 -0
- data/lib/lithic/models.rb +6 -0
- data/lib/lithic/resources/account_activity.rb +80 -0
- data/lib/lithic/resources/account_holders.rb +9 -9
- data/lib/lithic/resources/auth_rules/v2/backtests.rb +3 -3
- data/lib/lithic/resources/auth_rules/v2.rb +19 -13
- data/lib/lithic/resources/book_transfers.rb +7 -3
- data/lib/lithic/resources/reports/settlement.rb +1 -1
- data/lib/lithic/resources/tokenizations.rb +2 -2
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +7 -2
- data/rbi/lithic/client.rbi +3 -0
- data/rbi/lithic/errors.rbi +2 -2
- data/rbi/lithic/internal/transport/base_client.rbi +1 -1
- data/rbi/lithic/internal/type/converter.rbi +46 -0
- data/rbi/lithic/internal/type/union.rbi +7 -2
- data/rbi/lithic/models/account_activity_list_params.rbi +347 -0
- data/rbi/lithic/models/account_activity_list_response.rbi +3367 -0
- data/rbi/lithic/models/account_activity_retrieve_transaction_params.rbi +30 -0
- data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +3369 -0
- data/rbi/lithic/models/account_holder.rbi +21 -23
- data/rbi/lithic/models/account_holder_create_params.rbi +87 -65
- data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +36 -30
- data/rbi/lithic/models/account_holder_update_response.rbi +36 -30
- data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +20 -0
- data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +20 -0
- data/rbi/lithic/models/auth_rules/v2_apply_params.rbi +19 -5
- data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +1128 -18
- data/rbi/lithic/models/auth_rules/v2_create_params.rbi +646 -21
- data/rbi/lithic/models/auth_rules/v2_create_response.rbi +1128 -18
- data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +554 -4
- data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +1128 -18
- data/rbi/lithic/models/auth_rules/v2_list_params.rbi +18 -0
- data/rbi/lithic/models/auth_rules/v2_list_response.rbi +1128 -18
- data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +1128 -18
- data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +1128 -18
- data/rbi/lithic/models/auth_rules/v2_update_params.rbi +0 -11
- data/rbi/lithic/models/auth_rules/v2_update_response.rbi +1128 -18
- data/rbi/lithic/models/book_transfer_create_params.rbi +75 -5
- data/rbi/lithic/models/book_transfer_response.rbi +320 -38
- data/rbi/lithic/models/event.rbi +16 -0
- data/rbi/lithic/models/event_list_params.rbi +10 -0
- data/rbi/lithic/models/event_subscription.rbi +10 -0
- data/rbi/lithic/models/events/subscription_create_params.rbi +10 -0
- data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +10 -0
- data/rbi/lithic/models/events/subscription_update_params.rbi +10 -0
- data/rbi/lithic/models/external_payment.rbi +147 -60
- data/rbi/lithic/models/financial_account.rbi +5 -0
- data/rbi/lithic/models/financial_transaction.rbi +1 -0
- data/rbi/lithic/models/instance_financial_account_type.rbi +5 -0
- data/rbi/lithic/models/kyb.rbi +2 -2
- data/rbi/lithic/models/management_operation_transaction.rbi +226 -95
- data/rbi/lithic/models/payment.rbi +103 -3
- data/rbi/lithic/models/reports/settlement_list_details_params.rbi +2 -2
- data/rbi/lithic/models/settlement_detail.rbi +2 -0
- data/rbi/lithic/models/three_ds/authentication_retrieve_response.rbi +267 -60
- data/rbi/lithic/models/transaction.rbi +17 -0
- data/rbi/lithic/models/transfer.rbi +1 -0
- data/rbi/lithic/models/wire_party_details.rbi +61 -0
- data/rbi/lithic/models.rbi +7 -0
- data/rbi/lithic/resources/account_activity.rbi +80 -0
- data/rbi/lithic/resources/account_holders.rbi +28 -29
- data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +3 -3
- data/rbi/lithic/resources/auth_rules/v2.rbi +28 -14
- data/rbi/lithic/resources/book_transfers.rbi +9 -2
- data/rbi/lithic/resources/reports/settlement.rbi +1 -1
- data/rbi/lithic/resources/tokenizations.rbi +1 -1
- data/sig/lithic/client.rbs +2 -0
- data/sig/lithic/internal/transport/base_client.rbs +1 -1
- data/sig/lithic/internal/type/converter.rbs +17 -0
- data/sig/lithic/internal/type/union.rbs +2 -2
- data/sig/lithic/models/account_activity_list_params.rbs +173 -0
- data/sig/lithic/models/account_activity_list_response.rbs +1353 -0
- data/sig/lithic/models/account_activity_retrieve_transaction_params.rbs +15 -0
- data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +1353 -0
- data/sig/lithic/models/account_holder_create_params.rbs +33 -19
- data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +10 -3
- data/sig/lithic/models/account_holder_update_response.rbs +10 -3
- data/sig/lithic/models/auth_rules/auth_rule_condition.rbs +8 -0
- data/sig/lithic/models/auth_rules/conditional_3ds_action_parameters.rbs +8 -0
- data/sig/lithic/models/auth_rules/v2_apply_params.rbs +11 -2
- data/sig/lithic/models/auth_rules/v2_apply_response.rbs +317 -2
- data/sig/lithic/models/auth_rules/v2_create_params.rbs +188 -4
- data/sig/lithic/models/auth_rules/v2_create_response.rbs +317 -2
- data/sig/lithic/models/auth_rules/v2_draft_params.rbs +155 -0
- data/sig/lithic/models/auth_rules/v2_draft_response.rbs +317 -2
- data/sig/lithic/models/auth_rules/v2_list_params.rbs +10 -1
- data/sig/lithic/models/auth_rules/v2_list_response.rbs +317 -2
- data/sig/lithic/models/auth_rules/v2_promote_response.rbs +317 -2
- data/sig/lithic/models/auth_rules/v2_retrieve_response.rbs +317 -2
- data/sig/lithic/models/auth_rules/v2_update_params.rbs +0 -7
- data/sig/lithic/models/auth_rules/v2_update_response.rbs +317 -2
- data/sig/lithic/models/book_transfer_create_params.rbs +30 -1
- data/sig/lithic/models/book_transfer_response.rbs +134 -15
- data/sig/lithic/models/event.rbs +4 -0
- data/sig/lithic/models/event_list_params.rbs +4 -0
- data/sig/lithic/models/event_subscription.rbs +4 -0
- data/sig/lithic/models/events/subscription_create_params.rbs +4 -0
- data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +4 -0
- data/sig/lithic/models/events/subscription_update_params.rbs +4 -0
- data/sig/lithic/models/external_payment.rbs +91 -40
- data/sig/lithic/models/financial_account.rbs +2 -0
- data/sig/lithic/models/instance_financial_account_type.rbs +2 -0
- data/sig/lithic/models/management_operation_transaction.rbs +95 -44
- data/sig/lithic/models/payment.rbs +61 -3
- data/sig/lithic/models/settlement_detail.rbs +2 -0
- data/sig/lithic/models/three_ds/authentication_retrieve_response.rbs +110 -23
- data/sig/lithic/models/transaction.rbs +10 -2
- data/sig/lithic/models/wire_party_details.rbs +35 -0
- data/sig/lithic/models.rbs +6 -0
- data/sig/lithic/resources/account_activity.rbs +27 -0
- data/sig/lithic/resources/account_holders.rbs +3 -3
- data/sig/lithic/resources/auth_rules/v2.rbs +6 -3
- data/sig/lithic/resources/book_transfers.rbs +2 -0
- data/sig/lithic/resources/tokenizations.rbs +1 -1
- metadata +20 -5
- data/lib/lithic/models/tokenization_retrieve_response.rb +0 -16
- data/rbi/lithic/models/tokenization_retrieve_response.rbi +0 -31
- data/sig/lithic/models/tokenization_retrieve_response.rbs +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 940f61d0d1fe56281a1add2c889aef444bd2aef7152414d722892a8c5e13c571
|
4
|
+
data.tar.gz: 543a9027684460fe71cc14b9e0c3b8d7ca52a30d52283eaa4f7ba6aceb7057ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94cefe2570966953c1c44279bb8a2ff6675ff074a0296497847cc7eae25daa02077af003438858783a6ad47d267130928000a894ed4d0275df5d2a7248a66755
|
7
|
+
data.tar.gz: 4b8b80d6046adba49bbe5502a7fb660f1ce694b05fa4d25503649303e1a41317a2976d215f09f7e89153e97a6329d3bf04742909087205f00362015a948deb57
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,27 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.0-alpha.42 (2025-09-09)
|
4
|
+
|
5
|
+
Full Changelog: [v0.1.0-alpha.41...v0.1.0-alpha.42](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.41...v0.1.0-alpha.42)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** adds support for unpauseing external bank accounts ([ad64d5d](https://github.com/lithic-com/lithic-ruby/commit/ad64d5d1cbd89b6d908f6a414b80004de94cb168))
|
10
|
+
|
11
|
+
## 0.1.0-alpha.41 (2025-09-03)
|
12
|
+
|
13
|
+
Full Changelog: [v0.1.0-alpha.40...v0.1.0-alpha.41](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.40...v0.1.0-alpha.41)
|
14
|
+
|
15
|
+
### Features
|
16
|
+
|
17
|
+
* **api:** adds support for delegated KYB onboarding and more device details in 3DS Authentications ([37126bc](https://github.com/lithic-com/lithic-ruby/commit/37126bc6c52176bee9e1a6c645a4033d7b48b81a))
|
18
|
+
|
19
|
+
|
20
|
+
### Chores
|
21
|
+
|
22
|
+
* add json schema comment for rubocop.yml ([d5f9cf9](https://github.com/lithic-com/lithic-ruby/commit/d5f9cf9a5a4b9c2450c9ac65c5ec0708466c8331))
|
23
|
+
* sync repo ([bc9dd5c](https://github.com/lithic-com/lithic-ruby/commit/bc9dd5c574eb24959f3760ff9bd9f3c5240064cc))
|
24
|
+
|
3
25
|
## 0.1.0-alpha.40 (2025-07-15)
|
4
26
|
|
5
27
|
Full Changelog: [v0.1.0-alpha.39...v0.1.0-alpha.40](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.39...v0.1.0-alpha.40)
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
15
15
|
<!-- x-release-please-start-version -->
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
gem "lithic", "~> 0.1.0.pre.alpha.
|
18
|
+
gem "lithic", "~> 0.1.0.pre.alpha.42"
|
19
19
|
```
|
20
20
|
|
21
21
|
<!-- x-release-please-end -->
|
data/lib/lithic/client.rb
CHANGED
@@ -107,6 +107,9 @@ module Lithic
|
|
107
107
|
# @return [Lithic::Resources::NetworkPrograms]
|
108
108
|
attr_reader :network_programs
|
109
109
|
|
110
|
+
# @return [Lithic::Resources::AccountActivity]
|
111
|
+
attr_reader :account_activity
|
112
|
+
|
110
113
|
# Status of api
|
111
114
|
#
|
112
115
|
# @overload api_status(request_options: {})
|
@@ -209,6 +212,7 @@ module Lithic
|
|
209
212
|
@funding_events = Lithic::Resources::FundingEvents.new(client: self)
|
210
213
|
@fraud = Lithic::Resources::Fraud.new(client: self)
|
211
214
|
@network_programs = Lithic::Resources::NetworkPrograms.new(client: self)
|
215
|
+
@account_activity = Lithic::Resources::AccountActivity.new(client: self)
|
212
216
|
end
|
213
217
|
end
|
214
218
|
end
|
@@ -365,7 +365,7 @@ module Lithic
|
|
365
365
|
#
|
366
366
|
# @raise [Lithic::Errors::APIError]
|
367
367
|
# @return [Array(Integer, Net::HTTPResponse, Enumerable<String>)]
|
368
|
-
|
368
|
+
def send_request(request, redirect_count:, retry_count:, send_retry_header:)
|
369
369
|
url, headers, max_retries, timeout = request.fetch_values(:url, :headers, :max_retries, :timeout)
|
370
370
|
input = {**request.except(:timeout), deadline: Lithic::Internal::Util.monotonic_secs + timeout}
|
371
371
|
|
@@ -193,15 +193,7 @@ module Lithic
|
|
193
193
|
end
|
194
194
|
|
195
195
|
define_sorbet_constant!(:Request) do
|
196
|
-
T.type_alias
|
197
|
-
{
|
198
|
-
method: Symbol,
|
199
|
-
url: URI::Generic,
|
200
|
-
headers: T::Hash[String, String],
|
201
|
-
body: T.anything,
|
202
|
-
deadline: Float
|
203
|
-
}
|
204
|
-
end
|
196
|
+
T.type_alias { {method: Symbol, url: URI::Generic, headers: T::Hash[String, String], body: T.anything, deadline: Float} }
|
205
197
|
end
|
206
198
|
end
|
207
199
|
end
|
@@ -148,6 +148,7 @@ module Lithic
|
|
148
148
|
# @option spec [Boolean] :"nil?"
|
149
149
|
def initialize(type_info, spec = {})
|
150
150
|
@item_type_fn = Lithic::Internal::Type::Converter.type_info(type_info || spec)
|
151
|
+
@meta = Lithic::Internal::Type::Converter.meta_info(type_info, spec)
|
151
152
|
@nilable = spec.fetch(:nil?, false)
|
152
153
|
end
|
153
154
|
|
@@ -52,6 +52,7 @@ module Lithic
|
|
52
52
|
#
|
53
53
|
# @option spec [Boolean] :"nil?"
|
54
54
|
private def add_field(name_sym, required:, type_info:, spec:)
|
55
|
+
meta = Lithic::Internal::Type::Converter.meta_info(type_info, spec)
|
55
56
|
type_fn, info =
|
56
57
|
case type_info
|
57
58
|
in Proc | Lithic::Internal::Type::Converter | Class
|
@@ -74,7 +75,8 @@ module Lithic
|
|
74
75
|
required: required,
|
75
76
|
nilable: nilable,
|
76
77
|
const: const,
|
77
|
-
type_fn: type_fn
|
78
|
+
type_fn: type_fn,
|
79
|
+
meta: meta
|
78
80
|
}
|
79
81
|
|
80
82
|
define_method(setter) do |value|
|
@@ -98,6 +98,33 @@ module Lithic
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
+
# @api private
|
102
|
+
#
|
103
|
+
# @param type_info [Hash{Symbol=>Object}, Proc, Lithic::Internal::Type::Converter, Class] .
|
104
|
+
#
|
105
|
+
# @option type_info [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
|
106
|
+
#
|
107
|
+
# @option type_info [Proc] :enum
|
108
|
+
#
|
109
|
+
# @option type_info [Proc] :union
|
110
|
+
#
|
111
|
+
# @option type_info [Boolean] :"nil?"
|
112
|
+
#
|
113
|
+
# @param spec [Hash{Symbol=>Object}, Proc, Lithic::Internal::Type::Converter, Class] .
|
114
|
+
#
|
115
|
+
# @option spec [NilClass, TrueClass, FalseClass, Integer, Float, Symbol] :const
|
116
|
+
#
|
117
|
+
# @option spec [Proc] :enum
|
118
|
+
#
|
119
|
+
# @option spec [Proc] :union
|
120
|
+
#
|
121
|
+
# @option spec [Boolean] :"nil?"
|
122
|
+
#
|
123
|
+
# @return [Hash{Symbol=>Object}]
|
124
|
+
def meta_info(type_info, spec)
|
125
|
+
[spec, type_info].grep(Hash).first.to_h.except(:const, :enum, :union, :nil?)
|
126
|
+
end
|
127
|
+
|
101
128
|
# @api private
|
102
129
|
#
|
103
130
|
# @param translate_names [Boolean]
|
@@ -168,6 +168,7 @@ module Lithic
|
|
168
168
|
# @option spec [Boolean] :"nil?"
|
169
169
|
def initialize(type_info, spec = {})
|
170
170
|
@item_type_fn = Lithic::Internal::Type::Converter.type_info(type_info || spec)
|
171
|
+
@meta = Lithic::Internal::Type::Converter.meta_info(type_info, spec)
|
171
172
|
@nilable = spec.fetch(:nil?, false)
|
172
173
|
end
|
173
174
|
|
@@ -23,20 +23,20 @@ module Lithic
|
|
23
23
|
#
|
24
24
|
# All of the specified variant info for this union.
|
25
25
|
#
|
26
|
-
# @return [Array<Array(Symbol, Proc)>]
|
26
|
+
# @return [Array<Array(Symbol, Proc, Hash{Symbol=>Object})>]
|
27
27
|
private def known_variants = (@known_variants ||= [])
|
28
28
|
|
29
29
|
# @api private
|
30
30
|
#
|
31
|
-
# @return [Array<Array(Symbol, Object)>]
|
31
|
+
# @return [Array<Array(Symbol, Object, Hash{Symbol=>Object})>]
|
32
32
|
protected def derefed_variants
|
33
|
-
known_variants.map { |key, variant_fn| [key, variant_fn.call] }
|
33
|
+
known_variants.map { |key, variant_fn, meta| [key, variant_fn.call, meta] }
|
34
34
|
end
|
35
35
|
|
36
36
|
# All of the specified variants for this union.
|
37
37
|
#
|
38
38
|
# @return [Array<Object>]
|
39
|
-
def variants = derefed_variants.map
|
39
|
+
def variants = derefed_variants.map { _2 }
|
40
40
|
|
41
41
|
# @api private
|
42
42
|
#
|
@@ -62,12 +62,13 @@ module Lithic
|
|
62
62
|
#
|
63
63
|
# @option spec [Boolean] :"nil?"
|
64
64
|
private def variant(key, spec = nil)
|
65
|
+
meta = Lithic::Internal::Type::Converter.meta_info(nil, spec)
|
65
66
|
variant_info =
|
66
67
|
case key
|
67
68
|
in Symbol
|
68
|
-
[key, Lithic::Internal::Type::Converter.type_info(spec)]
|
69
|
+
[key, Lithic::Internal::Type::Converter.type_info(spec), meta]
|
69
70
|
in Proc | Lithic::Internal::Type::Converter | Class | Hash
|
70
|
-
[nil, Lithic::Internal::Type::Converter.type_info(key)]
|
71
|
+
[nil, Lithic::Internal::Type::Converter.type_info(key), meta]
|
71
72
|
end
|
72
73
|
|
73
74
|
known_variants << variant_info
|
@@ -90,7 +91,8 @@ module Lithic
|
|
90
91
|
return nil if key == Lithic::Internal::OMIT
|
91
92
|
|
92
93
|
key = key.to_sym if key.is_a?(String)
|
93
|
-
known_variants.find { |k,| k == key }
|
94
|
+
_, found = known_variants.find { |k,| k == key }
|
95
|
+
found&.call
|
94
96
|
else
|
95
97
|
nil
|
96
98
|
end
|
data/lib/lithic/internal/util.rb
CHANGED
@@ -244,7 +244,7 @@ module Lithic
|
|
244
244
|
#
|
245
245
|
# @return [String]
|
246
246
|
def uri_origin(uri)
|
247
|
-
"#{uri.scheme}://#{uri.host}#{uri.port
|
247
|
+
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
|
248
248
|
end
|
249
249
|
|
250
250
|
# @api private
|
@@ -0,0 +1,158 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Lithic
|
4
|
+
module Models
|
5
|
+
# @see Lithic::Resources::AccountActivity#list
|
6
|
+
class AccountActivityListParams < Lithic::Internal::Type::BaseModel
|
7
|
+
extend Lithic::Internal::Type::RequestParameters::Converter
|
8
|
+
include Lithic::Internal::Type::RequestParameters
|
9
|
+
|
10
|
+
# @!attribute account_token
|
11
|
+
# Filter by account token
|
12
|
+
#
|
13
|
+
# @return [String, nil]
|
14
|
+
optional :account_token, String
|
15
|
+
|
16
|
+
# @!attribute begin_
|
17
|
+
# Date string in RFC 3339 format. Only entries created after the specified time
|
18
|
+
# will be included. UTC time zone.
|
19
|
+
#
|
20
|
+
# @return [Time, nil]
|
21
|
+
optional :begin_, Time
|
22
|
+
|
23
|
+
# @!attribute business_account_token
|
24
|
+
# Filter by business account token
|
25
|
+
#
|
26
|
+
# @return [String, nil]
|
27
|
+
optional :business_account_token, String
|
28
|
+
|
29
|
+
# @!attribute category
|
30
|
+
# Filter by transaction category
|
31
|
+
#
|
32
|
+
# @return [Symbol, Lithic::Models::AccountActivityListParams::Category, nil]
|
33
|
+
optional :category, enum: -> { Lithic::AccountActivityListParams::Category }
|
34
|
+
|
35
|
+
# @!attribute end_
|
36
|
+
# Date string in RFC 3339 format. Only entries created before the specified time
|
37
|
+
# will be included. UTC time zone.
|
38
|
+
#
|
39
|
+
# @return [Time, nil]
|
40
|
+
optional :end_, Time
|
41
|
+
|
42
|
+
# @!attribute ending_before
|
43
|
+
# A cursor representing an item's token before which a page of results should end.
|
44
|
+
# Used to retrieve the previous page of results before this item.
|
45
|
+
#
|
46
|
+
# @return [String, nil]
|
47
|
+
optional :ending_before, String
|
48
|
+
|
49
|
+
# @!attribute financial_account_token
|
50
|
+
# Filter by financial account token
|
51
|
+
#
|
52
|
+
# @return [String, nil]
|
53
|
+
optional :financial_account_token, String
|
54
|
+
|
55
|
+
# @!attribute page_size
|
56
|
+
# Page size (for pagination).
|
57
|
+
#
|
58
|
+
# @return [Integer, nil]
|
59
|
+
optional :page_size, Integer
|
60
|
+
|
61
|
+
# @!attribute result
|
62
|
+
# Filter by transaction result
|
63
|
+
#
|
64
|
+
# @return [Symbol, Lithic::Models::AccountActivityListParams::Result, nil]
|
65
|
+
optional :result, enum: -> { Lithic::AccountActivityListParams::Result }
|
66
|
+
|
67
|
+
# @!attribute starting_after
|
68
|
+
# A cursor representing an item's token after which a page of results should
|
69
|
+
# begin. Used to retrieve the next page of results after this item.
|
70
|
+
#
|
71
|
+
# @return [String, nil]
|
72
|
+
optional :starting_after, String
|
73
|
+
|
74
|
+
# @!attribute status
|
75
|
+
# Filter by transaction status
|
76
|
+
#
|
77
|
+
# @return [Symbol, Lithic::Models::AccountActivityListParams::Status, nil]
|
78
|
+
optional :status, enum: -> { Lithic::AccountActivityListParams::Status }
|
79
|
+
|
80
|
+
# @!method initialize(account_token: nil, begin_: nil, business_account_token: nil, category: nil, end_: nil, ending_before: nil, financial_account_token: nil, page_size: nil, result: nil, starting_after: nil, status: nil, request_options: {})
|
81
|
+
# Some parameter documentations has been truncated, see
|
82
|
+
# {Lithic::Models::AccountActivityListParams} for more details.
|
83
|
+
#
|
84
|
+
# @param account_token [String] Filter by account token
|
85
|
+
#
|
86
|
+
# @param begin_ [Time] Date string in RFC 3339 format. Only entries created after the specified time wi
|
87
|
+
#
|
88
|
+
# @param business_account_token [String] Filter by business account token
|
89
|
+
#
|
90
|
+
# @param category [Symbol, Lithic::Models::AccountActivityListParams::Category] Filter by transaction category
|
91
|
+
#
|
92
|
+
# @param end_ [Time] Date string in RFC 3339 format. Only entries created before the specified time w
|
93
|
+
#
|
94
|
+
# @param ending_before [String] A cursor representing an item's token before which a page of results should end.
|
95
|
+
#
|
96
|
+
# @param financial_account_token [String] Filter by financial account token
|
97
|
+
#
|
98
|
+
# @param page_size [Integer] Page size (for pagination).
|
99
|
+
#
|
100
|
+
# @param result [Symbol, Lithic::Models::AccountActivityListParams::Result] Filter by transaction result
|
101
|
+
#
|
102
|
+
# @param starting_after [String] A cursor representing an item's token after which a page of results should begin
|
103
|
+
#
|
104
|
+
# @param status [Symbol, Lithic::Models::AccountActivityListParams::Status] Filter by transaction status
|
105
|
+
#
|
106
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
|
107
|
+
|
108
|
+
# Filter by transaction category
|
109
|
+
module Category
|
110
|
+
extend Lithic::Internal::Type::Enum
|
111
|
+
|
112
|
+
ACH = :ACH
|
113
|
+
BALANCE_OR_FUNDING = :BALANCE_OR_FUNDING
|
114
|
+
CARD = :CARD
|
115
|
+
EXTERNAL_ACH = :EXTERNAL_ACH
|
116
|
+
EXTERNAL_CHECK = :EXTERNAL_CHECK
|
117
|
+
EXTERNAL_TRANSFER = :EXTERNAL_TRANSFER
|
118
|
+
EXTERNAL_WIRE = :EXTERNAL_WIRE
|
119
|
+
MANAGEMENT_ADJUSTMENT = :MANAGEMENT_ADJUSTMENT
|
120
|
+
MANAGEMENT_DISPUTE = :MANAGEMENT_DISPUTE
|
121
|
+
MANAGEMENT_FEE = :MANAGEMENT_FEE
|
122
|
+
MANAGEMENT_REWARD = :MANAGEMENT_REWARD
|
123
|
+
MANAGEMENT_DISBURSEMENT = :MANAGEMENT_DISBURSEMENT
|
124
|
+
PROGRAM_FUNDING = :PROGRAM_FUNDING
|
125
|
+
|
126
|
+
# @!method self.values
|
127
|
+
# @return [Array<Symbol>]
|
128
|
+
end
|
129
|
+
|
130
|
+
# Filter by transaction result
|
131
|
+
module Result
|
132
|
+
extend Lithic::Internal::Type::Enum
|
133
|
+
|
134
|
+
APPROVED = :APPROVED
|
135
|
+
DECLINED = :DECLINED
|
136
|
+
|
137
|
+
# @!method self.values
|
138
|
+
# @return [Array<Symbol>]
|
139
|
+
end
|
140
|
+
|
141
|
+
# Filter by transaction status
|
142
|
+
module Status
|
143
|
+
extend Lithic::Internal::Type::Enum
|
144
|
+
|
145
|
+
DECLINED = :DECLINED
|
146
|
+
EXPIRED = :EXPIRED
|
147
|
+
PENDING = :PENDING
|
148
|
+
RETURNED = :RETURNED
|
149
|
+
REVERSED = :REVERSED
|
150
|
+
SETTLED = :SETTLED
|
151
|
+
VOIDED = :VOIDED
|
152
|
+
|
153
|
+
# @!method self.values
|
154
|
+
# @return [Array<Symbol>]
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|