Skip to content

Commit 224cb0c

Browse files
feat(api): add penalty_rates to interest tier schedule create
1 parent 9a13e1d commit 224cb0c

6 files changed

Lines changed: 31 additions & 2 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: 188
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-c5b3750e5a69b58f465c8bc61065c0ddd2fd3fec8fef2fa5703fcb10d7ba6a1c.yml
3-
openapi_spec_hash: 3a4cfae4d14318c5e3dfe8bcc751497f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-b0ae5fc46338788b5191870fa233397a5624402f6f30177574fc824c2d6d235f.yml
3+
openapi_spec_hash: 13b104665e60f7d755b0483eb2e8a344
44
config_hash: 7daa8d0d03697920c0c1ca18ce6d4594

src/lithic/resources/financial_accounts/interest_tier_schedule.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def create(
5151
*,
5252
credit_product_token: str,
5353
effective_date: Union[str, date],
54+
penalty_rates: object | Omit = omit,
5455
tier_name: str | Omit = omit,
5556
tier_rates: object | Omit = omit,
5657
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -68,6 +69,8 @@ def create(
6869
6970
effective_date: Date the tier should be effective in YYYY-MM-DD format
7071
72+
penalty_rates: Custom rates per category for penalties
73+
7174
tier_name: Name of a tier contained in the credit product. Mutually exclusive with
7275
tier_rates
7376
@@ -91,6 +94,7 @@ def create(
9194
{
9295
"credit_product_token": credit_product_token,
9396
"effective_date": effective_date,
97+
"penalty_rates": penalty_rates,
9498
"tier_name": tier_name,
9599
"tier_rates": tier_rates,
96100
},
@@ -145,6 +149,7 @@ def update(
145149
effective_date: Union[str, date],
146150
*,
147151
financial_account_token: str,
152+
penalty_rates: object | Omit = omit,
148153
tier_name: str | Omit = omit,
149154
tier_rates: object | Omit = omit,
150155
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -158,6 +163,8 @@ def update(
158163
Update an existing interest tier schedule
159164
160165
Args:
166+
penalty_rates: Custom rates per category for penalties
167+
161168
tier_name: Name of a tier contained in the credit product. Mutually exclusive with
162169
tier_rates
163170
@@ -181,6 +188,7 @@ def update(
181188
f"/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}",
182189
body=maybe_transform(
183190
{
191+
"penalty_rates": penalty_rates,
184192
"tier_name": tier_name,
185193
"tier_rates": tier_rates,
186194
},
@@ -337,6 +345,7 @@ async def create(
337345
*,
338346
credit_product_token: str,
339347
effective_date: Union[str, date],
348+
penalty_rates: object | Omit = omit,
340349
tier_name: str | Omit = omit,
341350
tier_rates: object | Omit = omit,
342351
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -354,6 +363,8 @@ async def create(
354363
355364
effective_date: Date the tier should be effective in YYYY-MM-DD format
356365
366+
penalty_rates: Custom rates per category for penalties
367+
357368
tier_name: Name of a tier contained in the credit product. Mutually exclusive with
358369
tier_rates
359370
@@ -377,6 +388,7 @@ async def create(
377388
{
378389
"credit_product_token": credit_product_token,
379390
"effective_date": effective_date,
391+
"penalty_rates": penalty_rates,
380392
"tier_name": tier_name,
381393
"tier_rates": tier_rates,
382394
},
@@ -431,6 +443,7 @@ async def update(
431443
effective_date: Union[str, date],
432444
*,
433445
financial_account_token: str,
446+
penalty_rates: object | Omit = omit,
434447
tier_name: str | Omit = omit,
435448
tier_rates: object | Omit = omit,
436449
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -444,6 +457,8 @@ async def update(
444457
Update an existing interest tier schedule
445458
446459
Args:
460+
penalty_rates: Custom rates per category for penalties
461+
447462
tier_name: Name of a tier contained in the credit product. Mutually exclusive with
448463
tier_rates
449464
@@ -467,6 +482,7 @@ async def update(
467482
f"/v1/financial_accounts/{financial_account_token}/interest_tier_schedule/{effective_date}",
468483
body=await async_maybe_transform(
469484
{
485+
"penalty_rates": penalty_rates,
470486
"tier_name": tier_name,
471487
"tier_rates": tier_rates,
472488
},

src/lithic/types/financial_accounts/interest_tier_schedule.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class InterestTierSchedule(BaseModel):
1717
effective_date: date
1818
"""Date the tier should be effective in YYYY-MM-DD format"""
1919

20+
penalty_rates: Optional[object] = None
21+
"""Custom rates per category for penalties"""
22+
2023
tier_name: Optional[str] = None
2124
"""Name of a tier contained in the credit product.
2225

src/lithic/types/financial_accounts/interest_tier_schedule_create_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ class InterestTierScheduleCreateParams(TypedDict, total=False):
1818
effective_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]]
1919
"""Date the tier should be effective in YYYY-MM-DD format"""
2020

21+
penalty_rates: object
22+
"""Custom rates per category for penalties"""
23+
2124
tier_name: str
2225
"""Name of a tier contained in the credit product.
2326

src/lithic/types/financial_accounts/interest_tier_schedule_update_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
class InterestTierScheduleUpdateParams(TypedDict, total=False):
1111
financial_account_token: Required[str]
1212

13+
penalty_rates: object
14+
"""Custom rates per category for penalties"""
15+
1316
tier_name: str
1417
"""Name of a tier contained in the credit product.
1518

tests/api_resources/financial_accounts/test_interest_tier_schedule.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_method_create_with_all_params(self, client: Lithic) -> None:
3636
financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
3737
credit_product_token="credit_product_token",
3838
effective_date=parse_date("2019-12-27"),
39+
penalty_rates={},
3940
tier_name="tier_name",
4041
tier_rates={},
4142
)
@@ -143,6 +144,7 @@ def test_method_update_with_all_params(self, client: Lithic) -> None:
143144
interest_tier_schedule = client.financial_accounts.interest_tier_schedule.update(
144145
effective_date=parse_date("2019-12-27"),
145146
financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
147+
penalty_rates={},
146148
tier_name="tier_name",
147149
tier_rates={},
148150
)
@@ -311,6 +313,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncLithic) ->
311313
financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
312314
credit_product_token="credit_product_token",
313315
effective_date=parse_date("2019-12-27"),
316+
penalty_rates={},
314317
tier_name="tier_name",
315318
tier_rates={},
316319
)
@@ -418,6 +421,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncLithic) ->
418421
interest_tier_schedule = await async_client.financial_accounts.interest_tier_schedule.update(
419422
effective_date=parse_date("2019-12-27"),
420423
financial_account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
424+
penalty_rates={},
421425
tier_name="tier_name",
422426
tier_rates={},
423427
)

0 commit comments

Comments
 (0)