Skip to content

Commit 1fa7586

Browse files
feat(api): add statement_totals field to financial accounts statement
1 parent d8d98d9 commit 1fa7586

5 files changed

Lines changed: 38 additions & 11 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 190
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-27d13d3d5226c710b07f9fc954fa53a8e6923e74d90d3f587d96399c1baf4de3.yml
3-
openapi_spec_hash: 99a60cbd91f32b25617a9536fadebf07
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-bf54d7063b11e1b1656e00d02438f34f87938a9fdbdd5b980fce3cfae3dabffa.yml
3+
openapi_spec_hash: c6efbc9d3105fa48f76ebb095b887e08
44
config_hash: edbdfefeb0d3d927c2f9fe3402793215

lib/lithic/models/financial_accounts/statement.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,12 @@ class Statement < Lithic::Internal::Type::BaseModel
132132
# @return [Lithic::Models::FinancialAccounts::Statement::PayoffDetails, nil]
133133
optional :payoff_details, -> { Lithic::FinancialAccounts::Statement::PayoffDetails }, nil?: true
134134

135-
# @!method initialize(token:, account_standing:, amount_due:, available_credit:, created:, credit_limit:, credit_product_token:, days_in_billing_cycle:, ending_balance:, financial_account_token:, payment_due_date:, period_totals:, starting_balance:, statement_end_date:, statement_start_date:, statement_type:, updated:, ytd_totals:, interest_details: nil, next_payment_due_date: nil, next_statement_end_date: nil, payoff_details: nil)
135+
# @!attribute statement_totals
136+
#
137+
# @return [Lithic::Models::StatementTotals, nil]
138+
optional :statement_totals, -> { Lithic::StatementTotals }
139+
140+
# @!method initialize(token:, account_standing:, amount_due:, available_credit:, created:, credit_limit:, credit_product_token:, days_in_billing_cycle:, ending_balance:, financial_account_token:, payment_due_date:, period_totals:, starting_balance:, statement_end_date:, statement_start_date:, statement_type:, updated:, ytd_totals:, interest_details: nil, next_payment_due_date: nil, next_statement_end_date: nil, payoff_details: nil, statement_totals: nil)
136141
# Some parameter documentations has been truncated, see
137142
# {Lithic::Models::FinancialAccounts::Statement} for more details.
138143
#
@@ -179,6 +184,8 @@ class Statement < Lithic::Internal::Type::BaseModel
179184
# @param next_statement_end_date [Date] Date when the next billing period will end
180185
#
181186
# @param payoff_details [Lithic::Models::FinancialAccounts::Statement::PayoffDetails, nil] Details on number and size of payments to pay off balance
187+
#
188+
# @param statement_totals [Lithic::Models::StatementTotals]
182189

183190
# @see Lithic::Models::FinancialAccounts::Statement#account_standing
184191
class AccountStanding < Lithic::Internal::Type::BaseModel

rbi/lithic/models/financial_accounts/statement.rbi

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ module Lithic
154154
end
155155
attr_writer :payoff_details
156156

157+
sig { returns(T.nilable(Lithic::StatementTotals)) }
158+
attr_reader :statement_totals
159+
160+
sig { params(statement_totals: Lithic::StatementTotals::OrHash).void }
161+
attr_writer :statement_totals
162+
157163
sig do
158164
params(
159165
token: String,
@@ -185,7 +191,8 @@ module Lithic
185191
payoff_details:
186192
T.nilable(
187193
Lithic::FinancialAccounts::Statement::PayoffDetails::OrHash
188-
)
194+
),
195+
statement_totals: Lithic::StatementTotals::OrHash
189196
).returns(T.attached_class)
190197
end
191198
def self.new(
@@ -227,7 +234,8 @@ module Lithic
227234
# Date when the next billing period will end
228235
next_statement_end_date: nil,
229236
# Details on number and size of payments to pay off balance
230-
payoff_details: nil
237+
payoff_details: nil,
238+
statement_totals: nil
231239
)
232240
end
233241

@@ -261,7 +269,8 @@ module Lithic
261269
next_payment_due_date: Date,
262270
next_statement_end_date: Date,
263271
payoff_details:
264-
T.nilable(Lithic::FinancialAccounts::Statement::PayoffDetails)
272+
T.nilable(Lithic::FinancialAccounts::Statement::PayoffDetails),
273+
statement_totals: Lithic::StatementTotals
265274
}
266275
)
267276
end

sig/lithic/models/financial_accounts/statement.rbs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ module Lithic
2424
interest_details: Lithic::FinancialAccounts::Statement::InterestDetails?,
2525
next_payment_due_date: Date,
2626
next_statement_end_date: Date,
27-
payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?
27+
payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?,
28+
statement_totals: Lithic::StatementTotals
2829
}
2930

3031
class Statement < Lithic::Internal::Type::BaseModel
@@ -76,6 +77,12 @@ module Lithic
7677

7778
attr_accessor payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?
7879

80+
attr_reader statement_totals: Lithic::StatementTotals?
81+
82+
def statement_totals=: (
83+
Lithic::StatementTotals
84+
) -> Lithic::StatementTotals
85+
7986
def initialize: (
8087
token: String,
8188
account_standing: Lithic::FinancialAccounts::Statement::AccountStanding,
@@ -98,7 +105,8 @@ module Lithic
98105
?interest_details: Lithic::FinancialAccounts::Statement::InterestDetails?,
99106
?next_payment_due_date: Date,
100107
?next_statement_end_date: Date,
101-
?payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?
108+
?payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?,
109+
?statement_totals: Lithic::StatementTotals
102110
) -> void
103111

104112
def to_hash: -> {
@@ -123,7 +131,8 @@ module Lithic
123131
interest_details: Lithic::FinancialAccounts::Statement::InterestDetails?,
124132
next_payment_due_date: Date,
125133
next_statement_end_date: Date,
126-
payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?
134+
payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails?,
135+
statement_totals: Lithic::StatementTotals
127136
}
128137

129138
type account_standing =

test/lithic/resources/financial_accounts/statements_test.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def test_retrieve_required_params
3737
interest_details: Lithic::FinancialAccounts::Statement::InterestDetails | nil,
3838
next_payment_due_date: Date | nil,
3939
next_statement_end_date: Date | nil,
40-
payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails | nil
40+
payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails | nil,
41+
statement_totals: Lithic::StatementTotals | nil
4142
}
4243
end
4344
end
@@ -79,7 +80,8 @@ def test_list
7980
interest_details: Lithic::FinancialAccounts::Statement::InterestDetails | nil,
8081
next_payment_due_date: Date | nil,
8182
next_statement_end_date: Date | nil,
82-
payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails | nil
83+
payoff_details: Lithic::FinancialAccounts::Statement::PayoffDetails | nil,
84+
statement_totals: Lithic::StatementTotals | nil
8385
}
8486
end
8587
end

0 commit comments

Comments
 (0)