Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
}
]
},
"originGitCommit": "097aa15ba0f43a259cf91d408a481997d078fb57",
"originGitCommit": "ba014d4647e50fa5b7a5eefb6a2a4bdff847b683",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "1.4.1",
"requestedVersion": "1.4.2",
"ciProvider": "github",
"sdkVersion": "1.4.1"
"sdkVersion": "1.4.2"
}
750 changes: 8 additions & 742 deletions .fern/replay.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dynamic = ["version"]

[tool.poetry]
name = "schematichq"
version = "1.4.1"
version = "1.4.2"
description = ""
readme = "README.md"
authors = []
Expand Down
56 changes: 56 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -6764,6 +6764,14 @@ client.credits.extend_credit_lease(
<dl>
<dd>

**idempotency_key:** `typing.Optional[str]` — A caller-chosen key for safe retries: a second request with the same key returns the lease as it stands instead of growing it again. Keys are unique per environment across every extend

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
Expand Down Expand Up @@ -15422,6 +15430,14 @@ client.entitlements.create_plan_entitlement(
<dl>
<dd>

**overage_billing_cadence:** `typing.Optional[BillingArrearsCadence]` — How often overage charges are assessed and invoiced. Defaults to end_of_billing_period, where the billing provider aggregates usage over the subscription's own period and bills it at period end. Set to monthly or quarterly to have overage assessed each month or quarter and billed on its own invoice, which is the point of the setting on annual plans. A quarter charges each month's usage against that month's allowance. Only applies to overage price behavior.

</dd>
</dl>

<dl>
<dd>

**overage_billing_product_id:** `typing.Optional[str]`

</dd>
Expand All @@ -15430,6 +15446,14 @@ client.entitlements.create_plan_entitlement(
<dl>
<dd>

**overage_invoice_anchor:** `typing.Optional[BillingArrearsAnchor]` — Which boundary closes a monthly or quarterly overage window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Quarterly windows run in three-month blocks from the billing period start, held to the subscription's own period, or in calendar quarters at month_end. Only applies when overage_billing_cadence is monthly or quarterly, and must match metric_period_month_reset so each window closes when the allowance resets: billing_period_start for billing_cycle, month_end for first_of_month. Defaults to the anchor that matches the reset.

</dd>
</dl>

<dl>
<dd>

**plan_version_id:** `typing.Optional[str]`

</dd>
Expand Down Expand Up @@ -15797,6 +15821,14 @@ client.entitlements.update_plan_entitlement(
<dl>
<dd>

**overage_billing_cadence:** `typing.Optional[BillingArrearsCadence]` — How often overage charges are assessed and invoiced. Defaults to end_of_billing_period, where the billing provider aggregates usage over the subscription's own period and bills it at period end. Set to monthly or quarterly to have overage assessed each month or quarter and billed on its own invoice, which is the point of the setting on annual plans. A quarter charges each month's usage against that month's allowance. Only applies to overage price behavior.

</dd>
</dl>

<dl>
<dd>

**overage_billing_product_id:** `typing.Optional[str]`

</dd>
Expand All @@ -15805,6 +15837,14 @@ client.entitlements.update_plan_entitlement(
<dl>
<dd>

**overage_invoice_anchor:** `typing.Optional[BillingArrearsAnchor]` — Which boundary closes a monthly or quarterly overage window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Quarterly windows run in three-month blocks from the billing period start, held to the subscription's own period, or in calendar quarters at month_end. Only applies when overage_billing_cadence is monthly or quarterly, and must match metric_period_month_reset so each window closes when the allowance resets: billing_period_start for billing_cycle, month_end for first_of_month. Defaults to the anchor that matches the reset.

</dd>
</dl>

<dl>
<dd>

**price_behavior:** `typing.Optional[EntitlementPriceBehavior]`

</dd>
Expand Down Expand Up @@ -16191,6 +16231,14 @@ client.entitlements.upsert_plan_entitlement_for_billing_product(
<dl>
<dd>

**overage_billing_cadence:** `typing.Optional[BillingArrearsCadence]` — How often overage charges are assessed and invoiced. Defaults to end_of_billing_period, where the billing provider aggregates usage over the subscription's own period and bills it at period end. Set to monthly or quarterly to have overage assessed each month or quarter and billed on its own invoice, which is the point of the setting on annual plans. A quarter charges each month's usage against that month's allowance. Only applies to overage price behavior.

</dd>
</dl>

<dl>
<dd>

**overage_billing_product_id:** `typing.Optional[str]`

</dd>
Expand All @@ -16199,6 +16247,14 @@ client.entitlements.upsert_plan_entitlement_for_billing_product(
<dl>
<dd>

**overage_invoice_anchor:** `typing.Optional[BillingArrearsAnchor]` — Which boundary closes a monthly or quarterly overage window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Quarterly windows run in three-month blocks from the billing period start, held to the subscription's own period, or in calendar quarters at month_end. Only applies when overage_billing_cadence is monthly or quarterly, and must match metric_period_month_reset so each window closes when the allowance resets: billing_period_start for billing_cycle, month_end for first_of_month. Defaults to the anchor that matches the reset.

</dd>
</dl>

<dl>
<dd>

**plan_version_id:** `typing.Optional[str]`

</dd>
Expand Down
4 changes: 2 additions & 2 deletions src/schematic/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform

headers: typing.Dict[str, str] = {
"User-Agent": "schematichq/1.4.1",
"User-Agent": "schematichq/1.4.2",
"X-Fern-Language": "Python",
"X-Fern-Runtime": f"python/{platform.python_version()}",
"X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
"X-Fern-SDK-Name": "schematichq",
"X-Fern-SDK-Version": "1.4.1",
"X-Fern-SDK-Version": "1.4.2",
**(self.get_custom_headers() or {}),
}
headers["X-Schematic-Api-Key"] = self.api_key
Expand Down
28 changes: 22 additions & 6 deletions src/schematic/credits/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,7 @@ def extend_credit_lease(
*,
additional_amount: float,
expires_at: typing.Optional[dt.datetime] = OMIT,
idempotency_key: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ExtendCreditLeaseResponse:
"""
Expand All @@ -1201,6 +1202,9 @@ def extend_credit_lease(

expires_at : typing.Optional[dt.datetime]

idempotency_key : typing.Optional[str]
A caller-chosen key for safe retries: a second request with the same key returns the lease as it stands instead of growing it again. Keys are unique per environment across every extend

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -1222,7 +1226,11 @@ def extend_credit_lease(
)
"""
_response = self._raw_client.extend_credit_lease(
lease_id, additional_amount=additional_amount, expires_at=expires_at, request_options=request_options
lease_id,
additional_amount=additional_amount,
expires_at=expires_at,
idempotency_key=idempotency_key,
request_options=request_options,
)
return _response.data

Expand Down Expand Up @@ -1386,7 +1394,7 @@ def create_billing_plan_credit_grant(
Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start.

arrears_cadence : typing.Optional[BillingArrearsCadence]
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly.
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Quarterly is not available for postpaid charges.

auto_topup_amount : typing.Optional[int]

Expand Down Expand Up @@ -1589,7 +1597,7 @@ def update_billing_plan_credit_grant(
Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start. Send null to fall back to the default.

arrears_cadence : typing.Optional[BillingArrearsCadence]
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Send null to fall back to the default.
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Quarterly is not available for postpaid charges. Send null to fall back to the default.

auto_topup_amount : typing.Optional[int]

Expand Down Expand Up @@ -3626,6 +3634,7 @@ async def extend_credit_lease(
*,
additional_amount: float,
expires_at: typing.Optional[dt.datetime] = OMIT,
idempotency_key: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ExtendCreditLeaseResponse:
"""
Expand All @@ -3638,6 +3647,9 @@ async def extend_credit_lease(

expires_at : typing.Optional[dt.datetime]

idempotency_key : typing.Optional[str]
A caller-chosen key for safe retries: a second request with the same key returns the lease as it stands instead of growing it again. Keys are unique per environment across every extend

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -3667,7 +3679,11 @@ async def main() -> None:
asyncio.run(main())
"""
_response = await self._raw_client.extend_credit_lease(
lease_id, additional_amount=additional_amount, expires_at=expires_at, request_options=request_options
lease_id,
additional_amount=additional_amount,
expires_at=expires_at,
idempotency_key=idempotency_key,
request_options=request_options,
)
return _response.data

Expand Down Expand Up @@ -3847,7 +3863,7 @@ async def create_billing_plan_credit_grant(
Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start.

arrears_cadence : typing.Optional[BillingArrearsCadence]
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly.
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Quarterly is not available for postpaid charges.

auto_topup_amount : typing.Optional[int]

Expand Down Expand Up @@ -4066,7 +4082,7 @@ async def update_billing_plan_credit_grant(
Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start. Send null to fall back to the default.

arrears_cadence : typing.Optional[BillingArrearsCadence]
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Send null to fall back to the default.
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Quarterly is not available for postpaid charges. Send null to fall back to the default.

auto_topup_amount : typing.Optional[int]

Expand Down
18 changes: 14 additions & 4 deletions src/schematic/credits/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2591,6 +2591,7 @@ def extend_credit_lease(
*,
additional_amount: float,
expires_at: typing.Optional[dt.datetime] = OMIT,
idempotency_key: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ExtendCreditLeaseResponse]:
"""
Expand All @@ -2603,6 +2604,9 @@ def extend_credit_lease(

expires_at : typing.Optional[dt.datetime]

idempotency_key : typing.Optional[str]
A caller-chosen key for safe retries: a second request with the same key returns the lease as it stands instead of growing it again. Keys are unique per environment across every extend

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -2617,6 +2621,7 @@ def extend_credit_lease(
json={
"additional_amount": additional_amount,
"expires_at": expires_at,
"idempotency_key": idempotency_key,
},
headers={
"content-type": "application/json",
Expand Down Expand Up @@ -3004,7 +3009,7 @@ def create_billing_plan_credit_grant(
Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start.

arrears_cadence : typing.Optional[BillingArrearsCadence]
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly.
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Quarterly is not available for postpaid charges.

auto_topup_amount : typing.Optional[int]

Expand Down Expand Up @@ -3332,7 +3337,7 @@ def update_billing_plan_credit_grant(
Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start. Send null to fall back to the default.

arrears_cadence : typing.Optional[BillingArrearsCadence]
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Send null to fall back to the default.
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Quarterly is not available for postpaid charges. Send null to fall back to the default.

auto_topup_amount : typing.Optional[int]

Expand Down Expand Up @@ -7473,6 +7478,7 @@ async def extend_credit_lease(
*,
additional_amount: float,
expires_at: typing.Optional[dt.datetime] = OMIT,
idempotency_key: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ExtendCreditLeaseResponse]:
"""
Expand All @@ -7485,6 +7491,9 @@ async def extend_credit_lease(

expires_at : typing.Optional[dt.datetime]

idempotency_key : typing.Optional[str]
A caller-chosen key for safe retries: a second request with the same key returns the lease as it stands instead of growing it again. Keys are unique per environment across every extend

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -7499,6 +7508,7 @@ async def extend_credit_lease(
json={
"additional_amount": additional_amount,
"expires_at": expires_at,
"idempotency_key": idempotency_key,
},
headers={
"content-type": "application/json",
Expand Down Expand Up @@ -7886,7 +7896,7 @@ async def create_billing_plan_credit_grant(
Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start.

arrears_cadence : typing.Optional[BillingArrearsCadence]
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly.
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Quarterly is not available for postpaid charges.

auto_topup_amount : typing.Optional[int]

Expand Down Expand Up @@ -8214,7 +8224,7 @@ async def update_billing_plan_credit_grant(
Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start. Send null to fall back to the default.

arrears_cadence : typing.Optional[BillingArrearsCadence]
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Send null to fall back to the default.
How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Quarterly is not available for postpaid charges. Send null to fall back to the default.

auto_topup_amount : typing.Optional[int]

Expand Down
Loading
Loading