Skip to content

Commit e13a88c

Browse files
fix(types): make fields nullable across balance/statement/settlement/etc, add enum values
1 parent ee7c854 commit e13a88c

27 files changed

Lines changed: 252 additions & 269 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 194
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-659808bfd15f4eafd418ec0db871b22be857ca94f771c9539792ecda2d2d0dbe.yml
3-
openapi_spec_hash: e870e6403121ac3bbd1667deec6788de
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-89ce5b3ff634397bdfc05a63d3103b9c767726dfc6b042883d220d08d4156c99.yml
3+
openapi_spec_hash: 867ab9ab196ad28740f46ec4e7bf7aba
44
config_hash: 1c5c139a2aa0d1d45c063f953a9bc803

lib/lithic/models/balance.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ class Balance < Lithic::Internal::Type::BaseModel
3838
# Globally unique identifier for the last financial transaction event that
3939
# impacted this balance.
4040
#
41-
# @return [String]
42-
required :last_transaction_event_token, String
41+
# @return [String, nil]
42+
required :last_transaction_event_token, String, nil?: true
4343

4444
# @!attribute last_transaction_token
4545
# Globally unique identifier for the last financial transaction that impacted this
4646
# balance.
4747
#
48-
# @return [String]
49-
required :last_transaction_token, String
48+
# @return [String, nil]
49+
required :last_transaction_token, String, nil?: true
5050

5151
# @!attribute pending_amount
5252
# Funds not available for spend due to card authorizations or pending ACH release.
@@ -84,9 +84,9 @@ class Balance < Lithic::Internal::Type::BaseModel
8484
#
8585
# @param financial_account_type [Symbol, Lithic::Models::Balance::FinancialAccountType] Type of financial account.
8686
#
87-
# @param last_transaction_event_token [String] Globally unique identifier for the last financial transaction event that impacte
87+
# @param last_transaction_event_token [String, nil] Globally unique identifier for the last financial transaction event that impacte
8888
#
89-
# @param last_transaction_token [String] Globally unique identifier for the last financial transaction that impacted this
89+
# @param last_transaction_token [String, nil] Globally unique identifier for the last financial transaction that impacted this
9090
#
9191
# @param pending_amount [Integer] Funds not available for spend due to card authorizations or pending ACH release.
9292
#
@@ -100,8 +100,10 @@ class Balance < Lithic::Internal::Type::BaseModel
100100
module FinancialAccountType
101101
extend Lithic::Internal::Type::Enum
102102

103+
CARD = :CARD
103104
ISSUING = :ISSUING
104105
OPERATING = :OPERATING
106+
PROGRAM_RECEIVABLES = :PROGRAM_RECEIVABLES
105107
RESERVE = :RESERVE
106108
SECURITY = :SECURITY
107109

lib/lithic/models/financial_accounts/statement.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ class Statement < Lithic::Internal::Type::BaseModel
118118
# Date when the next payment is due
119119
#
120120
# @return [Date, nil]
121-
optional :next_payment_due_date, Date
121+
optional :next_payment_due_date, Date, nil?: true
122122

123123
# @!attribute next_statement_end_date
124124
# Date when the next billing period will end
125125
#
126126
# @return [Date, nil]
127-
optional :next_statement_end_date, Date
127+
optional :next_statement_end_date, Date, nil?: true
128128

129129
# @!attribute payoff_details
130130
# Details on number and size of payments to pay off balance
@@ -179,9 +179,9 @@ class Statement < Lithic::Internal::Type::BaseModel
179179
#
180180
# @param interest_details [Lithic::Models::FinancialAccounts::Statement::InterestDetails, nil]
181181
#
182-
# @param next_payment_due_date [Date] Date when the next payment is due
182+
# @param next_payment_due_date [Date, nil] Date when the next payment is due
183183
#
184-
# @param next_statement_end_date [Date] Date when the next billing period will end
184+
# @param next_statement_end_date [Date, nil] Date when the next billing period will end
185185
#
186186
# @param payoff_details [Lithic::Models::FinancialAccounts::Statement::PayoffDetails, nil] Details on number and size of payments to pay off balance
187187
#

