Skip to content

Commit bf7172a

Browse files
feat(api): api update
1 parent 0261895 commit bf7172a

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 167
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury%2Fmodern-treasury-39c95f0a7edced777235ef061b8bafa863bbb96e54c9f795b83df89f2cd3be1f.yml
3-
openapi_spec_hash: 34c6bc303eb5e6a2f3c05e2d40b862f8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury%2Fmodern-treasury-1edc64613fa1826426218eb0d10ebc6fe2956705a55f05f6c0c89fde496640ed.yml
3+
openapi_spec_hash: ed5737bdbbcf4ee0be25472b79adacdf
44
config_hash: 55a5583c24314820a65f792e2ebab57b

src/modern_treasury/resources/ledger_account_settlements/ledger_account_settlements.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def update(
180180
*,
181181
description: Optional[str] | Omit = omit,
182182
metadata: Dict[str, str] | Omit = omit,
183+
skip_settlement_ledger_transaction: Optional[bool] | Omit = omit,
183184
status: Literal["posted", "archived"] | Omit = omit,
184185
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
185186
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -198,6 +199,9 @@ def update(
198199
metadata: Additional data represented as key-value pairs. Both the key and value must be
199200
strings.
200201
202+
skip_settlement_ledger_transaction: It is set to `false` by default. It should be set to `true` when migrating
203+
existing settlements.
204+
201205
status: To post a pending ledger account settlement, use `posted`. To archive a pending
202206
ledger transaction, use `archived`.
203207
@@ -219,6 +223,7 @@ def update(
219223
{
220224
"description": description,
221225
"metadata": metadata,
226+
"skip_settlement_ledger_transaction": skip_settlement_ledger_transaction,
222227
"status": status,
223228
},
224229
ledger_account_settlement_update_params.LedgerAccountSettlementUpdateParams,
@@ -454,6 +459,7 @@ async def update(
454459
*,
455460
description: Optional[str] | Omit = omit,
456461
metadata: Dict[str, str] | Omit = omit,
462+
skip_settlement_ledger_transaction: Optional[bool] | Omit = omit,
457463
status: Literal["posted", "archived"] | Omit = omit,
458464
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
459465
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -472,6 +478,9 @@ async def update(
472478
metadata: Additional data represented as key-value pairs. Both the key and value must be
473479
strings.
474480
481+
skip_settlement_ledger_transaction: It is set to `false` by default. It should be set to `true` when migrating
482+
existing settlements.
483+
475484
status: To post a pending ledger account settlement, use `posted`. To archive a pending
476485
ledger transaction, use `archived`.
477486
@@ -493,6 +502,7 @@ async def update(
493502
{
494503
"description": description,
495504
"metadata": metadata,
505+
"skip_settlement_ledger_transaction": skip_settlement_ledger_transaction,
496506
"status": status,
497507
},
498508
ledger_account_settlement_update_params.LedgerAccountSettlementUpdateParams,

src/modern_treasury/types/ledger_account_settlement_update_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ class LedgerAccountSettlementUpdateParams(TypedDict, total=False):
1818
Both the key and value must be strings.
1919
"""
2020

21+
skip_settlement_ledger_transaction: Optional[bool]
22+
"""It is set to `false` by default.
23+
24+
It should be set to `true` when migrating existing settlements.
25+
"""
26+
2127
status: Literal["posted", "archived"]
2228
"""To post a pending ledger account settlement, use `posted`.
2329

tests/api_resources/test_ledger_account_settlements.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def test_method_update_with_all_params(self, client: ModernTreasury) -> None:
128128
"foo": "bar",
129129
"modern": "treasury",
130130
},
131+
skip_settlement_ledger_transaction=True,
131132
status="posted",
132133
)
133134
assert_matches_type(LedgerAccountSettlement, ledger_account_settlement, path=["response"])
@@ -317,6 +318,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncModernTrea
317318
"foo": "bar",
318319
"modern": "treasury",
319320
},
321+
skip_settlement_ledger_transaction=True,
320322
status="posted",
321323
)
322324
assert_matches_type(LedgerAccountSettlement, ledger_account_settlement, path=["response"])

0 commit comments

Comments
 (0)