Class: Lithic::Resources::FinancialAccounts::InterestTierSchedule
- Inherits:
-
Object
- Object
- Lithic::Resources::FinancialAccounts::InterestTierSchedule
- Defined in:
- lib/lithic/resources/financial_accounts/interest_tier_schedule.rb
Instance Method Summary collapse
-
#create(financial_account_token, credit_product_token:, effective_date:, penalty_rates: nil, tier_name: nil, tier_rates: nil, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule
Some parameter documentations has been truncated, see Models::FinancialAccounts::InterestTierScheduleCreateParams for more details.
-
#delete(effective_date, financial_account_token:, request_options: {}) ⇒ nil
Delete an interest tier schedule entry.
-
#initialize(client:) ⇒ InterestTierSchedule
constructor
private
A new instance of InterestTierSchedule.
-
#list(financial_account_token, after_date: nil, before_date: nil, for_date: nil, request_options: {}) ⇒ Lithic::Internal::SinglePage<Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule>
List interest tier schedules for a financial account with optional date filtering.
-
#retrieve(effective_date, financial_account_token:, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule
Get a specific interest tier schedule by effective date.
-
#update(effective_date, financial_account_token:, penalty_rates: nil, tier_name: nil, tier_rates: nil, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule
Some parameter documentations has been truncated, see Models::FinancialAccounts::InterestTierScheduleUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ InterestTierSchedule
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of InterestTierSchedule.
204 205 206 |
# File 'lib/lithic/resources/financial_accounts/interest_tier_schedule.rb', line 204 def initialize(client:) @client = client end |
Instance Method Details
#create(financial_account_token, credit_product_token:, effective_date:, penalty_rates: nil, tier_name: nil, tier_rates: nil, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule
Some parameter documentations has been truncated, see Models::FinancialAccounts::InterestTierScheduleCreateParams for more details.
Create a new interest tier schedule entry for a supported financial account
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/lithic/resources/financial_accounts/interest_tier_schedule.rb', line 32 def create(financial_account_token, params) parsed, = Lithic::FinancialAccounts::InterestTierScheduleCreateParams.dump_request(params) @client.request( method: :post, path: ["v1/financial_accounts/%1$s/interest_tier_schedule", financial_account_token], body: parsed, model: Lithic::FinancialAccounts::FinancialAccountsInterestTierSchedule, options: ) end |
#delete(effective_date, financial_account_token:, request_options: {}) ⇒ nil
Delete an interest tier schedule entry.
Returns:
-
400 Bad Request: Invalid effective_date format OR attempting to delete the earliest tier schedule entry for a non-PENDING account
-
404 Not Found: Tier schedule entry not found for the given effective_date OR ledger account not found
Note: PENDING accounts can delete the earliest tier schedule entry (account hasn’t opened yet). Active/non-PENDING accounts cannot delete the earliest entry to prevent orphaning the account.
If the deleted tier schedule has a past effective_date and the account is ACTIVE, the loan tape rebuild configuration will be updated to trigger rebuilds from that date.
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/lithic/resources/financial_accounts/interest_tier_schedule.rb', line 183 def delete(effective_date, params) parsed, = Lithic::FinancialAccounts::InterestTierScheduleDeleteParams.dump_request(params) financial_account_token = parsed.delete(:financial_account_token) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: [ "v1/financial_accounts/%1$s/interest_tier_schedule/%2$s", financial_account_token, effective_date ], model: NilClass, options: ) end |
#list(financial_account_token, after_date: nil, before_date: nil, for_date: nil, request_options: {}) ⇒ Lithic::Internal::SinglePage<Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule>
List interest tier schedules for a financial account with optional date filtering.
If no date parameters are provided, returns all tier schedules. If date parameters are provided, uses filtering to return matching schedules (max 100).
-
for_date: Returns exact match (takes precedence over other dates)
-
before_date: Returns schedules with effective_date <= before_date
-
after_date: Returns schedules with effective_date >= after_date
-
Both before_date and after_date: Returns schedules in range
142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/lithic/resources/financial_accounts/interest_tier_schedule.rb', line 142 def list(financial_account_token, params = {}) parsed, = Lithic::FinancialAccounts::InterestTierScheduleListParams.dump_request(params) query = Lithic::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["v1/financial_accounts/%1$s/interest_tier_schedule", financial_account_token], query: query, page: Lithic::Internal::SinglePage, model: Lithic::FinancialAccounts::FinancialAccountsInterestTierSchedule, options: ) end |
#retrieve(effective_date, financial_account_token:, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule
Get a specific interest tier schedule by effective date
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/lithic/resources/financial_accounts/interest_tier_schedule.rb', line 56 def retrieve(effective_date, params) parsed, = Lithic::FinancialAccounts::InterestTierScheduleRetrieveParams.dump_request(params) financial_account_token = parsed.delete(:financial_account_token) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: [ "v1/financial_accounts/%1$s/interest_tier_schedule/%2$s", financial_account_token, effective_date ], model: Lithic::FinancialAccounts::FinancialAccountsInterestTierSchedule, options: ) end |
#update(effective_date, financial_account_token:, penalty_rates: nil, tier_name: nil, tier_rates: nil, request_options: {}) ⇒ Lithic::Models::FinancialAccounts::FinancialAccountsInterestTierSchedule
Some parameter documentations has been truncated, see Models::FinancialAccounts::InterestTierScheduleUpdateParams for more details.
Update an existing interest tier schedule
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/lithic/resources/financial_accounts/interest_tier_schedule.rb', line 97 def update(effective_date, params) parsed, = Lithic::FinancialAccounts::InterestTierScheduleUpdateParams.dump_request(params) financial_account_token = parsed.delete(:financial_account_token) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :put, path: [ "v1/financial_accounts/%1$s/interest_tier_schedule/%2$s", financial_account_token, effective_date ], body: parsed, model: Lithic::FinancialAccounts::FinancialAccountsInterestTierSchedule, options: ) end |