lithic 0.1.0.pre.alpha.39 → 0.1.0.pre.alpha.41
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 +24 -0
- data/README.md +1 -1
- data/lib/lithic/client.rb +8 -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.rb +88 -1
- data/lib/lithic/models/account_activity_list_params.rb +156 -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/account_update_params.rb +86 -1
- data/lib/lithic/models/aggregate_balance.rb +1 -0
- data/lib/lithic/models/aggregate_balance_list_params.rb +1 -0
- data/lib/lithic/models/auth_rules/auth_rule_condition.rb +5 -1
- data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +12 -22
- data/lib/lithic/models/auth_rules/v2_list_params.rb +1 -0
- data/lib/lithic/models/auth_rules/velocity_limit_params.rb +3 -25
- data/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rb +226 -16
- data/lib/lithic/models/balance.rb +1 -0
- data/lib/lithic/models/balance_list_params.rb +1 -0
- 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/card_create_params.rb +90 -1
- data/lib/lithic/models/card_program.rb +10 -1
- data/lib/lithic/models/card_update_params.rb +98 -1
- data/lib/lithic/models/cards/balance_list_response.rb +1 -0
- data/lib/lithic/models/document.rb +1 -3
- data/lib/lithic/models/events/subscription_create_params.rb +1 -3
- data/lib/lithic/models/events/subscription_update_params.rb +1 -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/external_resource.rb +34 -0
- data/lib/lithic/models/external_resource_type.rb +18 -0
- data/lib/lithic/models/financial_account.rb +1 -0
- data/lib/lithic/models/financial_account_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/balance_list_response.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_create_params.rb +30 -1
- data/lib/lithic/models/management_operation_transaction.rb +100 -52
- data/lib/lithic/models/network_program.rb +41 -0
- data/lib/lithic/models/network_program_list_params.rb +43 -0
- data/lib/lithic/models/network_program_retrieve_params.rb +14 -0
- data/lib/lithic/models/non_pci_card.rb +88 -1
- data/lib/lithic/models/payment.rb +60 -1
- data/lib/lithic/models/payment_simulate_action_params.rb +1 -0
- 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 +145 -12
- 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 +31 -20
- 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 +16 -0
- data/lib/lithic/resources/account_activity.rb +80 -0
- data/lib/lithic/resources/account_holders.rb +9 -9
- data/lib/lithic/resources/accounts.rb +5 -1
- data/lib/lithic/resources/book_transfers.rb +7 -3
- data/lib/lithic/resources/cards.rb +12 -2
- data/lib/lithic/resources/management_operations.rb +13 -1
- data/lib/lithic/resources/network_programs.rb +64 -0
- 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 +13 -2
- data/rbi/lithic/client.rbi +6 -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.rbi +131 -0
- data/rbi/lithic/models/account_activity_list_params.rbi +359 -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/account_update_params.rbi +159 -0
- data/rbi/lithic/models/aggregate_balance.rbi +5 -0
- data/rbi/lithic/models/aggregate_balance_list_params.rbi +5 -0
- data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +20 -0
- data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +26 -15
- data/rbi/lithic/models/auth_rules/v2_list_params.rbi +2 -0
- data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +18 -25
- data/rbi/lithic/models/auth_rules/velocity_limit_params_period_window.rbi +527 -31
- data/rbi/lithic/models/balance.rbi +2 -0
- data/rbi/lithic/models/balance_list_params.rbi +5 -0
- 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/card_create_params.rbi +190 -0
- data/rbi/lithic/models/card_program.rbi +13 -0
- data/rbi/lithic/models/card_update_params.rbi +168 -0
- data/rbi/lithic/models/cards/balance_list_response.rbi +5 -0
- data/rbi/lithic/models/external_payment.rbi +147 -60
- data/rbi/lithic/models/external_resource.rbi +57 -0
- data/rbi/lithic/models/external_resource_type.rbi +26 -0
- data/rbi/lithic/models/financial_account.rbi +5 -0
- data/rbi/lithic/models/financial_account_list_params.rbi +5 -0
- data/rbi/lithic/models/financial_accounts/balance_list_response.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_create_params.rbi +59 -0
- data/rbi/lithic/models/management_operation_transaction.rbi +230 -84
- data/rbi/lithic/models/network_program.rbi +61 -0
- data/rbi/lithic/models/network_program_list_params.rbi +72 -0
- data/rbi/lithic/models/network_program_retrieve_params.rbi +27 -0
- data/rbi/lithic/models/non_pci_card.rbi +133 -3
- data/rbi/lithic/models/payment.rbi +103 -3
- data/rbi/lithic/models/payment_simulate_action_params.rbi +5 -0
- 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 +222 -19
- data/rbi/lithic/models/transaction.rbi +23 -31
- data/rbi/lithic/models/transfer.rbi +1 -0
- data/rbi/lithic/models/wire_party_details.rbi +61 -0
- data/rbi/lithic/models.rbi +17 -0
- data/rbi/lithic/resources/account_activity.rbi +80 -0
- data/rbi/lithic/resources/account_holders.rbi +28 -29
- data/rbi/lithic/resources/accounts.rbi +32 -0
- data/rbi/lithic/resources/book_transfers.rbi +9 -2
- data/rbi/lithic/resources/cards.rbi +70 -0
- data/rbi/lithic/resources/management_operations.rbi +4 -0
- data/rbi/lithic/resources/network_programs.rbi +48 -0
- data/rbi/lithic/resources/reports/settlement.rbi +1 -1
- data/rbi/lithic/resources/tokenizations.rbi +1 -1
- data/sig/lithic/client.rbs +4 -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.rbs +41 -0
- 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/account_update_params.rbs +41 -0
- data/sig/lithic/models/aggregate_balance.rbs +2 -1
- data/sig/lithic/models/aggregate_balance_list_params.rbs +2 -1
- 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_list_params.rbs +2 -1
- data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +4 -14
- data/sig/lithic/models/auth_rules/velocity_limit_params_period_window.rbs +212 -7
- data/sig/lithic/models/balance.rbs +2 -1
- data/sig/lithic/models/balance_list_params.rbs +2 -1
- 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/card_create_params.rbs +47 -0
- data/sig/lithic/models/card_program.rbs +7 -0
- data/sig/lithic/models/card_update_params.rbs +55 -1
- data/sig/lithic/models/cards/balance_list_response.rbs +2 -1
- data/sig/lithic/models/external_payment.rbs +91 -40
- data/sig/lithic/models/external_resource.rbs +32 -0
- data/sig/lithic/models/external_resource_type.rbs +16 -0
- data/sig/lithic/models/financial_account.rbs +2 -0
- data/sig/lithic/models/financial_account_list_params.rbs +2 -1
- data/sig/lithic/models/financial_accounts/balance_list_response.rbs +2 -1
- data/sig/lithic/models/instance_financial_account_type.rbs +2 -0
- data/sig/lithic/models/management_operation_create_params.rbs +20 -0
- data/sig/lithic/models/management_operation_transaction.rbs +98 -42
- data/sig/lithic/models/network_program.rbs +35 -0
- data/sig/lithic/models/network_program_list_params.rbs +38 -0
- data/sig/lithic/models/network_program_retrieve_params.rbs +15 -0
- data/sig/lithic/models/non_pci_card.rbs +55 -3
- data/sig/lithic/models/payment.rbs +61 -3
- data/sig/lithic/models/payment_simulate_action_params.rbs +2 -0
- data/sig/lithic/models/settlement_detail.rbs +2 -0
- data/sig/lithic/models/three_ds/authentication_retrieve_response.rbs +90 -3
- data/sig/lithic/models/transaction.rbs +2 -6
- data/sig/lithic/models/wire_party_details.rbs +35 -0
- data/sig/lithic/models.rbs +16 -0
- data/sig/lithic/resources/account_activity.rbs +27 -0
- data/sig/lithic/resources/account_holders.rbs +3 -3
- data/sig/lithic/resources/accounts.rbs +2 -0
- data/sig/lithic/resources/book_transfers.rbs +2 -0
- data/sig/lithic/resources/cards.rbs +5 -0
- data/sig/lithic/resources/management_operations.rbs +1 -0
- data/sig/lithic/resources/network_programs.rbs +19 -0
- data/sig/lithic/resources/tokenizations.rbs +1 -1
- metadata +38 -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: a208b34c598732ce4f147c6e0a3ae38ef6adebe54875becd3b460ce855ff60e3
|
4
|
+
data.tar.gz: e3e81b2a51a92df94ea610568991df2d7df601637a983aaa4a8b1f98af89cdd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cb88495ccbb5f4778c68fa55df15f0ff9a8f3cdddb8a2c6578a8649a409c977a23596f93780e2df064b2825ef71e655e48a3d325b62b34d6c9a2670eed13424
|
7
|
+
data.tar.gz: fe8ad4d5e0f88b3eaf0f9d407d2a6303fe3c22fd6b7ee0f8dc742cc0460123c589b2bf1ee29ddb54f3793e1d3dbeaf4fec69d447d263a7f375687e8dc456a6c4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.1.0-alpha.41 (2025-09-03)
|
4
|
+
|
5
|
+
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)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** adds support for delegated KYB onboarding and more device details in 3DS Authentications ([37126bc](https://github.com/lithic-com/lithic-ruby/commit/37126bc6c52176bee9e1a6c645a4033d7b48b81a))
|
10
|
+
|
11
|
+
|
12
|
+
### Chores
|
13
|
+
|
14
|
+
* add json schema comment for rubocop.yml ([d5f9cf9](https://github.com/lithic-com/lithic-ruby/commit/d5f9cf9a5a4b9c2450c9ac65c5ec0708466c8331))
|
15
|
+
* sync repo ([bc9dd5c](https://github.com/lithic-com/lithic-ruby/commit/bc9dd5c574eb24959f3760ff9bd9f3c5240064cc))
|
16
|
+
|
17
|
+
## 0.1.0-alpha.40 (2025-07-15)
|
18
|
+
|
19
|
+
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)
|
20
|
+
|
21
|
+
### Features
|
22
|
+
|
23
|
+
* **api:** adds Network Programs and Account/Card Sub-statuses ([b5e5077](https://github.com/lithic-com/lithic-ruby/commit/b5e5077794684767a425d31f746cee2ed69d8ba7))
|
24
|
+
* **api:** api update ([b8de03e](https://github.com/lithic-com/lithic-ruby/commit/b8de03e418647489f4e34b4a55ca4256f34c52fe))
|
25
|
+
* **api:** api update ([72d4aab](https://github.com/lithic-com/lithic-ruby/commit/72d4aabb27fe144144c10899e64c863785d6595b))
|
26
|
+
|
3
27
|
## 0.1.0-alpha.39 (2025-07-03)
|
4
28
|
|
5
29
|
Full Changelog: [v0.1.0-alpha.38...v0.1.0-alpha.39](https://github.com/lithic-com/lithic-ruby/compare/v0.1.0-alpha.38...v0.1.0-alpha.39)
|
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.41"
|
19
19
|
```
|
20
20
|
|
21
21
|
<!-- x-release-please-end -->
|
data/lib/lithic/client.rb
CHANGED
@@ -104,6 +104,12 @@ module Lithic
|
|
104
104
|
# @return [Lithic::Resources::Fraud]
|
105
105
|
attr_reader :fraud
|
106
106
|
|
107
|
+
# @return [Lithic::Resources::NetworkPrograms]
|
108
|
+
attr_reader :network_programs
|
109
|
+
|
110
|
+
# @return [Lithic::Resources::AccountActivity]
|
111
|
+
attr_reader :account_activity
|
112
|
+
|
107
113
|
# Status of api
|
108
114
|
#
|
109
115
|
# @overload api_status(request_options: {})
|
@@ -205,6 +211,8 @@ module Lithic
|
|
205
211
|
@management_operations = Lithic::Resources::ManagementOperations.new(client: self)
|
206
212
|
@funding_events = Lithic::Resources::FundingEvents.new(client: self)
|
207
213
|
@fraud = Lithic::Resources::Fraud.new(client: self)
|
214
|
+
@network_programs = Lithic::Resources::NetworkPrograms.new(client: self)
|
215
|
+
@account_activity = Lithic::Resources::AccountActivity.new(client: self)
|
208
216
|
end
|
209
217
|
end
|
210
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
|
@@ -66,13 +66,51 @@ module Lithic
|
|
66
66
|
# @return [String, nil]
|
67
67
|
optional :cardholder_currency, String
|
68
68
|
|
69
|
+
# @!attribute comment
|
70
|
+
# Additional context or information related to the account.
|
71
|
+
#
|
72
|
+
# @return [String, nil]
|
73
|
+
optional :comment, String
|
74
|
+
|
75
|
+
# @!attribute substatus
|
76
|
+
# Account state substatus values:
|
77
|
+
#
|
78
|
+
# - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used
|
79
|
+
# with stolen or fabricated identity information, encompassing both true
|
80
|
+
# identity theft and synthetic identities.
|
81
|
+
# - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
|
82
|
+
# unauthorized access or fraudulent transactions, necessitating further
|
83
|
+
# investigation.
|
84
|
+
# - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
|
85
|
+
# legitimate account holder. Examples include disputing valid transactions
|
86
|
+
# without cause, falsely claiming non-receipt of goods, or engaging in
|
87
|
+
# intentional bust-out schemes to exploit account services.
|
88
|
+
# - `END_USER_REQUEST` - The account holder has voluntarily requested the closure
|
89
|
+
# of the account for personal reasons. This encompasses situations such as
|
90
|
+
# bankruptcy, other financial considerations, or the account holder's death.
|
91
|
+
# - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
|
92
|
+
# business strategy, risk management, inactivity, product changes, regulatory
|
93
|
+
# concerns, or violations of terms and conditions.
|
94
|
+
# - `NOT_ACTIVE` - The account has not had any transactions or payment activity
|
95
|
+
# within a specified period. This status applies to accounts that are paused or
|
96
|
+
# closed due to inactivity.
|
97
|
+
# - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
|
98
|
+
# review. In future implementations, this status may prevent clients from
|
99
|
+
# activating the account via APIs until the review is completed.
|
100
|
+
# - `OTHER` - The reason for the account's current status does not fall into any
|
101
|
+
# of the above categories. A comment should be provided to specify the
|
102
|
+
# particular reason.
|
103
|
+
#
|
104
|
+
# @return [Symbol, Lithic::Models::Account::Substatus, nil]
|
105
|
+
optional :substatus, enum: -> { Lithic::Account::Substatus }
|
106
|
+
|
69
107
|
# @!attribute verification_address
|
70
108
|
# @deprecated
|
71
109
|
#
|
72
110
|
# @return [Lithic::Models::Account::VerificationAddress, nil]
|
73
111
|
optional :verification_address, -> { Lithic::Account::VerificationAddress }
|
74
112
|
|
75
|
-
# @!method initialize(token:, created:, spend_limit:, state:, account_holder: nil, auth_rule_tokens: nil, cardholder_currency: nil, verification_address: nil)
|
113
|
+
# @!method initialize(token:, created:, spend_limit:, state:, account_holder: nil, auth_rule_tokens: nil, cardholder_currency: nil, comment: nil, substatus: nil, verification_address: nil)
|
76
114
|
# Some parameter documentations has been truncated, see {Lithic::Models::Account}
|
77
115
|
# for more details.
|
78
116
|
#
|
@@ -90,6 +128,10 @@ module Lithic
|
|
90
128
|
#
|
91
129
|
# @param cardholder_currency [String] 3-character alphabetic ISO 4217 code for the currency of the cardholder.
|
92
130
|
#
|
131
|
+
# @param comment [String] Additional context or information related to the account.
|
132
|
+
#
|
133
|
+
# @param substatus [Symbol, Lithic::Models::Account::Substatus] Account state substatus values:
|
134
|
+
#
|
93
135
|
# @param verification_address [Lithic::Models::Account::VerificationAddress]
|
94
136
|
|
95
137
|
# @see Lithic::Models::Account#spend_limit
|
@@ -191,6 +233,51 @@ module Lithic
|
|
191
233
|
# @param phone_number [String] Phone number of the individual.
|
192
234
|
end
|
193
235
|
|
236
|
+
# Account state substatus values:
|
237
|
+
#
|
238
|
+
# - `FRAUD_IDENTIFIED` - The account has been recognized as being created or used
|
239
|
+
# with stolen or fabricated identity information, encompassing both true
|
240
|
+
# identity theft and synthetic identities.
|
241
|
+
# - `SUSPICIOUS_ACTIVITY` - The account has exhibited suspicious behavior, such as
|
242
|
+
# unauthorized access or fraudulent transactions, necessitating further
|
243
|
+
# investigation.
|
244
|
+
# - `RISK_VIOLATION` - The account has been involved in deliberate misuse by the
|
245
|
+
# legitimate account holder. Examples include disputing valid transactions
|
246
|
+
# without cause, falsely claiming non-receipt of goods, or engaging in
|
247
|
+
# intentional bust-out schemes to exploit account services.
|
248
|
+
# - `END_USER_REQUEST` - The account holder has voluntarily requested the closure
|
249
|
+
# of the account for personal reasons. This encompasses situations such as
|
250
|
+
# bankruptcy, other financial considerations, or the account holder's death.
|
251
|
+
# - `ISSUER_REQUEST` - The issuer has initiated the closure of the account due to
|
252
|
+
# business strategy, risk management, inactivity, product changes, regulatory
|
253
|
+
# concerns, or violations of terms and conditions.
|
254
|
+
# - `NOT_ACTIVE` - The account has not had any transactions or payment activity
|
255
|
+
# within a specified period. This status applies to accounts that are paused or
|
256
|
+
# closed due to inactivity.
|
257
|
+
# - `INTERNAL_REVIEW` - The account is temporarily paused pending further internal
|
258
|
+
# review. In future implementations, this status may prevent clients from
|
259
|
+
# activating the account via APIs until the review is completed.
|
260
|
+
# - `OTHER` - The reason for the account's current status does not fall into any
|
261
|
+
# of the above categories. A comment should be provided to specify the
|
262
|
+
# particular reason.
|
263
|
+
#
|
264
|
+
# @see Lithic::Models::Account#substatus
|
265
|
+
module Substatus
|
266
|
+
extend Lithic::Internal::Type::Enum
|
267
|
+
|
268
|
+
FRAUD_IDENTIFIED = :FRAUD_IDENTIFIED
|
269
|
+
SUSPICIOUS_ACTIVITY = :SUSPICIOUS_ACTIVITY
|
270
|
+
RISK_VIOLATION = :RISK_VIOLATION
|
271
|
+
END_USER_REQUEST = :END_USER_REQUEST
|
272
|
+
ISSUER_REQUEST = :ISSUER_REQUEST
|
273
|
+
NOT_ACTIVE = :NOT_ACTIVE
|
274
|
+
INTERNAL_REVIEW = :INTERNAL_REVIEW
|
275
|
+
OTHER = :OTHER
|
276
|
+
|
277
|
+
# @!method self.values
|
278
|
+
# @return [Array<Symbol>]
|
279
|
+
end
|
280
|
+
|
194
281
|
# @deprecated
|
195
282
|
#
|
196
283
|
# @see Lithic::Models::Account#verification_address
|
@@ -0,0 +1,156 @@
|
|
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 [Array<Symbol, Lithic::Models::AccountActivityListParams::Result>, nil]
|
65
|
+
optional :result, -> { Lithic::Internal::Type::ArrayOf[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 [Array<Symbol, Lithic::Models::AccountActivityListParams::Status>, nil]
|
78
|
+
optional :status, -> { Lithic::Internal::Type::ArrayOf[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 [Array<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 [Array<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
|
+
module Result
|
131
|
+
extend Lithic::Internal::Type::Enum
|
132
|
+
|
133
|
+
APPROVED = :APPROVED
|
134
|
+
DECLINED = :DECLINED
|
135
|
+
|
136
|
+
# @!method self.values
|
137
|
+
# @return [Array<Symbol>]
|
138
|
+
end
|
139
|
+
|
140
|
+
module Status
|
141
|
+
extend Lithic::Internal::Type::Enum
|
142
|
+
|
143
|
+
DECLINED = :DECLINED
|
144
|
+
EXPIRED = :EXPIRED
|
145
|
+
PENDING = :PENDING
|
146
|
+
SETTLED = :SETTLED
|
147
|
+
VOIDED = :VOIDED
|
148
|
+
RETURNED = :RETURNED
|
149
|
+
REVERSED = :REVERSED
|
150
|
+
|
151
|
+
# @!method self.values
|
152
|
+
# @return [Array<Symbol>]
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|