lib/lithic/models/financial_accounts/statements/statement_line_items.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Data < Lithic::Internal::Type::BaseModel
8888
# Globally unique identifier for a card
8989
#
9090
# @return [String, nil]
91-
optional :card_token, String
91+
optional :card_token, String, nil?: true
9292

9393
# @!attribute descriptor
9494
#
@@ -132,7 +132,7 @@ class Data < Lithic::Internal::Type::BaseModel
132132
#
133133
# @param financial_transaction_token [String] Globally unique identifier for a financial transaction
134134
#
135-
# @param card_token [String] Globally unique identifier for a card
135+
# @param card_token [String, nil] Globally unique identifier for a card
136136
#
137137
# @param descriptor [String]
138138
#
@@ -266,6 +266,7 @@ module EventType
266266
QUARTERLY_REVERSAL = :QUARTERLY_REVERSAL
267267
MONTHLY = :MONTHLY
268268
MONTHLY_REVERSAL = :MONTHLY_REVERSAL
269+
ACCOUNT_TO_ACCOUNT = :ACCOUNT_TO_ACCOUNT
269270

270271
# @!method self.values
271272
# @return [Array<Symbol>]

lib/lithic/models/financial_event.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ module Type
155155
QUARTERLY_REVERSAL = :QUARTERLY_REVERSAL
156156
MONTHLY = :MONTHLY
157157
MONTHLY_REVERSAL = :MONTHLY_REVERSAL
158+
ACCOUNT_TO_ACCOUNT = :ACCOUNT_TO_ACCOUNT
158159

159160
# @!method self.values
160161
# @return [Array<Symbol>]

lib/lithic/models/settlement_detail.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel
1313
# Globally unique identifier denoting the account that the associated transaction
1414
# occurred on.
1515
#
16-
# @return [String]
17-
required :account_token, String
16+
# @return [String, nil]
17+
required :account_token, String, nil?: true
1818

1919
# @!attribute card_program_token
2020
# Globally unique identifier denoting the card program that the associated
2121
# transaction occurred on.
2222
#
23-
# @return [String]
24-
required :card_program_token, String
23+
# @return [String, nil]
24+
required :card_program_token, String, nil?: true
2525

2626
# @!attribute card_token
2727
# Globally unique identifier denoting the card that the associated transaction
2828
# occurred on.
2929
#
30-
# @return [String]
31-
required :card_token, String
30+
# @return [String, nil]
31+
required :card_token, String, nil?: true
3232

3333
# @!attribute created
3434
# Date and time when the transaction first occurred. UTC time zone.
@@ -108,14 +108,14 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel
108108

109109
# @!attribute transaction_token
110110
# Globally unique identifier denoting the associated transaction. For settlement
111-
# records with type `CLEARING`, `FINANCIAL`, or `NON-FINANCIAL`, this references a
111+
# records with type `CLEARING`, `FINANCIAL`, or `NON_FINANCIAL`, this references a
112112
# card transaction token. For settlement records with type `CHARGEBACK`,
113113
# `REPRESENTMENT`, `PREARBITRATION`, `ARBITRATION`, or `COLLABORATION`, this
114114
# references the dispute transaction token. May be null for certain settlement
115115
# types.
116116
#
117-
# @return [String]
118-
required :transaction_token, String
117+
# @return [String, nil]
118+
required :transaction_token, String, nil?: true
119119

