lithic 0.2.0 → 0.3.0

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.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +38 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +5 -10
  5. data/lib/lithic/internal/transport/pooled_net_requester.rb +12 -10
  6. data/lib/lithic/internal/util.rb +7 -2
  7. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +5 -0
  8. data/lib/lithic/models/book_transfer_retry_params.rb +26 -0
  9. data/lib/lithic/models/{asa_request_webhook_event.rb → card_authorization_approval_request_webhook_event.rb} +151 -129
  10. data/lib/lithic/models/external_payment_create_params.rb +15 -1
  11. data/lib/lithic/models/financial_account.rb +33 -25
  12. data/lib/lithic/models/financial_account_update_status_params.rb +9 -1
  13. data/lib/lithic/models/financial_accounts/loan_tape.rb +52 -3
  14. data/lib/lithic/models/management_operation_create_params.rb +6 -1
  15. data/lib/lithic/models/parsed_webhook_event.rb +3 -4
  16. data/lib/lithic/models/payment.rb +10 -1
  17. data/lib/lithic/models/three_ds_authentication_approval_request_webhook_event.rb +17 -0
  18. data/lib/lithic/models/transaction.rb +2 -0
  19. data/lib/lithic/models/transfer_limit_list_params.rb +22 -0
  20. data/lib/lithic/models/transfer_limits_response.rb +274 -0
  21. data/lib/lithic/models.rb +12 -6
  22. data/lib/lithic/resources/book_transfers.rb +27 -0
  23. data/lib/lithic/resources/cards.rb +1 -5
  24. data/lib/lithic/resources/external_payments.rb +13 -1
  25. data/lib/lithic/resources/financial_accounts.rb +3 -1
  26. data/lib/lithic/resources/management_operations.rb +4 -1
  27. data/lib/lithic/resources/transfer_limits.rb +37 -0
  28. data/lib/lithic/resources/webhooks.rb +3 -2
  29. data/lib/lithic/version.rb +1 -1
  30. data/lib/lithic.rb +6 -7
  31. data/rbi/lithic/client.rbi +3 -3
  32. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +11 -0
  33. data/rbi/lithic/models/book_transfer_retry_params.rbi +42 -0
  34. data/rbi/lithic/models/{asa_request_webhook_event.rbi → card_authorization_approval_request_webhook_event.rbi} +394 -256
  35. data/rbi/lithic/models/external_payment_create_params.rbi +4 -0
  36. data/rbi/lithic/models/financial_account.rbi +62 -54
  37. data/rbi/lithic/models/financial_account_update_status_params.rbi +11 -0
  38. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +93 -4
  39. data/rbi/lithic/models/management_operation_create_params.rbi +4 -0
  40. data/rbi/lithic/models/parsed_webhook_event.rbi +2 -2
  41. data/rbi/lithic/models/payment.rbi +13 -3
  42. data/rbi/lithic/models/three_ds_authentication_approval_request_webhook_event.rbi +27 -0
  43. data/rbi/lithic/models/transaction.rbi +10 -0
  44. data/rbi/lithic/models/transfer_limit_list_params.rbi +43 -0
  45. data/rbi/lithic/models/transfer_limits_response.rbi +604 -0
  46. data/rbi/lithic/models.rbi +12 -6
  47. data/rbi/lithic/resources/book_transfers.rbi +18 -0
  48. data/rbi/lithic/resources/cards.rbi +1 -4
  49. data/rbi/lithic/resources/external_payments.rbi +2 -0
  50. data/rbi/lithic/resources/financial_accounts.rbi +3 -0
  51. data/rbi/lithic/resources/management_operations.rbi +2 -0
  52. data/rbi/lithic/resources/transfer_limits.rbi +28 -0
  53. data/rbi/lithic/resources/webhooks.rbi +2 -124
  54. data/sig/lithic/client.rbs +2 -2
  55. data/sig/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbs +2 -0
  56. data/sig/lithic/models/book_transfer_retry_params.rbs +23 -0
  57. data/sig/lithic/models/{asa_request_webhook_event.rbs → card_authorization_approval_request_webhook_event.rbs} +161 -156
  58. data/sig/lithic/models/financial_account.rbs +32 -27
  59. data/sig/lithic/models/financial_account_update_status_params.rbs +8 -1
  60. data/sig/lithic/models/financial_accounts/loan_tape.rbs +46 -4
  61. data/sig/lithic/models/parsed_webhook_event.rbs +2 -2
  62. data/sig/lithic/models/payment.rbs +10 -3
  63. data/sig/lithic/models/three_ds_authentication_approval_request_webhook_event.rbs +22 -0
  64. data/sig/lithic/models/transaction.rbs +4 -0
  65. data/sig/lithic/models/transfer_limit_list_params.rbs +22 -0
  66. data/sig/lithic/models/transfer_limits_response.rbs +232 -0
  67. data/sig/lithic/models.rbs +10 -6
  68. data/sig/lithic/resources/book_transfers.rbs +6 -0
  69. data/sig/lithic/resources/cards.rbs +0 -2
  70. data/sig/lithic/resources/financial_accounts.rbs +1 -0
  71. data/sig/lithic/resources/transfer_limits.rbs +12 -0
  72. data/sig/lithic/resources/webhooks.rbs +2 -116
  73. metadata +20 -23
  74. data/lib/lithic/models/aggregate_balance.rb +0 -113
  75. data/lib/lithic/models/aggregate_balance_list_params.rb +0 -35
  76. data/lib/lithic/models/cards/aggregate_balance_list_params.rb +0 -32
  77. data/lib/lithic/models/cards/aggregate_balance_list_response.rb +0 -92
  78. data/lib/lithic/resources/aggregate_balances.rb +0 -38
  79. data/lib/lithic/resources/cards/aggregate_balances.rb +0 -41
  80. data/rbi/lithic/models/aggregate_balance.rbi +0 -164
  81. data/rbi/lithic/models/aggregate_balance_list_params.rbi +0 -104
  82. data/rbi/lithic/models/cards/aggregate_balance_list_params.rbi +0 -62
  83. data/rbi/lithic/models/cards/aggregate_balance_list_response.rbi +0 -115
  84. data/rbi/lithic/resources/aggregate_balances.rbi +0 -28
  85. data/rbi/lithic/resources/cards/aggregate_balances.rbi +0 -35
  86. data/sig/lithic/models/aggregate_balance.rbs +0 -78
  87. data/sig/lithic/models/aggregate_balance_list_params.rbs +0 -43
  88. data/sig/lithic/models/cards/aggregate_balance_list_params.rbs +0 -34
  89. data/sig/lithic/models/cards/aggregate_balance_list_response.rbs +0 -62
  90. data/sig/lithic/resources/aggregate_balances.rbs +0 -12
  91. data/sig/lithic/resources/cards/aggregate_balances.rbs +0 -15
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Lithic
4
- module Resources
5
- class AggregateBalances
6
- # Get the aggregated balance across all end-user accounts by financial account
7
- # type
8
- #
9
- # @overload list(financial_account_type: nil, request_options: {})
10
- #
11
- # @param financial_account_type [Symbol, Lithic::Models::AggregateBalanceListParams::FinancialAccountType] Get the aggregate balance for a given Financial Account type.
12
- #
13
- # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
14
- #
15
- # @return [Lithic::Internal::SinglePage<Lithic::Models::AggregateBalance>]
16
- #
17
- # @see Lithic::Models::AggregateBalanceListParams
18
- def list(params = {})
19
- parsed, options = Lithic::AggregateBalanceListParams.dump_request(params)
20
- @client.request(
21
- method: :get,
22
- path: "v1/aggregate_balances",
23
- query: parsed,
24
- page: Lithic::Internal::SinglePage,
25
- model: Lithic::AggregateBalance,
26
- options: options
27
- )
28
- end
29
-
30
- # @api private
31
- #
32
- # @param client [Lithic::Client]
33
- def initialize(client:)
34
- @client = client
35
- end
36
- end
37
- end
38
- end
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Lithic
4
- module Resources
5
- class Cards
6
- class AggregateBalances
7
- # Get the aggregated card balance across all end-user accounts.
8
- #
9
- # @overload list(account_token: nil, business_account_token: nil, request_options: {})
10
- #
11
- # @param account_token [String] Cardholder to retrieve aggregate balances for.
12
- #
13
- # @param business_account_token [String] Business to retrieve aggregate balances for.
14
- #
15
- # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
16
- #
17
- # @return [Lithic::Internal::SinglePage<Lithic::Models::Cards::AggregateBalanceListResponse>]
18
- #
19
- # @see Lithic::Models::Cards::AggregateBalanceListParams
20
- def list(params = {})
21
- parsed, options = Lithic::Cards::AggregateBalanceListParams.dump_request(params)
22
- @client.request(
23
- method: :get,
24
- path: "v1/cards/aggregate_balances",
25
- query: parsed,
26
- page: Lithic::Internal::SinglePage,
27
- model: Lithic::Models::Cards::AggregateBalanceListResponse,
28
- options: options
29
- )
30
- end
31
-
32
- # @api private
33
- #
34
- # @param client [Lithic::Client]
35
- def initialize(client:)
36
- @client = client
37
- end
38
- end
39
- end
40
- end
41
- end
@@ -1,164 +0,0 @@
1
- # typed: strong
2
-
3
- module Lithic
4
- module Models
5
- class AggregateBalance < Lithic::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(Lithic::AggregateBalance, Lithic::Internal::AnyHash)
9
- end
10
-
11
- # Funds available for spend in the currency's smallest unit (e.g., cents for USD)
12
- sig { returns(Integer) }
13
- attr_accessor :available_amount
14
-
15
- # Date and time for when the balance was first created.
16
- sig { returns(Time) }
17
- attr_accessor :created
18
-
19
- # 3-character alphabetic ISO 4217 code for the local currency of the balance.
20
- sig { returns(String) }
21
- attr_accessor :currency
22
-
23
- # Type of financial account
24
- sig do
25
- returns(Lithic::AggregateBalance::FinancialAccountType::TaggedSymbol)
26
- end
27
- attr_accessor :financial_account_type
28
-
29
- # Globally unique identifier for the financial account that had its balance
30
- # updated most recently
31
- sig { returns(String) }
32
- attr_accessor :last_financial_account_token
33
-
34
- # Globally unique identifier for the last transaction event that impacted this
35
- # balance
36
- sig { returns(String) }
37
- attr_accessor :last_transaction_event_token
38
-
39
- # Globally unique identifier for the last transaction that impacted this balance
40
- sig { returns(String) }
41
- attr_accessor :last_transaction_token
42
-
43
- # Funds not available for spend due to card authorizations or pending ACH release.
44
- # Shown in the currency's smallest unit (e.g., cents for USD)
45
- sig { returns(Integer) }
46
- attr_accessor :pending_amount
47
-
48
- # The sum of available and pending balance in the currency's smallest unit (e.g.,
49
- # cents for USD)
50
- sig { returns(Integer) }
51
- attr_accessor :total_amount
52
-
53
- # Date and time for when the balance was last updated.
54
- sig { returns(Time) }
55
- attr_accessor :updated
56
-
57
- # Aggregate Balance across all end-user accounts
58
- sig do
59
- params(
60
- available_amount: Integer,
61
- created: Time,
62
- currency: String,
63
- financial_account_type:
64
- Lithic::AggregateBalance::FinancialAccountType::OrSymbol,
65
- last_financial_account_token: String,
66
- last_transaction_event_token: String,
67
- last_transaction_token: String,
68
- pending_amount: Integer,
69
- total_amount: Integer,
70
- updated: Time
71
- ).returns(T.attached_class)
72
- end
73
- def self.new(
74
- # Funds available for spend in the currency's smallest unit (e.g., cents for USD)
75
- available_amount:,
76
- # Date and time for when the balance was first created.
77
- created:,
78
- # 3-character alphabetic ISO 4217 code for the local currency of the balance.
79
- currency:,
80
- # Type of financial account
81
- financial_account_type:,
82
- # Globally unique identifier for the financial account that had its balance
83
- # updated most recently
84
- last_financial_account_token:,
85
- # Globally unique identifier for the last transaction event that impacted this
86
- # balance
87
- last_transaction_event_token:,
88
- # Globally unique identifier for the last transaction that impacted this balance
89
- last_transaction_token:,
90
- # Funds not available for spend due to card authorizations or pending ACH release.
91
- # Shown in the currency's smallest unit (e.g., cents for USD)
92
- pending_amount:,
93
- # The sum of available and pending balance in the currency's smallest unit (e.g.,
94
- # cents for USD)
95
- total_amount:,
96
- # Date and time for when the balance was last updated.
97
- updated:
98
- )
99
- end
100
-
101
- sig do
102
- override.returns(
103
- {
104
- available_amount: Integer,
105
- created: Time,
106
- currency: String,
107
- financial_account_type:
108
- Lithic::AggregateBalance::FinancialAccountType::TaggedSymbol,
109
- last_financial_account_token: String,
110
- last_transaction_event_token: String,
111
- last_transaction_token: String,
112
- pending_amount: Integer,
113
- total_amount: Integer,
114
- updated: Time
115
- }
116
- )
117
- end
118
- def to_hash
119
- end
120
-
121
- # Type of financial account
122
- module FinancialAccountType
123
- extend Lithic::Internal::Type::Enum
124
-
125
- TaggedSymbol =
126
- T.type_alias do
127
- T.all(Symbol, Lithic::AggregateBalance::FinancialAccountType)
128
- end
129
- OrSymbol = T.type_alias { T.any(Symbol, String) }
130
-
131
- ISSUING =
132
- T.let(
133
- :ISSUING,
134
- Lithic::AggregateBalance::FinancialAccountType::TaggedSymbol
135
- )
136
- OPERATING =
137
- T.let(
138
- :OPERATING,
139
- Lithic::AggregateBalance::FinancialAccountType::TaggedSymbol
140
- )
141
- RESERVE =
142
- T.let(
143
- :RESERVE,
144
- Lithic::AggregateBalance::FinancialAccountType::TaggedSymbol
145
- )
146
- SECURITY =
147
- T.let(
148
- :SECURITY,
149
- Lithic::AggregateBalance::FinancialAccountType::TaggedSymbol
150
- )
151
-
152
- sig do
153
- override.returns(
154
- T::Array[
155
- Lithic::AggregateBalance::FinancialAccountType::TaggedSymbol
156
- ]
157
- )
158
- end
159
- def self.values
160
- end
161
- end
162
- end
163
- end
164
- end
@@ -1,104 +0,0 @@
1
- # typed: strong
2
-
3
- module Lithic
4
- module Models
5
- class AggregateBalanceListParams < 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(Lithic::AggregateBalanceListParams, Lithic::Internal::AnyHash)
12
- end
13
-
14
- # Get the aggregate balance for a given Financial Account type.
15
- sig do
16
- returns(
17
- T.nilable(
18
- Lithic::AggregateBalanceListParams::FinancialAccountType::OrSymbol
19
- )
20
- )
21
- end
22
- attr_reader :financial_account_type
23
-
24
- sig do
25
- params(
26
- financial_account_type:
27
- Lithic::AggregateBalanceListParams::FinancialAccountType::OrSymbol
28
- ).void
29
- end
30
- attr_writer :financial_account_type
31
-
32
- sig do
33
- params(
34
- financial_account_type:
35
- Lithic::AggregateBalanceListParams::FinancialAccountType::OrSymbol,
36
- request_options: Lithic::RequestOptions::OrHash
37
- ).returns(T.attached_class)
38
- end
39
- def self.new(
40
- # Get the aggregate balance for a given Financial Account type.
41
- financial_account_type: nil,
42
- request_options: {}
43
- )
44
- end
45
-
46
- sig do
47
- override.returns(
48
- {
49
- financial_account_type:
50
- Lithic::AggregateBalanceListParams::FinancialAccountType::OrSymbol,
51
- request_options: Lithic::RequestOptions
52
- }
53
- )
54
- end
55
- def to_hash
56
- end
57
-
58
- # Get the aggregate balance for a given Financial Account type.
59
- module FinancialAccountType
60
- extend Lithic::Internal::Type::Enum
61
-
62
- TaggedSymbol =
63
- T.type_alias do
64
- T.all(
65
- Symbol,
66
- Lithic::AggregateBalanceListParams::FinancialAccountType
67
- )
68
- end
69
- OrSymbol = T.type_alias { T.any(Symbol, String) }
70
-
71
- ISSUING =
72
- T.let(
73
- :ISSUING,
74
- Lithic::AggregateBalanceListParams::FinancialAccountType::TaggedSymbol
75
- )
76
- OPERATING =
77
- T.let(
78
- :OPERATING,
79
- Lithic::AggregateBalanceListParams::FinancialAccountType::TaggedSymbol
80
- )
81
- RESERVE =
82
- T.let(
83
- :RESERVE,
84
- Lithic::AggregateBalanceListParams::FinancialAccountType::TaggedSymbol
85
- )
86
- SECURITY =
87
- T.let(
88
- :SECURITY,
89
- Lithic::AggregateBalanceListParams::FinancialAccountType::TaggedSymbol
90
- )
91
-
92
- sig do
93
- override.returns(
94
- T::Array[
95
- Lithic::AggregateBalanceListParams::FinancialAccountType::TaggedSymbol
96
- ]
97
- )
98
- end
99
- def self.values
100
- end
101
- end
102
- end
103
- end
104
- end
@@ -1,62 +0,0 @@
1
- # typed: strong
2
-
3
- module Lithic
4
- module Models
5
- module Cards
6
- class AggregateBalanceListParams < Lithic::Internal::Type::BaseModel
7
- extend Lithic::Internal::Type::RequestParameters::Converter
8
- include Lithic::Internal::Type::RequestParameters
9
-
10
- OrHash =
11
- T.type_alias do
12
- T.any(
13
- Lithic::Cards::AggregateBalanceListParams,
14
- Lithic::Internal::AnyHash
15
- )
16
- end
17
-
18
- # Cardholder to retrieve aggregate balances for.
19
- sig { returns(T.nilable(String)) }
20
- attr_reader :account_token
21
-
22
- sig { params(account_token: String).void }
23
- attr_writer :account_token
24
-
25
- # Business to retrieve aggregate balances for.
26
- sig { returns(T.nilable(String)) }
27
- attr_reader :business_account_token
28
-
29
- sig { params(business_account_token: String).void }
30
- attr_writer :business_account_token
31
-
32
- sig do
33
- params(
34
- account_token: String,
35
- business_account_token: String,
36
- request_options: Lithic::RequestOptions::OrHash
37
- ).returns(T.attached_class)
38
- end
39
- def self.new(
40
- # Cardholder to retrieve aggregate balances for.
41
- account_token: nil,
42
- # Business to retrieve aggregate balances for.
43
- business_account_token: nil,
44
- request_options: {}
45
- )
46
- end
47
-
48
- sig do
49
- override.returns(
50
- {
51
- account_token: String,
52
- business_account_token: String,
53
- request_options: Lithic::RequestOptions
54
- }
55
- )
56
- end
57
- def to_hash
58
- end
59
- end
60
- end
61
- end
62
- end
@@ -1,115 +0,0 @@
1
- # typed: strong
2
-
3
- module Lithic
4
- module Models
5
- module Cards
6
- class AggregateBalanceListResponse < Lithic::Internal::Type::BaseModel
7
- OrHash =
8
- T.type_alias do
9
- T.any(
10
- Lithic::Models::Cards::AggregateBalanceListResponse,
11
- Lithic::Internal::AnyHash
12
- )
13
- end
14
-
15
- # Funds available for spend in the currency's smallest unit (e.g., cents for USD)
16
- sig { returns(Integer) }
17
- attr_accessor :available_amount
18
-
19
- # Date and time for when the balance was first created.
20
- sig { returns(Time) }
21
- attr_accessor :created
22
-
23
- # 3-character alphabetic ISO 4217 code for the local currency of the balance.
24
- sig { returns(String) }
25
- attr_accessor :currency
26
-
27
- # Globally unique identifier for the card that had its balance updated most
28
- # recently
29
- sig { returns(String) }
30
- attr_accessor :last_card_token
31
-
32
- # Globally unique identifier for the last transaction event that impacted this
33
- # balance
34
- sig { returns(String) }
35
- attr_accessor :last_transaction_event_token
36
-
37
- # Globally unique identifier for the last transaction that impacted this balance
38
- sig { returns(String) }
39
- attr_accessor :last_transaction_token
40
-
41
- # Funds not available for spend due to card authorizations or pending ACH release.
42
- # Shown in the currency's smallest unit (e.g., cents for USD)
43
- sig { returns(Integer) }
44
- attr_accessor :pending_amount
45
-
46
- # The sum of available and pending balance in the currency's smallest unit (e.g.,
47
- # cents for USD)
48
- sig { returns(Integer) }
49
- attr_accessor :total_amount
50
-
51
- # Date and time for when the balance was last updated.
52
- sig { returns(Time) }
53
- attr_accessor :updated
54
-
55
- # Card Aggregate Balance across all end-user accounts
56
- sig do
57
- params(
58
- available_amount: Integer,
59
- created: Time,
60
- currency: String,
61
- last_card_token: String,
62
- last_transaction_event_token: String,
63
- last_transaction_token: String,
64
- pending_amount: Integer,
65
- total_amount: Integer,
66
- updated: Time
67
- ).returns(T.attached_class)
68
- end
69
- def self.new(
70
- # Funds available for spend in the currency's smallest unit (e.g., cents for USD)
71
- available_amount:,
72
- # Date and time for when the balance was first created.
73
- created:,
74
- # 3-character alphabetic ISO 4217 code for the local currency of the balance.
75
- currency:,
76
- # Globally unique identifier for the card that had its balance updated most
77
- # recently
78
- last_card_token:,
79
- # Globally unique identifier for the last transaction event that impacted this
80
- # balance
81
- last_transaction_event_token:,
82
- # Globally unique identifier for the last transaction that impacted this balance
83
- last_transaction_token:,
84
- # Funds not available for spend due to card authorizations or pending ACH release.
85
- # Shown in the currency's smallest unit (e.g., cents for USD)
86
- pending_amount:,
87
- # The sum of available and pending balance in the currency's smallest unit (e.g.,
88
- # cents for USD)
89
- total_amount:,
90
- # Date and time for when the balance was last updated.
91
- updated:
92
- )
93
- end
94
-
95
- sig do
96
- override.returns(
97
- {
98
- available_amount: Integer,
99
- created: Time,
100
- currency: String,
101
- last_card_token: String,
102
- last_transaction_event_token: String,
103
- last_transaction_token: String,
104
- pending_amount: Integer,
105
- total_amount: Integer,
106
- updated: Time
107
- }
108
- )
109
- end
110
- def to_hash
111
- end
112
- end
113
- end
114
- end
115
- end
@@ -1,28 +0,0 @@
1
- # typed: strong
2
-
3
- module Lithic
4
- module Resources
5
- class AggregateBalances
6
- # Get the aggregated balance across all end-user accounts by financial account
7
- # type
8
- sig do
9
- params(
10
- financial_account_type:
11
- Lithic::AggregateBalanceListParams::FinancialAccountType::OrSymbol,
12
- request_options: Lithic::RequestOptions::OrHash
13
- ).returns(Lithic::Internal::SinglePage[Lithic::AggregateBalance])
14
- end
15
- def list(
16
- # Get the aggregate balance for a given Financial Account type.
17
- financial_account_type: nil,
18
- request_options: {}
19
- )
20
- end
21
-
22
- # @api private
23
- sig { params(client: Lithic::Client).returns(T.attached_class) }
24
- def self.new(client:)
25
- end
26
- end
27
- end
28
- end
@@ -1,35 +0,0 @@
1
- # typed: strong
2
-
3
- module Lithic
4
- module Resources
5
- class Cards
6
- class AggregateBalances
7
- # Get the aggregated card balance across all end-user accounts.
8
- sig do
9
- params(
10
- account_token: String,
11
- business_account_token: String,
12
- request_options: Lithic::RequestOptions::OrHash
13
- ).returns(
14
- Lithic::Internal::SinglePage[
15
- Lithic::Models::Cards::AggregateBalanceListResponse
16
- ]
17
- )
18
- end
19
- def list(
20
- # Cardholder to retrieve aggregate balances for.
21
- account_token: nil,
22
- # Business to retrieve aggregate balances for.
23
- business_account_token: nil,
24
- request_options: {}
25
- )
26
- end
27
-
28
- # @api private
29
- sig { params(client: Lithic::Client).returns(T.attached_class) }
30
- def self.new(client:)
31
- end
32
- end
33
- end
34
- end
35
- end
@@ -1,78 +0,0 @@
1
- module Lithic
2
- module Models
3
- type aggregate_balance =
4
- {
5
- available_amount: Integer,
6
- created: Time,
7
- currency: String,
8
- financial_account_type: Lithic::Models::AggregateBalance::financial_account_type,
9
- last_financial_account_token: String,
10
- last_transaction_event_token: String,
11
- last_transaction_token: String,
12
- pending_amount: Integer,
13
- total_amount: Integer,
14
- updated: Time
15
- }
16
-
17
- class AggregateBalance < Lithic::Internal::Type::BaseModel
18
- attr_accessor available_amount: Integer
19
-
20
- attr_accessor created: Time
21
-
22
- attr_accessor currency: String
23
-
24
- attr_accessor financial_account_type: Lithic::Models::AggregateBalance::financial_account_type
25
-
26
- attr_accessor last_financial_account_token: String
27
-
28
- attr_accessor last_transaction_event_token: String
29
-
30
- attr_accessor last_transaction_token: String
31
-
32
- attr_accessor pending_amount: Integer
33
-
34
- attr_accessor total_amount: Integer
35
-
36
- attr_accessor updated: Time
37
-
38
- def initialize: (
39
- available_amount: Integer,
40
- created: Time,
41
- currency: String,
42
- financial_account_type: Lithic::Models::AggregateBalance::financial_account_type,
43
- last_financial_account_token: String,
44
- last_transaction_event_token: String,
45
- last_transaction_token: String,
46
- pending_amount: Integer,
47
- total_amount: Integer,
48
- updated: Time
49
- ) -> void
50
-
51
- def to_hash: -> {
52
- available_amount: Integer,
53
- created: Time,
54
- currency: String,
55
- financial_account_type: Lithic::Models::AggregateBalance::financial_account_type,
56
- last_financial_account_token: String,
57
- last_transaction_event_token: String,
58
- last_transaction_token: String,
59
- pending_amount: Integer,
60
- total_amount: Integer,
61
- updated: Time
62
- }
63
-
64
- type financial_account_type = :ISSUING | :OPERATING | :RESERVE | :SECURITY
65
-
66
- module FinancialAccountType
67
- extend Lithic::Internal::Type::Enum
68
-
69
- ISSUING: :ISSUING
70
- OPERATING: :OPERATING
71
- RESERVE: :RESERVE
72
- SECURITY: :SECURITY
73
-
74
- def self?.values: -> ::Array[Lithic::Models::AggregateBalance::financial_account_type]
75
- end
76
- end
77
- end
78
- end