diff --git a/.fern/metadata.json b/.fern/metadata.json
index ace9110..d336f8a 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -23,6 +23,6 @@
}
]
},
- "originGitCommit": "deb8532a1f84f6daa08b5c611a66a5ec92f53f0e",
- "sdkVersion": "1.2.6"
+ "originGitCommit": "b3ecd0dc127f986fbcb1084dc6be23c66b78ff3f",
+ "sdkVersion": "1.2.7"
}
\ No newline at end of file
diff --git a/pyproject.toml b/pyproject.toml
index 3a7d35a..af74797 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -4,7 +4,7 @@ dynamic = ["version"]
[tool.poetry]
name = "schematichq"
-version = "1.2.6"
+version = "1.2.7"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index f8d39e9..d129252 100644
--- a/reference.md
+++ b/reference.md
@@ -4202,6 +4202,14 @@ client.billing.upsert_billing_subscription(
-
+**company_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**default_payment_method_external_id:** `typing.Optional[str]`
@@ -8591,6 +8599,124 @@ client.companies.lookup_company(
+
+
+
+
+client.companies.get_company_billing_entity(...) -> GetCompanyBillingEntityResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from schematic import Schematic
+from schematic.environment import SchematicEnvironment
+
+client = Schematic(
+ api_key="",
+ environment=SchematicEnvironment.DEFAULT,
+)
+
+client.companies.get_company_billing_entity(
+ company_id="company_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
+
+
+
+
+client.companies.get_billing_entity_child_subscriptions(...) -> GetBillingEntityChildSubscriptionsResponse
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from schematic import Schematic
+from schematic.environment import SchematicEnvironment
+
+client = Schematic(
+ api_key="",
+ environment=SchematicEnvironment.DEFAULT,
+)
+
+client.companies.get_billing_entity_child_subscriptions(
+ company_id="company_id",
+)
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**company_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
diff --git a/src/schematic/__init__.py b/src/schematic/__init__.py
index 25b656f..b8adb42 100644
--- a/src/schematic/__init__.py
+++ b/src/schematic/__init__.py
@@ -21,6 +21,7 @@
AuditLogListResponseData,
AuditLogResponseData,
BillingCouponResponseData,
+ BillingCreditAutoTopupAvailability,
BillingCreditBundleResponseData,
BillingCreditBundleStatus,
BillingCreditBundleType,
@@ -82,6 +83,8 @@
CheckoutSettingsResponseData,
CheckoutSubscription,
ClerkIntegrationConfig,
+ CompanyBillingEntityResponseData,
+ CompanyBillingEntitySubscriptionResponseData,
CompanyCreditBalance,
CompanyCreditBalanceResponseData,
CompanyDetailResponseData,
@@ -512,6 +515,10 @@
DeleteUserResponse,
GetActiveCompanySubscriptionParams,
GetActiveCompanySubscriptionResponse,
+ GetBillingEntityChildSubscriptionsParams,
+ GetBillingEntityChildSubscriptionsResponse,
+ GetCompanyBillingEntityParams,
+ GetCompanyBillingEntityResponse,
GetCompanyResponse,
GetEntityTraitDefinitionResponse,
GetEntityTraitValuesParams,
@@ -789,6 +796,7 @@
"AuditLogResponseData": ".types",
"BadRequestError": ".errors",
"BillingCouponResponseData": ".types",
+ "BillingCreditAutoTopupAvailability": ".types",
"BillingCreditBundleResponseData": ".types",
"BillingCreditBundleStatus": ".types",
"BillingCreditBundleType": ".types",
@@ -855,6 +863,8 @@
"CheckoutSettingsResponseData": ".types",
"CheckoutSubscription": ".types",
"ClerkIntegrationConfig": ".types",
+ "CompanyBillingEntityResponseData": ".types",
+ "CompanyBillingEntitySubscriptionResponseData": ".types",
"CompanyCreditBalance": ".types",
"CompanyCreditBalanceResponseData": ".types",
"CompanyDetailResponseData": ".types",
@@ -1114,7 +1124,11 @@
"GetActivityResponse": ".insights",
"GetApiKeyResponse": ".accounts",
"GetAuditLogResponse": ".accounts",
+ "GetBillingEntityChildSubscriptionsParams": ".companies",
+ "GetBillingEntityChildSubscriptionsResponse": ".companies",
"GetCheckoutDataResponse": ".checkout",
+ "GetCompanyBillingEntityParams": ".companies",
+ "GetCompanyBillingEntityResponse": ".companies",
"GetCompanyOverrideResponse": ".entitlements",
"GetCompanyResponse": ".companies",
"GetComponentResponse": ".components",
@@ -1556,6 +1570,7 @@ def __dir__():
"AuditLogResponseData",
"BadRequestError",
"BillingCouponResponseData",
+ "BillingCreditAutoTopupAvailability",
"BillingCreditBundleResponseData",
"BillingCreditBundleStatus",
"BillingCreditBundleType",
@@ -1622,6 +1637,8 @@ def __dir__():
"CheckoutSettingsResponseData",
"CheckoutSubscription",
"ClerkIntegrationConfig",
+ "CompanyBillingEntityResponseData",
+ "CompanyBillingEntitySubscriptionResponseData",
"CompanyCreditBalance",
"CompanyCreditBalanceResponseData",
"CompanyDetailResponseData",
@@ -1881,7 +1898,11 @@ def __dir__():
"GetActivityResponse",
"GetApiKeyResponse",
"GetAuditLogResponse",
+ "GetBillingEntityChildSubscriptionsParams",
+ "GetBillingEntityChildSubscriptionsResponse",
"GetCheckoutDataResponse",
+ "GetCompanyBillingEntityParams",
+ "GetCompanyBillingEntityResponse",
"GetCompanyOverrideResponse",
"GetCompanyResponse",
"GetComponentResponse",
diff --git a/src/schematic/billing/client.py b/src/schematic/billing/client.py
index 1b732ef..3c18951 100644
--- a/src/schematic/billing/client.py
+++ b/src/schematic/billing/client.py
@@ -1576,6 +1576,7 @@ def upsert_billing_subscription(
total_price: int,
application_id: typing.Optional[str] = OMIT,
cancel_at: typing.Optional[int] = OMIT,
+ company_id: typing.Optional[str] = OMIT,
default_payment_method_external_id: typing.Optional[str] = OMIT,
default_payment_method_id: typing.Optional[str] = OMIT,
interval: typing.Optional[str] = OMIT,
@@ -1611,6 +1612,8 @@ def upsert_billing_subscription(
cancel_at : typing.Optional[int]
+ company_id : typing.Optional[str]
+
default_payment_method_external_id : typing.Optional[str]
default_payment_method_id : typing.Optional[str]
@@ -1695,6 +1698,7 @@ def upsert_billing_subscription(
total_price=total_price,
application_id=application_id,
cancel_at=cancel_at,
+ company_id=company_id,
default_payment_method_external_id=default_payment_method_external_id,
default_payment_method_id=default_payment_method_id,
interval=interval,
@@ -3428,6 +3432,7 @@ async def upsert_billing_subscription(
total_price: int,
application_id: typing.Optional[str] = OMIT,
cancel_at: typing.Optional[int] = OMIT,
+ company_id: typing.Optional[str] = OMIT,
default_payment_method_external_id: typing.Optional[str] = OMIT,
default_payment_method_id: typing.Optional[str] = OMIT,
interval: typing.Optional[str] = OMIT,
@@ -3463,6 +3468,8 @@ async def upsert_billing_subscription(
cancel_at : typing.Optional[int]
+ company_id : typing.Optional[str]
+
default_payment_method_external_id : typing.Optional[str]
default_payment_method_id : typing.Optional[str]
@@ -3554,6 +3561,7 @@ async def main() -> None:
total_price=total_price,
application_id=application_id,
cancel_at=cancel_at,
+ company_id=company_id,
default_payment_method_external_id=default_payment_method_external_id,
default_payment_method_id=default_payment_method_id,
interval=interval,
diff --git a/src/schematic/billing/raw_client.py b/src/schematic/billing/raw_client.py
index 418abca..7ca819e 100644
--- a/src/schematic/billing/raw_client.py
+++ b/src/schematic/billing/raw_client.py
@@ -3091,6 +3091,7 @@ def upsert_billing_subscription(
total_price: int,
application_id: typing.Optional[str] = OMIT,
cancel_at: typing.Optional[int] = OMIT,
+ company_id: typing.Optional[str] = OMIT,
default_payment_method_external_id: typing.Optional[str] = OMIT,
default_payment_method_id: typing.Optional[str] = OMIT,
interval: typing.Optional[str] = OMIT,
@@ -3126,6 +3127,8 @@ def upsert_billing_subscription(
cancel_at : typing.Optional[int]
+ company_id : typing.Optional[str]
+
default_payment_method_external_id : typing.Optional[str]
default_payment_method_id : typing.Optional[str]
@@ -3161,6 +3164,7 @@ def upsert_billing_subscription(
"application_id": application_id,
"cancel_at": cancel_at,
"cancel_at_period_end": cancel_at_period_end,
+ "company_id": company_id,
"currency": currency,
"customer_external_id": customer_external_id,
"default_payment_method_external_id": default_payment_method_external_id,
@@ -6302,6 +6306,7 @@ async def upsert_billing_subscription(
total_price: int,
application_id: typing.Optional[str] = OMIT,
cancel_at: typing.Optional[int] = OMIT,
+ company_id: typing.Optional[str] = OMIT,
default_payment_method_external_id: typing.Optional[str] = OMIT,
default_payment_method_id: typing.Optional[str] = OMIT,
interval: typing.Optional[str] = OMIT,
@@ -6337,6 +6342,8 @@ async def upsert_billing_subscription(
cancel_at : typing.Optional[int]
+ company_id : typing.Optional[str]
+
default_payment_method_external_id : typing.Optional[str]
default_payment_method_id : typing.Optional[str]
@@ -6372,6 +6379,7 @@ async def upsert_billing_subscription(
"application_id": application_id,
"cancel_at": cancel_at,
"cancel_at_period_end": cancel_at_period_end,
+ "company_id": company_id,
"currency": currency,
"customer_external_id": customer_external_id,
"default_payment_method_external_id": default_payment_method_external_id,
diff --git a/src/schematic/checkout/client.py b/src/schematic/checkout/client.py
index 0f9468c..69c7e54 100644
--- a/src/schematic/checkout/client.py
+++ b/src/schematic/checkout/client.py
@@ -51,6 +51,7 @@ def internal(
new_price_id: str,
pay_in_advance: typing.Sequence[UpdatePayInAdvanceRequestBody],
skip_trial: bool,
+ billing_entity_id: typing.Optional[str] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
opt_in_accepted: typing.Optional[bool] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
@@ -78,6 +79,8 @@ def internal(
skip_trial : bool
+ billing_entity_id : typing.Optional[str]
+
coupon_external_id : typing.Optional[str]
opt_in_accepted : typing.Optional[bool]
@@ -154,6 +157,7 @@ def internal(
new_price_id=new_price_id,
pay_in_advance=pay_in_advance,
skip_trial=skip_trial,
+ billing_entity_id=billing_entity_id,
coupon_external_id=coupon_external_id,
opt_in_accepted=opt_in_accepted,
payment_method_id=payment_method_id,
@@ -215,6 +219,7 @@ def preview_checkout_internal(
new_price_id: str,
pay_in_advance: typing.Sequence[UpdatePayInAdvanceRequestBody],
skip_trial: bool,
+ billing_entity_id: typing.Optional[str] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
opt_in_accepted: typing.Optional[bool] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
@@ -242,6 +247,8 @@ def preview_checkout_internal(
skip_trial : bool
+ billing_entity_id : typing.Optional[str]
+
coupon_external_id : typing.Optional[str]
opt_in_accepted : typing.Optional[bool]
@@ -318,6 +325,7 @@ def preview_checkout_internal(
new_price_id=new_price_id,
pay_in_advance=pay_in_advance,
skip_trial=skip_trial,
+ billing_entity_id=billing_entity_id,
coupon_external_id=coupon_external_id,
opt_in_accepted=opt_in_accepted,
payment_method_id=payment_method_id,
@@ -337,6 +345,7 @@ def manage_plan(
base_plan_id: typing.Optional[str] = OMIT,
base_plan_price_id: typing.Optional[str] = OMIT,
base_plan_version_id: typing.Optional[str] = OMIT,
+ billing_entity_id: typing.Optional[str] = OMIT,
cancel_immediately: typing.Optional[bool] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
@@ -364,6 +373,9 @@ def manage_plan(
base_plan_version_id : typing.Optional[str]
+ billing_entity_id : typing.Optional[str]
+ The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription.
+
cancel_immediately : typing.Optional[bool]
If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true.
@@ -435,6 +447,7 @@ def manage_plan(
base_plan_id=base_plan_id,
base_plan_price_id=base_plan_price_id,
base_plan_version_id=base_plan_version_id,
+ billing_entity_id=billing_entity_id,
cancel_immediately=cancel_immediately,
coupon_external_id=coupon_external_id,
payment_method_external_id=payment_method_external_id,
@@ -456,6 +469,7 @@ def preview_manage_plan(
base_plan_id: typing.Optional[str] = OMIT,
base_plan_price_id: typing.Optional[str] = OMIT,
base_plan_version_id: typing.Optional[str] = OMIT,
+ billing_entity_id: typing.Optional[str] = OMIT,
cancel_immediately: typing.Optional[bool] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
@@ -483,6 +497,9 @@ def preview_manage_plan(
base_plan_version_id : typing.Optional[str]
+ billing_entity_id : typing.Optional[str]
+ The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription.
+
cancel_immediately : typing.Optional[bool]
If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true.
@@ -554,6 +571,7 @@ def preview_manage_plan(
base_plan_id=base_plan_id,
base_plan_price_id=base_plan_price_id,
base_plan_version_id=base_plan_version_id,
+ billing_entity_id=billing_entity_id,
cancel_immediately=cancel_immediately,
coupon_external_id=coupon_external_id,
payment_method_external_id=payment_method_external_id,
@@ -677,6 +695,7 @@ async def internal(
new_price_id: str,
pay_in_advance: typing.Sequence[UpdatePayInAdvanceRequestBody],
skip_trial: bool,
+ billing_entity_id: typing.Optional[str] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
opt_in_accepted: typing.Optional[bool] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
@@ -704,6 +723,8 @@ async def internal(
skip_trial : bool
+ billing_entity_id : typing.Optional[str]
+
coupon_external_id : typing.Optional[str]
opt_in_accepted : typing.Optional[bool]
@@ -788,6 +809,7 @@ async def main() -> None:
new_price_id=new_price_id,
pay_in_advance=pay_in_advance,
skip_trial=skip_trial,
+ billing_entity_id=billing_entity_id,
coupon_external_id=coupon_external_id,
opt_in_accepted=opt_in_accepted,
payment_method_id=payment_method_id,
@@ -857,6 +879,7 @@ async def preview_checkout_internal(
new_price_id: str,
pay_in_advance: typing.Sequence[UpdatePayInAdvanceRequestBody],
skip_trial: bool,
+ billing_entity_id: typing.Optional[str] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
opt_in_accepted: typing.Optional[bool] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
@@ -884,6 +907,8 @@ async def preview_checkout_internal(
skip_trial : bool
+ billing_entity_id : typing.Optional[str]
+
coupon_external_id : typing.Optional[str]
opt_in_accepted : typing.Optional[bool]
@@ -968,6 +993,7 @@ async def main() -> None:
new_price_id=new_price_id,
pay_in_advance=pay_in_advance,
skip_trial=skip_trial,
+ billing_entity_id=billing_entity_id,
coupon_external_id=coupon_external_id,
opt_in_accepted=opt_in_accepted,
payment_method_id=payment_method_id,
@@ -987,6 +1013,7 @@ async def manage_plan(
base_plan_id: typing.Optional[str] = OMIT,
base_plan_price_id: typing.Optional[str] = OMIT,
base_plan_version_id: typing.Optional[str] = OMIT,
+ billing_entity_id: typing.Optional[str] = OMIT,
cancel_immediately: typing.Optional[bool] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
@@ -1014,6 +1041,9 @@ async def manage_plan(
base_plan_version_id : typing.Optional[str]
+ billing_entity_id : typing.Optional[str]
+ The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription.
+
cancel_immediately : typing.Optional[bool]
If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true.
@@ -1093,6 +1123,7 @@ async def main() -> None:
base_plan_id=base_plan_id,
base_plan_price_id=base_plan_price_id,
base_plan_version_id=base_plan_version_id,
+ billing_entity_id=billing_entity_id,
cancel_immediately=cancel_immediately,
coupon_external_id=coupon_external_id,
payment_method_external_id=payment_method_external_id,
@@ -1114,6 +1145,7 @@ async def preview_manage_plan(
base_plan_id: typing.Optional[str] = OMIT,
base_plan_price_id: typing.Optional[str] = OMIT,
base_plan_version_id: typing.Optional[str] = OMIT,
+ billing_entity_id: typing.Optional[str] = OMIT,
cancel_immediately: typing.Optional[bool] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
@@ -1141,6 +1173,9 @@ async def preview_manage_plan(
base_plan_version_id : typing.Optional[str]
+ billing_entity_id : typing.Optional[str]
+ The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription.
+
cancel_immediately : typing.Optional[bool]
If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true.
@@ -1220,6 +1255,7 @@ async def main() -> None:
base_plan_id=base_plan_id,
base_plan_price_id=base_plan_price_id,
base_plan_version_id=base_plan_version_id,
+ billing_entity_id=billing_entity_id,
cancel_immediately=cancel_immediately,
coupon_external_id=coupon_external_id,
payment_method_external_id=payment_method_external_id,
diff --git a/src/schematic/checkout/raw_client.py b/src/schematic/checkout/raw_client.py
index 06fad08..cce65b0 100644
--- a/src/schematic/checkout/raw_client.py
+++ b/src/schematic/checkout/raw_client.py
@@ -53,6 +53,7 @@ def internal(
new_price_id: str,
pay_in_advance: typing.Sequence[UpdatePayInAdvanceRequestBody],
skip_trial: bool,
+ billing_entity_id: typing.Optional[str] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
opt_in_accepted: typing.Optional[bool] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
@@ -80,6 +81,8 @@ def internal(
skip_trial : bool
+ billing_entity_id : typing.Optional[str]
+
coupon_external_id : typing.Optional[str]
opt_in_accepted : typing.Optional[bool]
@@ -108,6 +111,7 @@ def internal(
annotation=typing.Sequence[UpdateAutoTopupOverrideRequestBody],
direction="write",
),
+ "billing_entity_id": billing_entity_id,
"company_id": company_id,
"coupon_external_id": coupon_external_id,
"credit_bundles": convert_and_respect_annotation_metadata(
@@ -339,6 +343,7 @@ def preview_checkout_internal(
new_price_id: str,
pay_in_advance: typing.Sequence[UpdatePayInAdvanceRequestBody],
skip_trial: bool,
+ billing_entity_id: typing.Optional[str] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
opt_in_accepted: typing.Optional[bool] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
@@ -366,6 +371,8 @@ def preview_checkout_internal(
skip_trial : bool
+ billing_entity_id : typing.Optional[str]
+
coupon_external_id : typing.Optional[str]
opt_in_accepted : typing.Optional[bool]
@@ -394,6 +401,7 @@ def preview_checkout_internal(
annotation=typing.Sequence[UpdateAutoTopupOverrideRequestBody],
direction="write",
),
+ "billing_entity_id": billing_entity_id,
"company_id": company_id,
"coupon_external_id": coupon_external_id,
"credit_bundles": convert_and_respect_annotation_metadata(
@@ -507,6 +515,7 @@ def manage_plan(
base_plan_id: typing.Optional[str] = OMIT,
base_plan_price_id: typing.Optional[str] = OMIT,
base_plan_version_id: typing.Optional[str] = OMIT,
+ billing_entity_id: typing.Optional[str] = OMIT,
cancel_immediately: typing.Optional[bool] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
@@ -534,6 +543,9 @@ def manage_plan(
base_plan_version_id : typing.Optional[str]
+ billing_entity_id : typing.Optional[str]
+ The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription.
+
cancel_immediately : typing.Optional[bool]
If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true.
@@ -566,6 +578,7 @@ def manage_plan(
"base_plan_id": base_plan_id,
"base_plan_price_id": base_plan_price_id,
"base_plan_version_id": base_plan_version_id,
+ "billing_entity_id": billing_entity_id,
"cancel_immediately": cancel_immediately,
"company_id": company_id,
"coupon_external_id": coupon_external_id,
@@ -680,6 +693,7 @@ def preview_manage_plan(
base_plan_id: typing.Optional[str] = OMIT,
base_plan_price_id: typing.Optional[str] = OMIT,
base_plan_version_id: typing.Optional[str] = OMIT,
+ billing_entity_id: typing.Optional[str] = OMIT,
cancel_immediately: typing.Optional[bool] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
@@ -707,6 +721,9 @@ def preview_manage_plan(
base_plan_version_id : typing.Optional[str]
+ billing_entity_id : typing.Optional[str]
+ The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription.
+
cancel_immediately : typing.Optional[bool]
If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true.
@@ -739,6 +756,7 @@ def preview_manage_plan(
"base_plan_id": base_plan_id,
"base_plan_price_id": base_plan_price_id,
"base_plan_version_id": base_plan_version_id,
+ "billing_entity_id": billing_entity_id,
"cancel_immediately": cancel_immediately,
"company_id": company_id,
"coupon_external_id": coupon_external_id,
@@ -1091,6 +1109,7 @@ async def internal(
new_price_id: str,
pay_in_advance: typing.Sequence[UpdatePayInAdvanceRequestBody],
skip_trial: bool,
+ billing_entity_id: typing.Optional[str] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
opt_in_accepted: typing.Optional[bool] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
@@ -1118,6 +1137,8 @@ async def internal(
skip_trial : bool
+ billing_entity_id : typing.Optional[str]
+
coupon_external_id : typing.Optional[str]
opt_in_accepted : typing.Optional[bool]
@@ -1146,6 +1167,7 @@ async def internal(
annotation=typing.Sequence[UpdateAutoTopupOverrideRequestBody],
direction="write",
),
+ "billing_entity_id": billing_entity_id,
"company_id": company_id,
"coupon_external_id": coupon_external_id,
"credit_bundles": convert_and_respect_annotation_metadata(
@@ -1377,6 +1399,7 @@ async def preview_checkout_internal(
new_price_id: str,
pay_in_advance: typing.Sequence[UpdatePayInAdvanceRequestBody],
skip_trial: bool,
+ billing_entity_id: typing.Optional[str] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
opt_in_accepted: typing.Optional[bool] = OMIT,
payment_method_id: typing.Optional[str] = OMIT,
@@ -1404,6 +1427,8 @@ async def preview_checkout_internal(
skip_trial : bool
+ billing_entity_id : typing.Optional[str]
+
coupon_external_id : typing.Optional[str]
opt_in_accepted : typing.Optional[bool]
@@ -1432,6 +1457,7 @@ async def preview_checkout_internal(
annotation=typing.Sequence[UpdateAutoTopupOverrideRequestBody],
direction="write",
),
+ "billing_entity_id": billing_entity_id,
"company_id": company_id,
"coupon_external_id": coupon_external_id,
"credit_bundles": convert_and_respect_annotation_metadata(
@@ -1545,6 +1571,7 @@ async def manage_plan(
base_plan_id: typing.Optional[str] = OMIT,
base_plan_price_id: typing.Optional[str] = OMIT,
base_plan_version_id: typing.Optional[str] = OMIT,
+ billing_entity_id: typing.Optional[str] = OMIT,
cancel_immediately: typing.Optional[bool] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
@@ -1572,6 +1599,9 @@ async def manage_plan(
base_plan_version_id : typing.Optional[str]
+ billing_entity_id : typing.Optional[str]
+ The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription.
+
cancel_immediately : typing.Optional[bool]
If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true.
@@ -1604,6 +1634,7 @@ async def manage_plan(
"base_plan_id": base_plan_id,
"base_plan_price_id": base_plan_price_id,
"base_plan_version_id": base_plan_version_id,
+ "billing_entity_id": billing_entity_id,
"cancel_immediately": cancel_immediately,
"company_id": company_id,
"coupon_external_id": coupon_external_id,
@@ -1718,6 +1749,7 @@ async def preview_manage_plan(
base_plan_id: typing.Optional[str] = OMIT,
base_plan_price_id: typing.Optional[str] = OMIT,
base_plan_version_id: typing.Optional[str] = OMIT,
+ billing_entity_id: typing.Optional[str] = OMIT,
cancel_immediately: typing.Optional[bool] = OMIT,
coupon_external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
@@ -1745,6 +1777,9 @@ async def preview_manage_plan(
base_plan_version_id : typing.Optional[str]
+ billing_entity_id : typing.Optional[str]
+ The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription.
+
cancel_immediately : typing.Optional[bool]
If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true.
@@ -1777,6 +1812,7 @@ async def preview_manage_plan(
"base_plan_id": base_plan_id,
"base_plan_price_id": base_plan_price_id,
"base_plan_version_id": base_plan_version_id,
+ "billing_entity_id": billing_entity_id,
"cancel_immediately": cancel_immediately,
"company_id": company_id,
"coupon_external_id": coupon_external_id,
diff --git a/src/schematic/companies/__init__.py b/src/schematic/companies/__init__.py
index ffb2813..d5505d3 100644
--- a/src/schematic/companies/__init__.py
+++ b/src/schematic/companies/__init__.py
@@ -27,6 +27,10 @@
DeleteUserResponse,
GetActiveCompanySubscriptionParams,
GetActiveCompanySubscriptionResponse,
+ GetBillingEntityChildSubscriptionsParams,
+ GetBillingEntityChildSubscriptionsResponse,
+ GetCompanyBillingEntityParams,
+ GetCompanyBillingEntityResponse,
GetCompanyResponse,
GetEntityTraitDefinitionResponse,
GetEntityTraitValuesParams,
@@ -82,6 +86,10 @@
"DeleteUserResponse": ".types",
"GetActiveCompanySubscriptionParams": ".types",
"GetActiveCompanySubscriptionResponse": ".types",
+ "GetBillingEntityChildSubscriptionsParams": ".types",
+ "GetBillingEntityChildSubscriptionsResponse": ".types",
+ "GetCompanyBillingEntityParams": ".types",
+ "GetCompanyBillingEntityResponse": ".types",
"GetCompanyResponse": ".types",
"GetEntityTraitDefinitionResponse": ".types",
"GetEntityTraitValuesParams": ".types",
@@ -160,6 +168,10 @@ def __dir__():
"DeleteUserResponse",
"GetActiveCompanySubscriptionParams",
"GetActiveCompanySubscriptionResponse",
+ "GetBillingEntityChildSubscriptionsParams",
+ "GetBillingEntityChildSubscriptionsResponse",
+ "GetCompanyBillingEntityParams",
+ "GetCompanyBillingEntityResponse",
"GetCompanyResponse",
"GetEntityTraitDefinitionResponse",
"GetEntityTraitValuesParams",
diff --git a/src/schematic/companies/client.py b/src/schematic/companies/client.py
index 81ca507..aa396ca 100644
--- a/src/schematic/companies/client.py
+++ b/src/schematic/companies/client.py
@@ -27,6 +27,8 @@
from .types.delete_user_by_keys_response import DeleteUserByKeysResponse
from .types.delete_user_response import DeleteUserResponse
from .types.get_active_company_subscription_response import GetActiveCompanySubscriptionResponse
+from .types.get_billing_entity_child_subscriptions_response import GetBillingEntityChildSubscriptionsResponse
+from .types.get_company_billing_entity_response import GetCompanyBillingEntityResponse
from .types.get_company_response import GetCompanyResponse
from .types.get_entity_trait_definition_response import GetEntityTraitDefinitionResponse
from .types.get_entity_trait_values_response import GetEntityTraitValuesResponse
@@ -644,6 +646,68 @@ def lookup_company(
_response = self._raw_client.lookup_company(keys=keys, request_options=request_options)
return _response.data
+ def get_company_billing_entity(
+ self, *, company_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
+ ) -> GetCompanyBillingEntityResponse:
+ """
+ Parameters
+ ----------
+ company_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ GetCompanyBillingEntityResponse
+ OK
+
+ Examples
+ --------
+ from schematic import Schematic
+
+ client = Schematic(
+ api_key="YOUR_API_KEY",
+ )
+ client.companies.get_company_billing_entity(
+ company_id="company_id",
+ )
+ """
+ _response = self._raw_client.get_company_billing_entity(company_id=company_id, request_options=request_options)
+ return _response.data
+
+ def get_billing_entity_child_subscriptions(
+ self, *, company_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
+ ) -> GetBillingEntityChildSubscriptionsResponse:
+ """
+ Parameters
+ ----------
+ company_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ GetBillingEntityChildSubscriptionsResponse
+ OK
+
+ Examples
+ --------
+ from schematic import Schematic
+
+ client = Schematic(
+ api_key="YOUR_API_KEY",
+ )
+ client.companies.get_billing_entity_child_subscriptions(
+ company_id="company_id",
+ )
+ """
+ _response = self._raw_client.get_billing_entity_child_subscriptions(
+ company_id=company_id, request_options=request_options
+ )
+ return _response.data
+
def list_company_memberships(
self,
*,
@@ -2708,6 +2772,86 @@ async def main() -> None:
_response = await self._raw_client.lookup_company(keys=keys, request_options=request_options)
return _response.data
+ async def get_company_billing_entity(
+ self, *, company_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
+ ) -> GetCompanyBillingEntityResponse:
+ """
+ Parameters
+ ----------
+ company_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ GetCompanyBillingEntityResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from schematic import AsyncSchematic
+
+ client = AsyncSchematic(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.companies.get_company_billing_entity(
+ company_id="company_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_company_billing_entity(
+ company_id=company_id, request_options=request_options
+ )
+ return _response.data
+
+ async def get_billing_entity_child_subscriptions(
+ self, *, company_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
+ ) -> GetBillingEntityChildSubscriptionsResponse:
+ """
+ Parameters
+ ----------
+ company_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ GetBillingEntityChildSubscriptionsResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from schematic import AsyncSchematic
+
+ client = AsyncSchematic(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.companies.get_billing_entity_child_subscriptions(
+ company_id="company_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._raw_client.get_billing_entity_child_subscriptions(
+ company_id=company_id, request_options=request_options
+ )
+ return _response.data
+
async def list_company_memberships(
self,
*,
diff --git a/src/schematic/companies/raw_client.py b/src/schematic/companies/raw_client.py
index 1da3685..46d70e8 100644
--- a/src/schematic/companies/raw_client.py
+++ b/src/schematic/companies/raw_client.py
@@ -39,6 +39,8 @@
from .types.delete_user_by_keys_response import DeleteUserByKeysResponse
from .types.delete_user_response import DeleteUserResponse
from .types.get_active_company_subscription_response import GetActiveCompanySubscriptionResponse
+from .types.get_billing_entity_child_subscriptions_response import GetBillingEntityChildSubscriptionsResponse
+from .types.get_company_billing_entity_response import GetCompanyBillingEntityResponse
from .types.get_company_response import GetCompanyResponse
from .types.get_entity_trait_definition_response import GetEntityTraitDefinitionResponse
from .types.get_entity_trait_values_response import GetEntityTraitValuesResponse
@@ -1156,6 +1158,210 @@ def lookup_company(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
+ def get_company_billing_entity(
+ self, *, company_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[GetCompanyBillingEntityResponse]:
+ """
+ Parameters
+ ----------
+ company_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[GetCompanyBillingEntityResponse]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "company-billing-entity",
+ method="GET",
+ params={
+ "company_id": company_id,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ GetCompanyBillingEntityResponse,
+ parse_obj_as(
+ type_=GetCompanyBillingEntityResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ def get_billing_entity_child_subscriptions(
+ self, *, company_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
+ ) -> HttpResponse[GetBillingEntityChildSubscriptionsResponse]:
+ """
+ Parameters
+ ----------
+ company_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ HttpResponse[GetBillingEntityChildSubscriptionsResponse]
+ OK
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "company-billing-entity-subscriptions",
+ method="GET",
+ params={
+ "company_id": company_id,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ GetBillingEntityChildSubscriptionsResponse,
+ parse_obj_as(
+ type_=GetBillingEntityChildSubscriptionsResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return HttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
def list_company_memberships(
self,
*,
@@ -5541,6 +5747,210 @@ async def lookup_company(
status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
)
+ async def get_company_billing_entity(
+ self, *, company_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[GetCompanyBillingEntityResponse]:
+ """
+ Parameters
+ ----------
+ company_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[GetCompanyBillingEntityResponse]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "company-billing-entity",
+ method="GET",
+ params={
+ "company_id": company_id,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ GetCompanyBillingEntityResponse,
+ parse_obj_as(
+ type_=GetCompanyBillingEntityResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
+ async def get_billing_entity_child_subscriptions(
+ self, *, company_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
+ ) -> AsyncHttpResponse[GetBillingEntityChildSubscriptionsResponse]:
+ """
+ Parameters
+ ----------
+ company_id : typing.Optional[str]
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ AsyncHttpResponse[GetBillingEntityChildSubscriptionsResponse]
+ OK
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "company-billing-entity-subscriptions",
+ method="GET",
+ params={
+ "company_id": company_id,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ _data = typing.cast(
+ GetBillingEntityChildSubscriptionsResponse,
+ parse_obj_as(
+ type_=GetBillingEntityChildSubscriptionsResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ return AsyncHttpResponse(response=_response, data=_data)
+ if _response.status_code == 400:
+ raise BadRequestError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 404:
+ raise NotFoundError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ headers=dict(_response.headers),
+ body=typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ ),
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.text
+ )
+ except ValidationError as e:
+ raise ParsingError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
+ )
+ raise core_api_error_ApiError(
+ status_code=_response.status_code, headers=dict(_response.headers), body=_response_json
+ )
+
async def list_company_memberships(
self,
*,
diff --git a/src/schematic/companies/types/__init__.py b/src/schematic/companies/types/__init__.py
index a8e0ac3..c4694e1 100644
--- a/src/schematic/companies/types/__init__.py
+++ b/src/schematic/companies/types/__init__.py
@@ -26,6 +26,10 @@
from .delete_user_response import DeleteUserResponse
from .get_active_company_subscription_params import GetActiveCompanySubscriptionParams
from .get_active_company_subscription_response import GetActiveCompanySubscriptionResponse
+ from .get_billing_entity_child_subscriptions_params import GetBillingEntityChildSubscriptionsParams
+ from .get_billing_entity_child_subscriptions_response import GetBillingEntityChildSubscriptionsResponse
+ from .get_company_billing_entity_params import GetCompanyBillingEntityParams
+ from .get_company_billing_entity_response import GetCompanyBillingEntityResponse
from .get_company_response import GetCompanyResponse
from .get_entity_trait_definition_response import GetEntityTraitDefinitionResponse
from .get_entity_trait_values_params import GetEntityTraitValuesParams
@@ -80,6 +84,10 @@
"DeleteUserResponse": ".delete_user_response",
"GetActiveCompanySubscriptionParams": ".get_active_company_subscription_params",
"GetActiveCompanySubscriptionResponse": ".get_active_company_subscription_response",
+ "GetBillingEntityChildSubscriptionsParams": ".get_billing_entity_child_subscriptions_params",
+ "GetBillingEntityChildSubscriptionsResponse": ".get_billing_entity_child_subscriptions_response",
+ "GetCompanyBillingEntityParams": ".get_company_billing_entity_params",
+ "GetCompanyBillingEntityResponse": ".get_company_billing_entity_response",
"GetCompanyResponse": ".get_company_response",
"GetEntityTraitDefinitionResponse": ".get_entity_trait_definition_response",
"GetEntityTraitValuesParams": ".get_entity_trait_values_params",
@@ -158,6 +166,10 @@ def __dir__():
"DeleteUserResponse",
"GetActiveCompanySubscriptionParams",
"GetActiveCompanySubscriptionResponse",
+ "GetBillingEntityChildSubscriptionsParams",
+ "GetBillingEntityChildSubscriptionsResponse",
+ "GetCompanyBillingEntityParams",
+ "GetCompanyBillingEntityResponse",
"GetCompanyResponse",
"GetEntityTraitDefinitionResponse",
"GetEntityTraitValuesParams",
diff --git a/src/schematic/companies/types/get_billing_entity_child_subscriptions_params.py b/src/schematic/companies/types/get_billing_entity_child_subscriptions_params.py
new file mode 100644
index 0000000..6461a68
--- /dev/null
+++ b/src/schematic/companies/types/get_billing_entity_child_subscriptions_params.py
@@ -0,0 +1,23 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+
+
+class GetBillingEntityChildSubscriptionsParams(UniversalBaseModel):
+ """
+ Input parameters
+ """
+
+ company_id: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/companies/types/get_billing_entity_child_subscriptions_response.py b/src/schematic/companies/types/get_billing_entity_child_subscriptions_response.py
new file mode 100644
index 0000000..78a0a27
--- /dev/null
+++ b/src/schematic/companies/types/get_billing_entity_child_subscriptions_response.py
@@ -0,0 +1,25 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ...types.company_billing_entity_subscription_response_data import CompanyBillingEntitySubscriptionResponseData
+from .get_billing_entity_child_subscriptions_params import GetBillingEntityChildSubscriptionsParams
+
+
+class GetBillingEntityChildSubscriptionsResponse(UniversalBaseModel):
+ data: typing.List[CompanyBillingEntitySubscriptionResponseData]
+ params: GetBillingEntityChildSubscriptionsParams = pydantic.Field()
+ """
+ Input parameters
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/companies/types/get_company_billing_entity_params.py b/src/schematic/companies/types/get_company_billing_entity_params.py
new file mode 100644
index 0000000..68cbc0d
--- /dev/null
+++ b/src/schematic/companies/types/get_company_billing_entity_params.py
@@ -0,0 +1,23 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+
+
+class GetCompanyBillingEntityParams(UniversalBaseModel):
+ """
+ Input parameters
+ """
+
+ company_id: typing.Optional[str] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/companies/types/get_company_billing_entity_response.py b/src/schematic/companies/types/get_company_billing_entity_response.py
new file mode 100644
index 0000000..250ca8c
--- /dev/null
+++ b/src/schematic/companies/types/get_company_billing_entity_response.py
@@ -0,0 +1,25 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from ...types.company_billing_entity_response_data import CompanyBillingEntityResponseData
+from .get_company_billing_entity_params import GetCompanyBillingEntityParams
+
+
+class GetCompanyBillingEntityResponse(UniversalBaseModel):
+ data: typing.List[CompanyBillingEntityResponseData]
+ params: GetCompanyBillingEntityParams = pydantic.Field()
+ """
+ Input parameters
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/core/client_wrapper.py b/src/schematic/core/client_wrapper.py
index 65f068b..6b64373 100644
--- a/src/schematic/core/client_wrapper.py
+++ b/src/schematic/core/client_wrapper.py
@@ -27,12 +27,12 @@ def get_headers(self) -> typing.Dict[str, str]:
import platform
headers: typing.Dict[str, str] = {
- "User-Agent": "schematichq/1.2.6",
+ "User-Agent": "schematichq/1.2.7",
"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.2.6",
+ "X-Fern-SDK-Version": "1.2.7",
**(self.get_custom_headers() or {}),
}
headers["X-Schematic-Api-Key"] = self.api_key
diff --git a/src/schematic/credits/client.py b/src/schematic/credits/client.py
index a069aee..531ac7f 100644
--- a/src/schematic/credits/client.py
+++ b/src/schematic/credits/client.py
@@ -5,6 +5,7 @@
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
+from ..types.billing_credit_auto_topup_availability import BillingCreditAutoTopupAvailability
from ..types.billing_credit_bundle_status import BillingCreditBundleStatus
from ..types.billing_credit_bundle_type import BillingCreditBundleType
from ..types.billing_credit_burn_strategy import BillingCreditBurnStrategy
@@ -1322,6 +1323,7 @@ def create_billing_plan_credit_grant(
apply_to_existing: typing.Optional[bool] = OMIT,
auto_topup_amount: typing.Optional[int] = OMIT,
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = OMIT,
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = OMIT,
auto_topup_enabled: typing.Optional[bool] = OMIT,
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -1329,6 +1331,7 @@ def create_billing_plan_credit_grant(
auto_topup_self_service: typing.Optional[bool] = OMIT,
auto_topup_threshold_credits: typing.Optional[int] = OMIT,
auto_topup_threshold_percent: typing.Optional[int] = OMIT,
+ can_buy_bundles: typing.Optional[bool] = OMIT,
expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
expiry_unit_count: typing.Optional[int] = OMIT,
@@ -1356,6 +1359,8 @@ def create_billing_plan_credit_grant(
auto_topup_amount_type : typing.Optional[CreditAutoTopupAmountType]
+ auto_topup_availability : typing.Optional[BillingCreditAutoTopupAvailability]
+
auto_topup_enabled : typing.Optional[bool]
auto_topup_expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -1370,6 +1375,8 @@ def create_billing_plan_credit_grant(
auto_topup_threshold_percent : typing.Optional[int]
+ can_buy_bundles : typing.Optional[bool]
+
expiry_type : typing.Optional[BillingCreditExpiryType]
expiry_unit : typing.Optional[BillingCreditExpiryUnit]
@@ -1415,6 +1422,7 @@ def create_billing_plan_credit_grant(
apply_to_existing=apply_to_existing,
auto_topup_amount=auto_topup_amount,
auto_topup_amount_type=auto_topup_amount_type,
+ auto_topup_availability=auto_topup_availability,
auto_topup_enabled=auto_topup_enabled,
auto_topup_expiry_type=auto_topup_expiry_type,
auto_topup_expiry_unit=auto_topup_expiry_unit,
@@ -1422,6 +1430,7 @@ def create_billing_plan_credit_grant(
auto_topup_self_service=auto_topup_self_service,
auto_topup_threshold_credits=auto_topup_threshold_credits,
auto_topup_threshold_percent=auto_topup_threshold_percent,
+ can_buy_bundles=can_buy_bundles,
expiry_type=expiry_type,
expiry_unit=expiry_unit,
expiry_unit_count=expiry_unit_count,
@@ -1474,6 +1483,7 @@ def update_billing_plan_credit_grant(
apply_to_existing: typing.Optional[bool] = OMIT,
auto_topup_amount: typing.Optional[int] = OMIT,
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = OMIT,
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = OMIT,
auto_topup_enabled: typing.Optional[bool] = OMIT,
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -1481,6 +1491,7 @@ def update_billing_plan_credit_grant(
auto_topup_self_service: typing.Optional[bool] = OMIT,
auto_topup_threshold_credits: typing.Optional[int] = OMIT,
auto_topup_threshold_percent: typing.Optional[int] = OMIT,
+ can_buy_bundles: typing.Optional[bool] = OMIT,
credit_amount: typing.Optional[int] = OMIT,
expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -1505,6 +1516,8 @@ def update_billing_plan_credit_grant(
auto_topup_amount_type : typing.Optional[CreditAutoTopupAmountType]
+ auto_topup_availability : typing.Optional[BillingCreditAutoTopupAvailability]
+
auto_topup_enabled : typing.Optional[bool]
auto_topup_expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -1519,6 +1532,8 @@ def update_billing_plan_credit_grant(
auto_topup_threshold_percent : typing.Optional[int]
+ can_buy_bundles : typing.Optional[bool]
+
credit_amount : typing.Optional[int]
expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -1560,6 +1575,7 @@ def update_billing_plan_credit_grant(
apply_to_existing=apply_to_existing,
auto_topup_amount=auto_topup_amount,
auto_topup_amount_type=auto_topup_amount_type,
+ auto_topup_availability=auto_topup_availability,
auto_topup_enabled=auto_topup_enabled,
auto_topup_expiry_type=auto_topup_expiry_type,
auto_topup_expiry_unit=auto_topup_expiry_unit,
@@ -1567,6 +1583,7 @@ def update_billing_plan_credit_grant(
auto_topup_self_service=auto_topup_self_service,
auto_topup_threshold_credits=auto_topup_threshold_credits,
auto_topup_threshold_percent=auto_topup_threshold_percent,
+ can_buy_bundles=can_buy_bundles,
credit_amount=credit_amount,
expiry_type=expiry_type,
expiry_unit=expiry_unit,
@@ -3286,6 +3303,7 @@ async def create_billing_plan_credit_grant(
apply_to_existing: typing.Optional[bool] = OMIT,
auto_topup_amount: typing.Optional[int] = OMIT,
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = OMIT,
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = OMIT,
auto_topup_enabled: typing.Optional[bool] = OMIT,
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -3293,6 +3311,7 @@ async def create_billing_plan_credit_grant(
auto_topup_self_service: typing.Optional[bool] = OMIT,
auto_topup_threshold_credits: typing.Optional[int] = OMIT,
auto_topup_threshold_percent: typing.Optional[int] = OMIT,
+ can_buy_bundles: typing.Optional[bool] = OMIT,
expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
expiry_unit_count: typing.Optional[int] = OMIT,
@@ -3320,6 +3339,8 @@ async def create_billing_plan_credit_grant(
auto_topup_amount_type : typing.Optional[CreditAutoTopupAmountType]
+ auto_topup_availability : typing.Optional[BillingCreditAutoTopupAvailability]
+
auto_topup_enabled : typing.Optional[bool]
auto_topup_expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -3334,6 +3355,8 @@ async def create_billing_plan_credit_grant(
auto_topup_threshold_percent : typing.Optional[int]
+ can_buy_bundles : typing.Optional[bool]
+
expiry_type : typing.Optional[BillingCreditExpiryType]
expiry_unit : typing.Optional[BillingCreditExpiryUnit]
@@ -3387,6 +3410,7 @@ async def main() -> None:
apply_to_existing=apply_to_existing,
auto_topup_amount=auto_topup_amount,
auto_topup_amount_type=auto_topup_amount_type,
+ auto_topup_availability=auto_topup_availability,
auto_topup_enabled=auto_topup_enabled,
auto_topup_expiry_type=auto_topup_expiry_type,
auto_topup_expiry_unit=auto_topup_expiry_unit,
@@ -3394,6 +3418,7 @@ async def main() -> None:
auto_topup_self_service=auto_topup_self_service,
auto_topup_threshold_credits=auto_topup_threshold_credits,
auto_topup_threshold_percent=auto_topup_threshold_percent,
+ can_buy_bundles=can_buy_bundles,
expiry_type=expiry_type,
expiry_unit=expiry_unit,
expiry_unit_count=expiry_unit_count,
@@ -3454,6 +3479,7 @@ async def update_billing_plan_credit_grant(
apply_to_existing: typing.Optional[bool] = OMIT,
auto_topup_amount: typing.Optional[int] = OMIT,
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = OMIT,
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = OMIT,
auto_topup_enabled: typing.Optional[bool] = OMIT,
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -3461,6 +3487,7 @@ async def update_billing_plan_credit_grant(
auto_topup_self_service: typing.Optional[bool] = OMIT,
auto_topup_threshold_credits: typing.Optional[int] = OMIT,
auto_topup_threshold_percent: typing.Optional[int] = OMIT,
+ can_buy_bundles: typing.Optional[bool] = OMIT,
credit_amount: typing.Optional[int] = OMIT,
expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -3485,6 +3512,8 @@ async def update_billing_plan_credit_grant(
auto_topup_amount_type : typing.Optional[CreditAutoTopupAmountType]
+ auto_topup_availability : typing.Optional[BillingCreditAutoTopupAvailability]
+
auto_topup_enabled : typing.Optional[bool]
auto_topup_expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -3499,6 +3528,8 @@ async def update_billing_plan_credit_grant(
auto_topup_threshold_percent : typing.Optional[int]
+ can_buy_bundles : typing.Optional[bool]
+
credit_amount : typing.Optional[int]
expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -3548,6 +3579,7 @@ async def main() -> None:
apply_to_existing=apply_to_existing,
auto_topup_amount=auto_topup_amount,
auto_topup_amount_type=auto_topup_amount_type,
+ auto_topup_availability=auto_topup_availability,
auto_topup_enabled=auto_topup_enabled,
auto_topup_expiry_type=auto_topup_expiry_type,
auto_topup_expiry_unit=auto_topup_expiry_unit,
@@ -3555,6 +3587,7 @@ async def main() -> None:
auto_topup_self_service=auto_topup_self_service,
auto_topup_threshold_credits=auto_topup_threshold_credits,
auto_topup_threshold_percent=auto_topup_threshold_percent,
+ can_buy_bundles=can_buy_bundles,
credit_amount=credit_amount,
expiry_type=expiry_type,
expiry_unit=expiry_unit,
diff --git a/src/schematic/credits/raw_client.py b/src/schematic/credits/raw_client.py
index 7c1de97..6405d4a 100644
--- a/src/schematic/credits/raw_client.py
+++ b/src/schematic/credits/raw_client.py
@@ -18,6 +18,7 @@
from ..errors.not_found_error import NotFoundError
from ..errors.unauthorized_error import UnauthorizedError
from ..types.api_error import ApiError as types_api_error_ApiError
+from ..types.billing_credit_auto_topup_availability import BillingCreditAutoTopupAvailability
from ..types.billing_credit_bundle_status import BillingCreditBundleStatus
from ..types.billing_credit_bundle_type import BillingCreditBundleType
from ..types.billing_credit_burn_strategy import BillingCreditBurnStrategy
@@ -2921,6 +2922,7 @@ def create_billing_plan_credit_grant(
apply_to_existing: typing.Optional[bool] = OMIT,
auto_topup_amount: typing.Optional[int] = OMIT,
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = OMIT,
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = OMIT,
auto_topup_enabled: typing.Optional[bool] = OMIT,
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -2928,6 +2930,7 @@ def create_billing_plan_credit_grant(
auto_topup_self_service: typing.Optional[bool] = OMIT,
auto_topup_threshold_credits: typing.Optional[int] = OMIT,
auto_topup_threshold_percent: typing.Optional[int] = OMIT,
+ can_buy_bundles: typing.Optional[bool] = OMIT,
expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
expiry_unit_count: typing.Optional[int] = OMIT,
@@ -2955,6 +2958,8 @@ def create_billing_plan_credit_grant(
auto_topup_amount_type : typing.Optional[CreditAutoTopupAmountType]
+ auto_topup_availability : typing.Optional[BillingCreditAutoTopupAvailability]
+
auto_topup_enabled : typing.Optional[bool]
auto_topup_expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -2969,6 +2974,8 @@ def create_billing_plan_credit_grant(
auto_topup_threshold_percent : typing.Optional[int]
+ can_buy_bundles : typing.Optional[bool]
+
expiry_type : typing.Optional[BillingCreditExpiryType]
expiry_unit : typing.Optional[BillingCreditExpiryUnit]
@@ -2997,6 +3004,7 @@ def create_billing_plan_credit_grant(
"apply_to_existing": apply_to_existing,
"auto_topup_amount": auto_topup_amount,
"auto_topup_amount_type": auto_topup_amount_type,
+ "auto_topup_availability": auto_topup_availability,
"auto_topup_enabled": auto_topup_enabled,
"auto_topup_expiry_type": auto_topup_expiry_type,
"auto_topup_expiry_unit": auto_topup_expiry_unit,
@@ -3004,6 +3012,7 @@ def create_billing_plan_credit_grant(
"auto_topup_self_service": auto_topup_self_service,
"auto_topup_threshold_credits": auto_topup_threshold_credits,
"auto_topup_threshold_percent": auto_topup_threshold_percent,
+ "can_buy_bundles": can_buy_bundles,
"credit_amount": credit_amount,
"credit_id": credit_id,
"expiry_type": expiry_type,
@@ -3198,6 +3207,7 @@ def update_billing_plan_credit_grant(
apply_to_existing: typing.Optional[bool] = OMIT,
auto_topup_amount: typing.Optional[int] = OMIT,
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = OMIT,
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = OMIT,
auto_topup_enabled: typing.Optional[bool] = OMIT,
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -3205,6 +3215,7 @@ def update_billing_plan_credit_grant(
auto_topup_self_service: typing.Optional[bool] = OMIT,
auto_topup_threshold_credits: typing.Optional[int] = OMIT,
auto_topup_threshold_percent: typing.Optional[int] = OMIT,
+ can_buy_bundles: typing.Optional[bool] = OMIT,
credit_amount: typing.Optional[int] = OMIT,
expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -3229,6 +3240,8 @@ def update_billing_plan_credit_grant(
auto_topup_amount_type : typing.Optional[CreditAutoTopupAmountType]
+ auto_topup_availability : typing.Optional[BillingCreditAutoTopupAvailability]
+
auto_topup_enabled : typing.Optional[bool]
auto_topup_expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -3243,6 +3256,8 @@ def update_billing_plan_credit_grant(
auto_topup_threshold_percent : typing.Optional[int]
+ can_buy_bundles : typing.Optional[bool]
+
credit_amount : typing.Optional[int]
expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -3271,6 +3286,7 @@ def update_billing_plan_credit_grant(
"apply_to_existing": apply_to_existing,
"auto_topup_amount": auto_topup_amount,
"auto_topup_amount_type": auto_topup_amount_type,
+ "auto_topup_availability": auto_topup_availability,
"auto_topup_enabled": auto_topup_enabled,
"auto_topup_expiry_type": auto_topup_expiry_type,
"auto_topup_expiry_unit": auto_topup_expiry_unit,
@@ -3278,6 +3294,7 @@ def update_billing_plan_credit_grant(
"auto_topup_self_service": auto_topup_self_service,
"auto_topup_threshold_credits": auto_topup_threshold_credits,
"auto_topup_threshold_percent": auto_topup_threshold_percent,
+ "can_buy_bundles": can_buy_bundles,
"credit_amount": credit_amount,
"expiry_type": expiry_type,
"expiry_unit": expiry_unit,
@@ -6735,6 +6752,7 @@ async def create_billing_plan_credit_grant(
apply_to_existing: typing.Optional[bool] = OMIT,
auto_topup_amount: typing.Optional[int] = OMIT,
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = OMIT,
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = OMIT,
auto_topup_enabled: typing.Optional[bool] = OMIT,
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -6742,6 +6760,7 @@ async def create_billing_plan_credit_grant(
auto_topup_self_service: typing.Optional[bool] = OMIT,
auto_topup_threshold_credits: typing.Optional[int] = OMIT,
auto_topup_threshold_percent: typing.Optional[int] = OMIT,
+ can_buy_bundles: typing.Optional[bool] = OMIT,
expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
expiry_unit_count: typing.Optional[int] = OMIT,
@@ -6769,6 +6788,8 @@ async def create_billing_plan_credit_grant(
auto_topup_amount_type : typing.Optional[CreditAutoTopupAmountType]
+ auto_topup_availability : typing.Optional[BillingCreditAutoTopupAvailability]
+
auto_topup_enabled : typing.Optional[bool]
auto_topup_expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -6783,6 +6804,8 @@ async def create_billing_plan_credit_grant(
auto_topup_threshold_percent : typing.Optional[int]
+ can_buy_bundles : typing.Optional[bool]
+
expiry_type : typing.Optional[BillingCreditExpiryType]
expiry_unit : typing.Optional[BillingCreditExpiryUnit]
@@ -6811,6 +6834,7 @@ async def create_billing_plan_credit_grant(
"apply_to_existing": apply_to_existing,
"auto_topup_amount": auto_topup_amount,
"auto_topup_amount_type": auto_topup_amount_type,
+ "auto_topup_availability": auto_topup_availability,
"auto_topup_enabled": auto_topup_enabled,
"auto_topup_expiry_type": auto_topup_expiry_type,
"auto_topup_expiry_unit": auto_topup_expiry_unit,
@@ -6818,6 +6842,7 @@ async def create_billing_plan_credit_grant(
"auto_topup_self_service": auto_topup_self_service,
"auto_topup_threshold_credits": auto_topup_threshold_credits,
"auto_topup_threshold_percent": auto_topup_threshold_percent,
+ "can_buy_bundles": can_buy_bundles,
"credit_amount": credit_amount,
"credit_id": credit_id,
"expiry_type": expiry_type,
@@ -7012,6 +7037,7 @@ async def update_billing_plan_credit_grant(
apply_to_existing: typing.Optional[bool] = OMIT,
auto_topup_amount: typing.Optional[int] = OMIT,
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = OMIT,
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = OMIT,
auto_topup_enabled: typing.Optional[bool] = OMIT,
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -7019,6 +7045,7 @@ async def update_billing_plan_credit_grant(
auto_topup_self_service: typing.Optional[bool] = OMIT,
auto_topup_threshold_credits: typing.Optional[int] = OMIT,
auto_topup_threshold_percent: typing.Optional[int] = OMIT,
+ can_buy_bundles: typing.Optional[bool] = OMIT,
credit_amount: typing.Optional[int] = OMIT,
expiry_type: typing.Optional[BillingCreditExpiryType] = OMIT,
expiry_unit: typing.Optional[BillingCreditExpiryUnit] = OMIT,
@@ -7043,6 +7070,8 @@ async def update_billing_plan_credit_grant(
auto_topup_amount_type : typing.Optional[CreditAutoTopupAmountType]
+ auto_topup_availability : typing.Optional[BillingCreditAutoTopupAvailability]
+
auto_topup_enabled : typing.Optional[bool]
auto_topup_expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -7057,6 +7086,8 @@ async def update_billing_plan_credit_grant(
auto_topup_threshold_percent : typing.Optional[int]
+ can_buy_bundles : typing.Optional[bool]
+
credit_amount : typing.Optional[int]
expiry_type : typing.Optional[BillingCreditExpiryType]
@@ -7085,6 +7116,7 @@ async def update_billing_plan_credit_grant(
"apply_to_existing": apply_to_existing,
"auto_topup_amount": auto_topup_amount,
"auto_topup_amount_type": auto_topup_amount_type,
+ "auto_topup_availability": auto_topup_availability,
"auto_topup_enabled": auto_topup_enabled,
"auto_topup_expiry_type": auto_topup_expiry_type,
"auto_topup_expiry_unit": auto_topup_expiry_unit,
@@ -7092,6 +7124,7 @@ async def update_billing_plan_credit_grant(
"auto_topup_self_service": auto_topup_self_service,
"auto_topup_threshold_credits": auto_topup_threshold_credits,
"auto_topup_threshold_percent": auto_topup_threshold_percent,
+ "can_buy_bundles": can_buy_bundles,
"credit_amount": credit_amount,
"expiry_type": expiry_type,
"expiry_unit": expiry_unit,
diff --git a/src/schematic/types/__init__.py b/src/schematic/types/__init__.py
index 31003e4..21b3f0f 100644
--- a/src/schematic/types/__init__.py
+++ b/src/schematic/types/__init__.py
@@ -20,6 +20,7 @@
from .audit_log_list_response_data import AuditLogListResponseData
from .audit_log_response_data import AuditLogResponseData
from .billing_coupon_response_data import BillingCouponResponseData
+ from .billing_credit_auto_topup_availability import BillingCreditAutoTopupAvailability
from .billing_credit_bundle_response_data import BillingCreditBundleResponseData
from .billing_credit_bundle_status import BillingCreditBundleStatus
from .billing_credit_bundle_type import BillingCreditBundleType
@@ -81,6 +82,8 @@
from .checkout_settings_response_data import CheckoutSettingsResponseData
from .checkout_subscription import CheckoutSubscription
from .clerk_integration_config import ClerkIntegrationConfig
+ from .company_billing_entity_response_data import CompanyBillingEntityResponseData
+ from .company_billing_entity_subscription_response_data import CompanyBillingEntitySubscriptionResponseData
from .company_credit_balance import CompanyCreditBalance
from .company_credit_balance_response_data import CompanyCreditBalanceResponseData
from .company_detail_response_data import CompanyDetailResponseData
@@ -408,6 +411,7 @@
"AuditLogListResponseData": ".audit_log_list_response_data",
"AuditLogResponseData": ".audit_log_response_data",
"BillingCouponResponseData": ".billing_coupon_response_data",
+ "BillingCreditAutoTopupAvailability": ".billing_credit_auto_topup_availability",
"BillingCreditBundleResponseData": ".billing_credit_bundle_response_data",
"BillingCreditBundleStatus": ".billing_credit_bundle_status",
"BillingCreditBundleType": ".billing_credit_bundle_type",
@@ -469,6 +473,8 @@
"CheckoutSettingsResponseData": ".checkout_settings_response_data",
"CheckoutSubscription": ".checkout_subscription",
"ClerkIntegrationConfig": ".clerk_integration_config",
+ "CompanyBillingEntityResponseData": ".company_billing_entity_response_data",
+ "CompanyBillingEntitySubscriptionResponseData": ".company_billing_entity_subscription_response_data",
"CompanyCreditBalance": ".company_credit_balance",
"CompanyCreditBalanceResponseData": ".company_credit_balance_response_data",
"CompanyDetailResponseData": ".company_detail_response_data",
@@ -818,6 +824,7 @@ def __dir__():
"AuditLogListResponseData",
"AuditLogResponseData",
"BillingCouponResponseData",
+ "BillingCreditAutoTopupAvailability",
"BillingCreditBundleResponseData",
"BillingCreditBundleStatus",
"BillingCreditBundleType",
@@ -879,6 +886,8 @@ def __dir__():
"CheckoutSettingsResponseData",
"CheckoutSubscription",
"ClerkIntegrationConfig",
+ "CompanyBillingEntityResponseData",
+ "CompanyBillingEntitySubscriptionResponseData",
"CompanyCreditBalance",
"CompanyCreditBalanceResponseData",
"CompanyDetailResponseData",
diff --git a/src/schematic/types/billing_credit_auto_topup_availability.py b/src/schematic/types/billing_credit_auto_topup_availability.py
new file mode 100644
index 0000000..4180ff4
--- /dev/null
+++ b/src/schematic/types/billing_credit_auto_topup_availability.py
@@ -0,0 +1,5 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+BillingCreditAutoTopupAvailability = typing.Union[typing.Literal["off", "automatic", "user_controlled"], typing.Any]
diff --git a/src/schematic/types/billing_credit_grant_zeroed_out_reason.py b/src/schematic/types/billing_credit_grant_zeroed_out_reason.py
index c39699f..6f5860d 100644
--- a/src/schematic/types/billing_credit_grant_zeroed_out_reason.py
+++ b/src/schematic/types/billing_credit_grant_zeroed_out_reason.py
@@ -3,5 +3,6 @@
import typing
BillingCreditGrantZeroedOutReason = typing.Union[
- typing.Literal["expired", "manual", "plan_change", "plan_period_reset", "reconciled"], typing.Any
+ typing.Literal["expired", "integration_uninstalled", "manual", "plan_change", "plan_period_reset", "reconciled"],
+ typing.Any,
]
diff --git a/src/schematic/types/billing_plan_credit_grant_response_data.py b/src/schematic/types/billing_plan_credit_grant_response_data.py
index 22daee9..d269b3d 100644
--- a/src/schematic/types/billing_plan_credit_grant_response_data.py
+++ b/src/schematic/types/billing_plan_credit_grant_response_data.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_credit_auto_topup_availability import BillingCreditAutoTopupAvailability
from .billing_credit_expiry_type import BillingCreditExpiryType
from .billing_credit_expiry_unit import BillingCreditExpiryUnit
from .billing_credit_response_data import BillingCreditResponseData
@@ -17,13 +18,27 @@
class BillingPlanCreditGrantResponseData(UniversalBaseModel):
auto_topup_amount: typing.Optional[int] = None
auto_topup_amount_type: typing.Optional[str] = None
- auto_topup_enabled: bool
+ auto_topup_availability: BillingCreditAutoTopupAvailability
+ auto_topup_enabled: bool = pydantic.Field()
+ """
+ Derived from auto_topup_availability; use that instead.
+ """
+
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = None
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = None
auto_topup_expiry_unit_count: typing.Optional[int] = None
- auto_topup_self_service: bool
+ auto_topup_self_service: bool = pydantic.Field()
+ """
+ Derived from auto_topup_availability; use that instead.
+ """
+
auto_topup_threshold_credits: typing.Optional[int] = None
auto_topup_threshold_percent: typing.Optional[int] = None
+ can_buy_bundles: bool = pydantic.Field()
+ """
+ Whether buyers can purchase one-time credit bundles on this grant, independent of auto top-up availability.
+ """
+
created_at: dt.datetime
credit: typing.Optional[BillingCreditResponseData] = None
credit_amount: int
diff --git a/src/schematic/types/change_subscription_internal_request_body.py b/src/schematic/types/change_subscription_internal_request_body.py
index 6e0b753..31cd0f7 100644
--- a/src/schematic/types/change_subscription_internal_request_body.py
+++ b/src/schematic/types/change_subscription_internal_request_body.py
@@ -14,6 +14,7 @@
class ChangeSubscriptionInternalRequestBody(UniversalBaseModel):
add_on_ids: typing.List[UpdateAddOnRequestBody]
auto_topup_overrides: typing.List[UpdateAutoTopupOverrideRequestBody]
+ billing_entity_id: typing.Optional[str] = None
company_id: str
coupon_external_id: typing.Optional[str] = None
credit_bundles: typing.List[UpdateCreditBundleRequestBody]
diff --git a/src/schematic/types/change_subscription_request_body.py b/src/schematic/types/change_subscription_request_body.py
index 10d8c1f..70ed019 100644
--- a/src/schematic/types/change_subscription_request_body.py
+++ b/src/schematic/types/change_subscription_request_body.py
@@ -14,6 +14,7 @@
class ChangeSubscriptionRequestBody(UniversalBaseModel):
add_on_ids: typing.List[UpdateAddOnRequestBody]
auto_topup_overrides: typing.List[UpdateAutoTopupOverrideRequestBody]
+ billing_entity_id: typing.Optional[str] = None
coupon_external_id: typing.Optional[str] = None
credit_bundles: typing.List[UpdateCreditBundleRequestBody]
custom_field_values: typing.List[CheckoutFieldValue]
diff --git a/src/schematic/types/company_billing_entity_response_data.py b/src/schematic/types/company_billing_entity_response_data.py
new file mode 100644
index 0000000..e3c555d
--- /dev/null
+++ b/src/schematic/types/company_billing_entity_response_data.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .company_response_data import CompanyResponseData
+
+
+class CompanyBillingEntityResponseData(UniversalBaseModel):
+ billing_entity: typing.Optional[CompanyResponseData] = None
+ has_own_stripe_customer: bool
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/company_billing_entity_subscription_response_data.py b/src/schematic/types/company_billing_entity_subscription_response_data.py
new file mode 100644
index 0000000..826a1c3
--- /dev/null
+++ b/src/schematic/types/company_billing_entity_subscription_response_data.py
@@ -0,0 +1,43 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import datetime as dt
+import typing
+
+import pydantic
+from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_product_for_subscription_response_data import BillingProductForSubscriptionResponseData
+from .billing_provider_type import BillingProviderType
+from .billing_subscription_discount_view import BillingSubscriptionDiscountView
+from .company_response_data import CompanyResponseData
+from .invoice_response_data import InvoiceResponseData
+from .payment_method_response_data import PaymentMethodResponseData
+
+
+class CompanyBillingEntitySubscriptionResponseData(UniversalBaseModel):
+ cancel_at: typing.Optional[dt.datetime] = None
+ cancel_at_period_end: bool
+ company: typing.Optional[CompanyResponseData] = None
+ currency: str
+ customer_external_id: str
+ discounts: typing.List[BillingSubscriptionDiscountView]
+ expired_at: typing.Optional[dt.datetime] = None
+ interval: str
+ is_initial: bool
+ latest_invoice: typing.Optional[InvoiceResponseData] = None
+ payment_method: typing.Optional[PaymentMethodResponseData] = None
+ plan_name: str
+ products: typing.List[BillingProductForSubscriptionResponseData]
+ provider_type: BillingProviderType
+ status: str
+ subscription_external_id: str
+ total_price: int
+ trial_end: typing.Optional[dt.datetime] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/company_plan_credit_grant_view.py b/src/schematic/types/company_plan_credit_grant_view.py
index b757a6c..c18601c 100644
--- a/src/schematic/types/company_plan_credit_grant_view.py
+++ b/src/schematic/types/company_plan_credit_grant_view.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_credit_auto_topup_availability import BillingCreditAutoTopupAvailability
from .billing_credit_expiry_type import BillingCreditExpiryType
from .billing_credit_expiry_unit import BillingCreditExpiryUnit
from .billing_credit_view import BillingCreditView
@@ -17,6 +18,7 @@
class CompanyPlanCreditGrantView(UniversalBaseModel):
billing_credit_auto_topup_amount: typing.Optional[int] = None
billing_credit_auto_topup_amount_type: typing.Optional[str] = None
+ billing_credit_auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = None
billing_credit_auto_topup_enabled: bool
billing_credit_auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = None
billing_credit_auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = None
@@ -24,6 +26,7 @@ class CompanyPlanCreditGrantView(UniversalBaseModel):
billing_credit_auto_topup_self_service: bool
billing_credit_auto_topup_threshold_credits: typing.Optional[int] = None
billing_credit_auto_topup_threshold_percent: typing.Optional[int] = None
+ billing_credit_can_buy_bundles: bool
company_auto_topup_amount: typing.Optional[int] = None
company_auto_topup_enabled: typing.Optional[bool] = None
company_auto_topup_threshold_credits: typing.Optional[int] = None
diff --git a/src/schematic/types/company_plan_detail_response_data.py b/src/schematic/types/company_plan_detail_response_data.py
index f3b83d4..7796e6c 100644
--- a/src/schematic/types/company_plan_detail_response_data.py
+++ b/src/schematic/types/company_plan_detail_response_data.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_credit_response_data import BillingCreditResponseData
from .billing_linked_resource_response_data import BillingLinkedResourceResponseData
from .billing_price_response_data import BillingPriceResponseData
from .billing_product_detail_response_data import BillingProductDetailResponseData
@@ -35,11 +36,13 @@ class CompanyPlanDetailResponseData(UniversalBaseModel):
company_can_trial: bool
company_count: int
company_id: typing.Optional[str] = None
+ company_logo_url: typing.Optional[str] = None
company_name: typing.Optional[str] = None
compatible_plan_ids: typing.List[str]
controlled_by: BillingProviderType
copied_from_plan_id: typing.Optional[str] = None
created_at: dt.datetime
+ credits: typing.List[BillingCreditResponseData]
currency_prices: typing.List[PlanCurrencyPricesResponseData]
current: bool
custom: bool
diff --git a/src/schematic/types/create_billing_plan_credit_grant_request_body.py b/src/schematic/types/create_billing_plan_credit_grant_request_body.py
index b826af5..9eafb9d 100644
--- a/src/schematic/types/create_billing_plan_credit_grant_request_body.py
+++ b/src/schematic/types/create_billing_plan_credit_grant_request_body.py
@@ -4,6 +4,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_credit_auto_topup_availability import BillingCreditAutoTopupAvailability
from .billing_credit_expiry_type import BillingCreditExpiryType
from .billing_credit_expiry_unit import BillingCreditExpiryUnit
from .billing_plan_credit_grant_reset_cadence import BillingPlanCreditGrantResetCadence
@@ -16,6 +17,7 @@ class CreateBillingPlanCreditGrantRequestBody(UniversalBaseModel):
apply_to_existing: typing.Optional[bool] = None
auto_topup_amount: typing.Optional[int] = None
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = None
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = None
auto_topup_enabled: typing.Optional[bool] = None
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = None
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = None
@@ -23,6 +25,7 @@ class CreateBillingPlanCreditGrantRequestBody(UniversalBaseModel):
auto_topup_self_service: typing.Optional[bool] = None
auto_topup_threshold_credits: typing.Optional[int] = None
auto_topup_threshold_percent: typing.Optional[int] = None
+ can_buy_bundles: typing.Optional[bool] = None
credit_amount: int
credit_id: str
expiry_type: typing.Optional[BillingCreditExpiryType] = None
diff --git a/src/schematic/types/integration_config.py b/src/schematic/types/integration_config.py
index f34b3be..d598f9e 100644
--- a/src/schematic/types/integration_config.py
+++ b/src/schematic/types/integration_config.py
@@ -26,6 +26,7 @@ class Config:
class IntegrationConfig_Metronome(UniversalBaseModel):
type: typing.Literal["metronome"] = "metronome"
+ external_customer_id_key: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/integrations_list_response_data.py b/src/schematic/types/integrations_list_response_data.py
index 121ba84..b7d27aa 100644
--- a/src/schematic/types/integrations_list_response_data.py
+++ b/src/schematic/types/integrations_list_response_data.py
@@ -1,5 +1,6 @@
# This file was auto-generated by Fern from our API Definition.
+import datetime as dt
import typing
import pydantic
@@ -16,6 +17,7 @@ class IntegrationsListResponseData(UniversalBaseModel):
id: str
is_app_install: bool
is_connect_install: bool
+ last_webhook_received_at: typing.Optional[dt.datetime] = None
state: IntegrationState
type: IntegrationType
diff --git a/src/schematic/types/manage_plan_request.py b/src/schematic/types/manage_plan_request.py
index 53aaab0..14f7661 100644
--- a/src/schematic/types/manage_plan_request.py
+++ b/src/schematic/types/manage_plan_request.py
@@ -16,6 +16,11 @@ class ManagePlanRequest(UniversalBaseModel):
base_plan_id: typing.Optional[str] = None
base_plan_price_id: typing.Optional[str] = None
base_plan_version_id: typing.Optional[str] = None
+ billing_entity_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription.
+ """
+
cancel_immediately: typing.Optional[bool] = pydantic.Field(default=None)
"""
If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true.
diff --git a/src/schematic/types/metronome_integration_config.py b/src/schematic/types/metronome_integration_config.py
index e81287d..e7401da 100644
--- a/src/schematic/types/metronome_integration_config.py
+++ b/src/schematic/types/metronome_integration_config.py
@@ -7,6 +7,11 @@
class MetronomeIntegrationConfig(UniversalBaseModel):
+ external_customer_id_key: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Schematic company key used to store the Metronome customer's ingest alias; when unset, imported customers carry only metronome_customer_id
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/schematic/types/plan_credit_grant_view.py b/src/schematic/types/plan_credit_grant_view.py
index 43634fa..5524f06 100644
--- a/src/schematic/types/plan_credit_grant_view.py
+++ b/src/schematic/types/plan_credit_grant_view.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_credit_auto_topup_availability import BillingCreditAutoTopupAvailability
from .billing_credit_expiry_type import BillingCreditExpiryType
from .billing_credit_expiry_unit import BillingCreditExpiryUnit
from .billing_credit_view import BillingCreditView
@@ -17,6 +18,7 @@
class PlanCreditGrantView(UniversalBaseModel):
billing_credit_auto_topup_amount: typing.Optional[int] = None
billing_credit_auto_topup_amount_type: typing.Optional[str] = None
+ billing_credit_auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = None
billing_credit_auto_topup_enabled: bool
billing_credit_auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = None
billing_credit_auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = None
@@ -24,6 +26,7 @@ class PlanCreditGrantView(UniversalBaseModel):
billing_credit_auto_topup_self_service: bool
billing_credit_auto_topup_threshold_credits: typing.Optional[int] = None
billing_credit_auto_topup_threshold_percent: typing.Optional[int] = None
+ billing_credit_can_buy_bundles: bool
created_at: dt.datetime
credit: typing.Optional[BillingCreditView] = None
credit_amount: int
diff --git a/src/schematic/types/plan_detail_response_data.py b/src/schematic/types/plan_detail_response_data.py
index 48de58c..38b58e7 100644
--- a/src/schematic/types/plan_detail_response_data.py
+++ b/src/schematic/types/plan_detail_response_data.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_credit_response_data import BillingCreditResponseData
from .billing_linked_resource_response_data import BillingLinkedResourceResponseData
from .billing_plan_credit_grant_response_data import BillingPlanCreditGrantResponseData
from .billing_price_response_data import BillingPriceResponseData
@@ -29,10 +30,12 @@ class PlanDetailResponseData(UniversalBaseModel):
charge_type: ChargeType
company_count: int
company_id: typing.Optional[str] = None
+ company_logo_url: typing.Optional[str] = None
company_name: typing.Optional[str] = None
controlled_by: BillingProviderType
copied_from_plan_id: typing.Optional[str] = None
created_at: dt.datetime
+ credits: typing.List[BillingCreditResponseData]
currency_prices: typing.List[PlanCurrencyPricesResponseData]
description: str
draft_version: typing.Optional[PlanVersionResponseData] = None
diff --git a/src/schematic/types/plan_group_plan_detail_response_data.py b/src/schematic/types/plan_group_plan_detail_response_data.py
index 2057c34..3f78c5c 100644
--- a/src/schematic/types/plan_group_plan_detail_response_data.py
+++ b/src/schematic/types/plan_group_plan_detail_response_data.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_credit_response_data import BillingCreditResponseData
from .billing_linked_resource_response_data import BillingLinkedResourceResponseData
from .billing_plan_credit_grant_response_data import BillingPlanCreditGrantResponseData
from .billing_price_response_data import BillingPriceResponseData
@@ -32,11 +33,13 @@ class PlanGroupPlanDetailResponseData(UniversalBaseModel):
charge_type: ChargeType
company_count: int
company_id: typing.Optional[str] = None
+ company_logo_url: typing.Optional[str] = None
company_name: typing.Optional[str] = None
compatible_plan_ids: typing.List[str]
controlled_by: BillingProviderType
copied_from_plan_id: typing.Optional[str] = None
created_at: dt.datetime
+ credits: typing.List[BillingCreditResponseData]
currency_prices: typing.List[PlanCurrencyPricesResponseData]
custom_plan_config: typing.Optional[CustomPlanViewConfigResponseData] = None
description: str
diff --git a/src/schematic/types/plan_view_public_response_data.py b/src/schematic/types/plan_view_public_response_data.py
index 04b65ab..d7d952f 100644
--- a/src/schematic/types/plan_view_public_response_data.py
+++ b/src/schematic/types/plan_view_public_response_data.py
@@ -5,6 +5,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_credit_response_data import BillingCreditResponseData
from .billing_linked_resource_response_data import BillingLinkedResourceResponseData
from .billing_price_response_data import BillingPriceResponseData
from .billing_product_detail_response_data import BillingProductDetailResponseData
@@ -32,11 +33,13 @@ class PlanViewPublicResponseData(UniversalBaseModel):
charge_type: ChargeType
company_count: int
company_id: typing.Optional[str] = None
+ company_logo_url: typing.Optional[str] = None
company_name: typing.Optional[str] = None
compatible_plan_ids: typing.List[str]
controlled_by: BillingProviderType
copied_from_plan_id: typing.Optional[str] = None
created_at: dt.datetime
+ credits: typing.List[BillingCreditResponseData]
currency_prices: typing.List[PlanCurrencyPricesResponseData]
custom: bool
custom_plan_config: typing.Optional[CustomPlanConfig] = None
diff --git a/src/schematic/types/update_billing_plan_credit_grant_request_body.py b/src/schematic/types/update_billing_plan_credit_grant_request_body.py
index 43b1c74..37e3774 100644
--- a/src/schematic/types/update_billing_plan_credit_grant_request_body.py
+++ b/src/schematic/types/update_billing_plan_credit_grant_request_body.py
@@ -4,6 +4,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
+from .billing_credit_auto_topup_availability import BillingCreditAutoTopupAvailability
from .billing_credit_expiry_type import BillingCreditExpiryType
from .billing_credit_expiry_unit import BillingCreditExpiryUnit
from .billing_plan_credit_grant_reset_cadence import BillingPlanCreditGrantResetCadence
@@ -16,6 +17,7 @@ class UpdateBillingPlanCreditGrantRequestBody(UniversalBaseModel):
apply_to_existing: typing.Optional[bool] = None
auto_topup_amount: typing.Optional[int] = None
auto_topup_amount_type: typing.Optional[CreditAutoTopupAmountType] = None
+ auto_topup_availability: typing.Optional[BillingCreditAutoTopupAvailability] = None
auto_topup_enabled: typing.Optional[bool] = None
auto_topup_expiry_type: typing.Optional[BillingCreditExpiryType] = None
auto_topup_expiry_unit: typing.Optional[BillingCreditExpiryUnit] = None
@@ -23,6 +25,7 @@ class UpdateBillingPlanCreditGrantRequestBody(UniversalBaseModel):
auto_topup_self_service: typing.Optional[bool] = None
auto_topup_threshold_credits: typing.Optional[int] = None
auto_topup_threshold_percent: typing.Optional[int] = None
+ can_buy_bundles: typing.Optional[bool] = None
credit_amount: typing.Optional[int] = None
expiry_type: typing.Optional[BillingCreditExpiryType] = None
expiry_unit: typing.Optional[BillingCreditExpiryUnit] = None