120120
# @!attribute transactions_gross_amount
121121
# The total amount of settlement impacting transactions (excluding interchange,
@@ -148,11 +148,11 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel
148148
#
149149
# @param token [String] Globally unique identifier denoting the Settlement Detail.
150150
#
151-
# @param account_token [String] Globally unique identifier denoting the account that the associated transaction
151+
# @param account_token [String, nil] Globally unique identifier denoting the account that the associated transaction
152152
#
153-
# @param card_program_token [String] Globally unique identifier denoting the card program that the associated transac
153+
# @param card_program_token [String, nil] Globally unique identifier denoting the card program that the associated transac
154154
#
155-
# @param card_token [String] Globally unique identifier denoting the card that the associated transaction occ
155+
# @param card_token [String, nil] Globally unique identifier denoting the card that the associated transaction occ
156156
#
157157
# @param created [Time] Date and time when the transaction first occurred. UTC time zone.
158158
#
@@ -178,7 +178,7 @@ class SettlementDetail < Lithic::Internal::Type::BaseModel
178178
#
179179
# @param settlement_date [String] Date of when money movement is triggered for the transaction. One exception appl
180180
#
181-
# @param transaction_token [String] Globally unique identifier denoting the associated transaction. For settlement r
181+
# @param transaction_token [String, nil] Globally unique identifier denoting the associated transaction. For settlement r
182182
#
183183
# @param transactions_gross_amount [Integer] The total amount of settlement impacting transactions (excluding interchange, fe
184184
#
@@ -231,7 +231,7 @@ module Type
231231
COLLABORATION = :COLLABORATION
232232
FEE = :FEE
233233
FINANCIAL = :FINANCIAL
234-
NON_FINANCIAL = :"NON-FINANCIAL"
234+
NON_FINANCIAL = :NON_FINANCIAL
235235
PREARBITRATION = :PREARBITRATION
236236
REPRESENTMENT = :REPRESENTMENT
237237

lib/lithic/models/statement_totals.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ class StatementTotals < Lithic::Internal::Type::BaseModel
5656
# Breakdown of credits
5757
#
5858
# @return [Object, nil]
59-
optional :credit_details, Lithic::Internal::Type::Unknown
59+
optional :credit_details, Lithic::Internal::Type::Unknown, nil?: true
6060

6161
# @!attribute debit_details
6262
# Breakdown of debits
6363
#
6464
# @return [Object, nil]
65-
optional :debit_details, Lithic::Internal::Type::Unknown
65+
optional :debit_details, Lithic::Internal::Type::Unknown, nil?: true
6666

6767
# @!attribute payment_details
6868
# Breakdown of payments
6969
#
7070
# @return [Object, nil]
71-
optional :payment_details, Lithic::Internal::Type::Unknown
71+
optional :payment_details, Lithic::Internal::Type::Unknown, nil?: true
7272

7373
# @!method initialize(balance_transfers:, cash_advances:, credits:, debits:, fees:, interest:, payments:, purchases:, credit_details: nil, debit_details: nil, payment_details: nil)
7474
# Some parameter documentations has been truncated, see
@@ -90,11 +90,11 @@ class StatementTotals < Lithic::Internal::Type::BaseModel
9090
#
9191
# @param purchases [Integer] Net card transaction volume less any cash advances in cents
9292
#
93-
# @param credit_details [Object] Breakdown of credits
93+
# @param credit_details [Object, nil] Breakdown of credits
9494
#
95-
# @param debit_details [Object] Breakdown of debits
95+
# @param debit_details [Object, nil] Breakdown of debits
9696
#
97-
# @param payment_details [Object] Breakdown of payments
97+
# @param payment_details [Object, nil] Breakdown of payments
9898
end
9999
end
100100
end

lib/lithic/models/transaction.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ class Event < Lithic::Internal::Type::BaseModel
874874
# @!attribute network_specific_data
875875
#
876876
# @return [Lithic::Models::Transaction::Event::NetworkSpecificData, nil]
877-
optional :network_specific_data, -> { Lithic::Transaction::Event::NetworkSpecificData }
877+
optional :network_specific_data, -> { Lithic::Transaction::Event::NetworkSpecificData }, nil?: true
878878

879879
# @!method initialize(token:, amount:, amounts:, created:, detailed_results:, effective_polarity:, network_info:, result:, rule_results:, type:, account_type: nil, network_specific_data: nil)
880880
# Some parameter documentations has been truncated, see
@@ -902,7 +902,7 @@ class Event < Lithic::Internal::Type::BaseModel
902902
#
903903
# @param account_type [Symbol, Lithic::Models::Transaction::Event::AccountType]
904904
#
905-
# @param network_specific_data [Lithic::Models::Transaction::Event::NetworkSpecificData]
905+
# @param network_specific_data [Lithic::Models::Transaction::Event::NetworkSpecificData, nil]
906906

907907
# @see Lithic::Models::Transaction::Event#amounts
908908
class Amounts < Lithic::Internal::Type::BaseModel

lib/lithic/models/transfer_limits_response.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ class Credit < Lithic::Internal::Type::BaseModel
104104
# Amount originated towards limit
105105
#
106106
# @return [Integer, nil]
107-
optional :amount_originated, Integer
107+
optional :amount_originated, Integer, nil?: true
108108

109109
# @!method initialize(limit:, amount_originated: nil)
110110
# Credit limits
111111
#
112112
# @param limit [Integer] The limit amount
113113
#
114-
# @param amount_originated [Integer] Amount originated towards limit
114+
# @param amount_originated [Integer, nil] Amount originated towards limit
115115
end
116116

117117
# @see Lithic::Models::TransferLimitsResponse::Data::DailyLimit#debit
@@ -126,14 +126,14 @@ class Debit < Lithic::Internal::Type::BaseModel
126126
# Amount originated towards limit
127127
#
128128
# @return [Integer, nil]
129-
optional :amount_originated, Integer
129+
optional :amount_originated, Integer, nil?: true
130130

131131
# @!method initialize(limit:, amount_originated: nil)
132132
# Debit limits
133133
#
134134
# @param limit [Integer] The limit amount
135135
#
136-
# @param amount_originated [Integer] Amount originated towards limit
136+
# @param amount_originated [Integer, nil] Amount originated towards limit
137137
end
138138
end
139139

@@ -170,14 +170,14 @@ class Credit < Lithic::Internal::Type::BaseModel
170170
# Amount originated towards limit
171171
#
172172
# @return [Integer, nil]
173-
optional :amount_originated, Integer
173+
optional :amount_originated, Integer, nil?: true
174174

175175
# @!method initialize(limit:, amount_originated: nil)
176176
# Credit limits
177177
#
178178
# @param limit [Integer] The limit amount
179179
#
180-
# @param amount_originated [Integer] Amount originated towards limit
180+
# @param amount_originated [Integer, nil] Amount originated towards limit
181181
end
182182

183183
# @see Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit#debit
@@ -192,14 +192,14 @@ class Debit < Lithic::Internal::Type::BaseModel
192192
# Amount originated towards limit
193193
#
194194
# @return [Integer, nil]
195-
optional :amount_originated, Integer
195+
optional :amount_originated, Integer, nil?: true
196196

197197
# @!method initialize(limit:, amount_originated: nil)
198198
# Debit limits
199199
#
200200
# @param limit [Integer] The limit amount
201201
#
202-
# @param amount_originated [Integer] Amount originated towards limit
202+
# @param amount_originated [Integer, nil] Amount originated towards limit
203203
end
204204
end
205205

@@ -236,14 +236,14 @@ class Credit < Lithic::Internal::Type::BaseModel
236236
# Amount originated towards limit
237237
#
238238
# @return [Integer, nil]
239-
optional :amount_originated, Integer
239+
optional :amount_originated, Integer, nil?: true
240240

241241
# @!method initialize(limit:, amount_originated: nil)
242242
# Credit limits
243243
#
244244
# @param limit [Integer] The limit amount
245245
#
246-
# @param amount_originated [Integer] Amount originated towards limit
246+
# @param amount_originated [Integer, nil] Amount originated towards limit
247247
end
248248

249249
# @see Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction#debit
@@ -258,14 +258,14 @@ class Debit < Lithic::Internal::Type::BaseModel
258258
# Amount originated towards limit
259259
#
260260
# @return [Integer, nil]
261-
optional :amount_originated, Integer
261+
optional :amount_originated, Integer, nil?: true
262262

263263
# @!method initialize(limit:, amount_originated: nil)
264264
# Debit limits
265265
#
266266
# @param limit [Integer] The limit amount
267267
#
268-
# @param amount_originated [Integer] Amount originated towards limit
268+
# @param amount_originated [Integer, nil] Amount originated towards limit
269269
end
270270
end
271271
end

0 commit comments

Comments
 (0)