diff --git a/poetry.lock b/poetry.lock index 9747b6b..fef3795 100644 --- a/poetry.lock +++ b/poetry.lock @@ -557,4 +557,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "9c462a453d491f6c13e77f216c114935f5785c9e0c2288839fb0862ea2551003" +content-hash = "8551b871abee465e23fb0966d51f2c155fd257b55bdcb0c02d095de19f92f358" diff --git a/pyproject.toml b/pyproject.toml index dc811d0..af09a45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ Repository = 'https://github.com/schematichq/schematic-python' python = "^3.8" httpx = ">=0.21.2" pydantic = ">= 1.9.2" -pydantic-core = "^2.18.2" +pydantic-core = ">=2.18.2" typing_extensions = ">= 4.0.0" [tool.poetry.group.dev.dependencies] diff --git a/reference.md b/reference.md new file mode 100644 index 0000000..3142c22 --- /dev/null +++ b/reference.md @@ -0,0 +1,17217 @@ +# Reference +
client.put_plan_audiences_plan_audience_id(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.put_plan_audiences_plan_audience_id( + plan_audience_id="plan_audience_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_audience_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.delete_plan_audiences_plan_audience_id(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.delete_plan_audiences_plan_audience_id( + plan_audience_id="plan_audience_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_audience_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## accounts +
client.accounts.list_api_keys(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.list_api_keys( + environment_id="environment_id", + require_environment=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**require_environment:** `bool` + +
+
+ +
+
+ +**environment_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.create_api_key(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.create_api_key( + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**description:** `typing.Optional[str]` + +
+
+ +
+
+ +**environment_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.get_api_key(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.get_api_key( + api_key_id="api_key_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**api_key_id:** `str` — api_key_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.update_api_key(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.update_api_key( + api_key_id="api_key_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**api_key_id:** `str` — api_key_id + +
+
+ +
+
+ +**description:** `typing.Optional[str]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.delete_api_key(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.delete_api_key( + api_key_id="api_key_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**api_key_id:** `str` — api_key_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.count_api_keys(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.count_api_keys( + environment_id="environment_id", + require_environment=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**require_environment:** `bool` + +
+
+ +
+
+ +**environment_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.list_api_requests(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.list_api_requests( + q="q", + request_type="request_type", + environment_id="environment_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_type:** `typing.Optional[str]` + +
+
+ +
+
+ +**environment_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.get_api_request(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.get_api_request( + api_request_id="api_request_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**api_request_id:** `str` — api_request_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.count_api_requests(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.count_api_requests( + q="q", + request_type="request_type", + environment_id="environment_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_type:** `typing.Optional[str]` + +
+
+ +
+
+ +**environment_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.list_environments(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.list_environments( + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.create_environment(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.create_environment( + environment_type="development", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**environment_type:** `CreateEnvironmentRequestBodyEnvironmentType` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.get_environment(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.get_environment( + environment_id="environment_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**environment_id:** `str` — environment_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.update_environment(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.update_environment( + environment_id="environment_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**environment_id:** `str` — environment_id + +
+
+ +
+
+ +**environment_type:** `typing.Optional[UpdateEnvironmentRequestBodyEnvironmentType]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.delete_environment(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.delete_environment( + environment_id="environment_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**environment_id:** `str` — environment_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.accounts.quickstart() +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accounts.quickstart() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## billing +
client.billing.list_coupons(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.list_coupons( + is_active=True, + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**is_active:** `typing.Optional[bool]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.upsert_billing_coupon(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.upsert_billing_coupon( + amount_off=1, + duration="duration", + duration_in_months=1, + external_id="external_id", + max_redemptions=1, + name="name", + percent_off=1.1, + times_redeemed=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**amount_off:** `int` + +
+
+ +
+
+ +**duration:** `str` + +
+
+ +
+
+ +**duration_in_months:** `int` + +
+
+ +
+
+ +**external_id:** `str` + +
+
+ +
+
+ +**max_redemptions:** `int` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**percent_off:** `float` + +
+
+ +
+
+ +**times_redeemed:** `int` + +
+
+ +
+
+ +**currency:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.upsert_billing_customer(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.upsert_billing_customer( + email="email", + external_id="external_id", + failed_to_import=True, + meta={"key": "value"}, + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**email:** `str` + +
+
+ +
+
+ +**external_id:** `str` + +
+
+ +
+
+ +**failed_to_import:** `bool` + +
+
+ +
+
+ +**meta:** `typing.Dict[str, str]` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**default_payment_method_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.list_customers_with_subscriptions(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.list_customers_with_subscriptions( + name="name", + failed_to_import=True, + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**failed_to_import:** `typing.Optional[bool]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.count_customers(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.count_customers( + name="name", + failed_to_import=True, + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**failed_to_import:** `typing.Optional[bool]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.list_invoices(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.list_invoices( + company_id="company_id", + customer_external_id="customer_external_id", + subscription_external_id="subscription_external_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customer_external_id:** `str` + +
+
+ +
+
+ +**subscription_external_id:** `str` + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.upsert_invoice(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.upsert_invoice( + amount_due=1, + amount_paid=1, + amount_remaining=1, + collection_method="collection_method", + currency="currency", + customer_external_id="customer_external_id", + subtotal=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**amount_due:** `int` + +
+
+ +
+
+ +**amount_paid:** `int` + +
+
+ +
+
+ +**amount_remaining:** `int` + +
+
+ +
+
+ +**collection_method:** `str` + +
+
+ +
+
+ +**currency:** `str` + +
+
+ +
+
+ +**customer_external_id:** `str` + +
+
+ +
+
+ +**subtotal:** `int` + +
+
+ +
+
+ +**due_date:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**payment_method_external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**subscription_external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**url:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.list_meters(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.list_meters( + display_name="display_name", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**display_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.upsert_billing_meter(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.upsert_billing_meter( + display_name="display_name", + event_name="event_name", + event_payload_key="event_payload_key", + external_id="external_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**display_name:** `str` + +
+
+ +
+
+ +**event_name:** `str` + +
+
+ +
+
+ +**event_payload_key:** `str` + +
+
+ +
+
+ +**external_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.list_payment_methods(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.list_payment_methods( + company_id="company_id", + customer_external_id="customer_external_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customer_external_id:** `str` + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.upsert_payment_method(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.upsert_payment_method( + customer_external_id="customer_external_id", + external_id="external_id", + payment_method_type="payment_method_type", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**customer_external_id:** `str` + +
+
+ +
+
+ +**external_id:** `str` + +
+
+ +
+
+ +**payment_method_type:** `str` + +
+
+ +
+
+ +**account_last_4:** `typing.Optional[str]` + +
+
+ +
+
+ +**account_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**bank_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**billing_email:** `typing.Optional[str]` + +
+
+ +
+
+ +**billing_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**card_brand:** `typing.Optional[str]` + +
+
+ +
+
+ +**card_exp_month:** `typing.Optional[int]` + +
+
+ +
+
+ +**card_exp_year:** `typing.Optional[int]` + +
+
+ +
+
+ +**card_last_4:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.search_billing_prices(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.search_billing_prices( + for_initial_plan=True, + for_trial_expiry_plan=True, + product_id="product_id", + interval="interval", + price=1, + q="q", + requires_payment_method=True, + tiers_mode="volume", + usage_type="licensed", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**for_initial_plan:** `typing.Optional[bool]` — Filter for prices valid for initial plans (free prices only) + +
+
+ +
+
+ +**for_trial_expiry_plan:** `typing.Optional[bool]` — Filter for prices valid for trial expiry plans (free prices only) + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**product_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**interval:** `typing.Optional[str]` + +
+
+ +
+
+ +**price:** `typing.Optional[int]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**requires_payment_method:** `typing.Optional[bool]` — Filter for prices that require a payment method (inverse of ForInitialPlan) + +
+
+ +
+
+ +**tiers_mode:** `typing.Optional[SearchBillingPricesRequestTiersMode]` + +
+
+ +
+
+ +**usage_type:** `typing.Optional[SearchBillingPricesRequestUsageType]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.upsert_billing_price(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import CreateBillingPriceTierRequestBody, Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.upsert_billing_price( + billing_scheme="per_unit", + currency="currency", + external_account_id="external_account_id", + interval="interval", + is_active=True, + price=1, + price_external_id="price_external_id", + price_tiers=[ + CreateBillingPriceTierRequestBody( + price_external_id="price_external_id", + ) + ], + product_external_id="product_external_id", + usage_type="licensed", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**billing_scheme:** `CreateBillingPriceRequestBodyBillingScheme` + +
+
+ +
+
+ +**currency:** `str` + +
+
+ +
+
+ +**external_account_id:** `str` + +
+
+ +
+
+ +**interval:** `str` + +
+
+ +
+
+ +**is_active:** `bool` + +
+
+ +
+
+ +**price:** `int` + +
+
+ +
+
+ +**price_external_id:** `str` + +
+
+ +
+
+ +**price_tiers:** `typing.Sequence[CreateBillingPriceTierRequestBody]` + +
+
+ +
+
+ +**product_external_id:** `str` + +
+
+ +
+
+ +**usage_type:** `CreateBillingPriceRequestBodyUsageType` + +
+
+ +
+
+ +**meter_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**package_size:** `typing.Optional[int]` + +
+
+ +
+
+ +**price_decimal:** `typing.Optional[str]` + +
+
+ +
+
+ +**tiers_mode:** `typing.Optional[CreateBillingPriceRequestBodyTiersMode]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.delete_billing_product(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.delete_billing_product( + billing_id="billing_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**billing_id:** `str` — billing_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.list_product_prices(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.list_product_prices( + name="name", + q="q", + price_usage_type="licensed", + without_linked_to_plan=True, + with_one_time_charges=True, + with_zero_price=True, + with_prices_only=True, + is_active=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**price_usage_type:** `typing.Optional[ListProductPricesRequestPriceUsageType]` + +
+
+ +
+
+ +**without_linked_to_plan:** `typing.Optional[bool]` — Filter products that are not linked to any plan + +
+
+ +
+
+ +**with_one_time_charges:** `typing.Optional[bool]` — Filter products that are one time charges + +
+
+ +
+
+ +**with_zero_price:** `typing.Optional[bool]` — Filter products that have zero price for free subscription type + +
+
+ +
+
+ +**with_prices_only:** `typing.Optional[bool]` — Filter products that have prices + +
+
+ +
+
+ +**is_active:** `typing.Optional[bool]` — Filter products that are active + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.delete_product_price(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.delete_product_price( + billing_id="billing_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**billing_id:** `str` — billing_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.upsert_billing_product(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.upsert_billing_product( + external_id="external_id", + name="name", + price=1.1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**external_id:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**price:** `float` + +
+
+ +
+
+ +**is_active:** `typing.Optional[bool]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.list_billing_products(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.list_billing_products( + name="name", + q="q", + price_usage_type="licensed", + without_linked_to_plan=True, + with_one_time_charges=True, + with_zero_price=True, + with_prices_only=True, + is_active=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**price_usage_type:** `typing.Optional[ListBillingProductsRequestPriceUsageType]` + +
+
+ +
+
+ +**without_linked_to_plan:** `typing.Optional[bool]` — Filter products that are not linked to any plan + +
+
+ +
+
+ +**with_one_time_charges:** `typing.Optional[bool]` — Filter products that are one time charges + +
+
+ +
+
+ +**with_zero_price:** `typing.Optional[bool]` — Filter products that have zero price for free subscription type + +
+
+ +
+
+ +**with_prices_only:** `typing.Optional[bool]` — Filter products that have prices + +
+
+ +
+
+ +**is_active:** `typing.Optional[bool]` — Filter products that are active + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.count_billing_products(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.count_billing_products( + name="name", + q="q", + price_usage_type="licensed", + without_linked_to_plan=True, + with_one_time_charges=True, + with_zero_price=True, + with_prices_only=True, + is_active=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**price_usage_type:** `typing.Optional[CountBillingProductsRequestPriceUsageType]` + +
+
+ +
+
+ +**without_linked_to_plan:** `typing.Optional[bool]` — Filter products that are not linked to any plan + +
+
+ +
+
+ +**with_one_time_charges:** `typing.Optional[bool]` — Filter products that are one time charges + +
+
+ +
+
+ +**with_zero_price:** `typing.Optional[bool]` — Filter products that have zero price for free subscription type + +
+
+ +
+
+ +**with_prices_only:** `typing.Optional[bool]` — Filter products that have prices + +
+
+ +
+
+ +**is_active:** `typing.Optional[bool]` — Filter products that are active + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.billing.upsert_billing_subscription(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +import datetime + +from schematic import ( + BillingProductPricing, + BillingSubscriptionDiscount, + Schematic, +) + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.billing.upsert_billing_subscription( + cancel_at_period_end=True, + currency="currency", + customer_external_id="customer_external_id", + discounts=[ + BillingSubscriptionDiscount( + coupon_external_id="coupon_external_id", + external_id="external_id", + is_active=True, + started_at=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + ) + ], + expired_at=datetime.datetime.fromisoformat( + "2024-01-15 09:30:00+00:00", + ), + product_external_ids=[ + BillingProductPricing( + currency="currency", + interval="interval", + price=1, + price_external_id="price_external_id", + product_external_id="product_external_id", + quantity=1, + usage_type="licensed", + ) + ], + subscription_external_id="subscription_external_id", + total_price=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**cancel_at_period_end:** `bool` + +
+
+ +
+
+ +**currency:** `str` + +
+
+ +
+
+ +**customer_external_id:** `str` + +
+
+ +
+
+ +**discounts:** `typing.Sequence[BillingSubscriptionDiscount]` + +
+
+ +
+
+ +**expired_at:** `dt.datetime` + +
+
+ +
+
+ +**product_external_ids:** `typing.Sequence[BillingProductPricing]` + +
+
+ +
+
+ +**subscription_external_id:** `str` + +
+
+ +
+
+ +**total_price:** `int` + +
+
+ +
+
+ +**cancel_at:** `typing.Optional[int]` + +
+
+ +
+
+ +**default_payment_method_external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**default_payment_method_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**interval:** `typing.Optional[str]` + +
+
+ +
+
+ +**metadata:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` + +
+
+ +
+
+ +**period_end:** `typing.Optional[int]` + +
+
+ +
+
+ +**period_start:** `typing.Optional[int]` + +
+
+ +
+
+ +**status:** `typing.Optional[str]` + +
+
+ +
+
+ +**trial_end:** `typing.Optional[int]` + +
+
+ +
+
+ +**trial_end_setting:** `typing.Optional[CreateBillingSubscriptionRequestBodyTrialEndSetting]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## credits +
client.credits.list_billing_credits(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.list_billing_credits( + name="name", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.create_billing_credit(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.create_billing_credit( + currency="currency", + description="description", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**currency:** `str` + +
+
+ +
+
+ +**description:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**burn_strategy:** `typing.Optional[CreateBillingCreditRequestBodyBurnStrategy]` + +
+
+ +
+
+ +**default_expiry_unit:** `typing.Optional[str]` + +
+
+ +
+
+ +**default_expiry_unit_count:** `typing.Optional[int]` + +
+
+ +
+
+ +**default_rollover_policy:** `typing.Optional[CreateBillingCreditRequestBodyDefaultRolloverPolicy]` + +
+
+ +
+
+ +**icon:** `typing.Optional[str]` + +
+
+ +
+
+ +**per_unit_price:** `typing.Optional[int]` + +
+
+ +
+
+ +**per_unit_price_decimal:** `typing.Optional[str]` + +
+
+ +
+
+ +**plural_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**singular_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.get_single_billing_credit(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.get_single_billing_credit( + credit_id="credit_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**credit_id:** `str` — credit_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.update_billing_credit(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.update_billing_credit( + credit_id="credit_id", + description="description", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**credit_id:** `str` — credit_id + +
+
+ +
+
+ +**description:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**burn_strategy:** `typing.Optional[UpdateBillingCreditRequestBodyBurnStrategy]` + +
+
+ +
+
+ +**default_expiry_unit:** `typing.Optional[typing.Literal["days"]]` + +
+
+ +
+
+ +**default_expiry_unit_count:** `typing.Optional[int]` + +
+
+ +
+
+ +**default_rollover_policy:** `typing.Optional[UpdateBillingCreditRequestBodyDefaultRolloverPolicy]` + +
+
+ +
+
+ +**icon:** `typing.Optional[str]` + +
+
+ +
+
+ +**per_unit_price:** `typing.Optional[int]` + +
+
+ +
+
+ +**per_unit_price_decimal:** `typing.Optional[str]` + +
+
+ +
+
+ +**plural_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**singular_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.soft_delete_billing_credit(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.soft_delete_billing_credit( + credit_id="credit_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**credit_id:** `str` — credit_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.list_credit_bundles(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.list_credit_bundles( + credit_id="credit_id", + status="active", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**status:** `typing.Optional[ListCreditBundlesRequestStatus]` + +
+
+ +
+
+ +**bundle_type:** `typing.Optional[typing.Literal["fixed"]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.create_credit_bundle(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.create_credit_bundle( + bundle_name="bundle_name", + credit_id="credit_id", + currency="currency", + price_per_unit=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**bundle_name:** `str` + +
+
+ +
+
+ +**credit_id:** `str` + +
+
+ +
+
+ +**currency:** `str` + +
+
+ +
+
+ +**price_per_unit:** `int` + +
+
+ +
+
+ +**bundle_type:** `typing.Optional[typing.Literal["fixed"]]` + +
+
+ +
+
+ +**expiry_type:** `typing.Optional[CreateCreditBundleRequestBodyExpiryType]` + +
+
+ +
+
+ +**expiry_unit:** `typing.Optional[CreateCreditBundleRequestBodyExpiryUnit]` + +
+
+ +
+
+ +**expiry_unit_count:** `typing.Optional[int]` + +
+
+ +
+
+ +**price_per_unit_decimal:** `typing.Optional[str]` + +
+
+ +
+
+ +**quantity:** `typing.Optional[int]` + +
+
+ +
+
+ +**status:** `typing.Optional[CreateCreditBundleRequestBodyStatus]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.get_credit_bundle(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.get_credit_bundle( + bundle_id="bundle_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**bundle_id:** `str` — bundle_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.update_credit_bundle_details(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.update_credit_bundle_details( + bundle_id="bundle_id", + bundle_name="bundle_name", + price_per_unit=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**bundle_id:** `str` — bundle_id + +
+
+ +
+
+ +**bundle_name:** `str` + +
+
+ +
+
+ +**price_per_unit:** `int` + +
+
+ +
+
+ +**expiry_type:** `typing.Optional[UpdateCreditBundleDetailsRequestBodyExpiryType]` + +
+
+ +
+
+ +**expiry_unit:** `typing.Optional[UpdateCreditBundleDetailsRequestBodyExpiryUnit]` + +
+
+ +
+
+ +**expiry_unit_count:** `typing.Optional[int]` + +
+
+ +
+
+ +**price_per_unit_decimal:** `typing.Optional[str]` + +
+
+ +
+
+ +**quantity:** `typing.Optional[int]` + +
+
+ +
+
+ +**status:** `typing.Optional[UpdateCreditBundleDetailsRequestBodyStatus]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.delete_credit_bundle(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.delete_credit_bundle( + bundle_id="bundle_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**bundle_id:** `str` — bundle_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.count_credit_bundles(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.count_credit_bundles( + credit_id="credit_id", + status="active", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**status:** `typing.Optional[CountCreditBundlesRequestStatus]` + +
+
+ +
+
+ +**bundle_type:** `typing.Optional[typing.Literal["fixed"]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.count_billing_credits(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.count_billing_credits( + name="name", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.zero_out_grant(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.zero_out_grant( + grant_id="grant_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**grant_id:** `str` — grant_id + +
+
+ +
+
+ +**reason:** `typing.Optional[ZeroOutGrantRequestBodyReason]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.grant_billing_credits_to_company(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.grant_billing_credits_to_company( + company_id="company_id", + credit_id="credit_id", + quantity=1, + reason="reason", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**credit_id:** `str` + +
+
+ +
+
+ +**quantity:** `int` + +
+
+ +
+
+ +**reason:** `str` + +
+
+ +
+
+ +**billing_periods_count:** `typing.Optional[int]` + +
+
+ +
+
+ +**expires_at:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**expiry_type:** `typing.Optional[CreateCompanyCreditGrantExpiryType]` + +
+
+ +
+
+ +**expiry_unit:** `typing.Optional[CreateCompanyCreditGrantExpiryUnit]` + +
+
+ +
+
+ +**expiry_unit_count:** `typing.Optional[int]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.list_company_grants(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.list_company_grants( + company_id="company_id", + order="created_at", + dir="asc", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**order:** `typing.Optional[ListCompanyGrantsRequestOrder]` + +
+
+ +
+
+ +**dir:** `typing.Optional[ListCompanyGrantsRequestDir]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.count_billing_credits_grants(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.count_billing_credits_grants( + credit_id="credit_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.list_grants_for_credit(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.list_grants_for_credit( + credit_id="credit_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.get_enriched_credit_ledger(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.get_enriched_credit_ledger( + company_id="company_id", + billing_credit_id="billing_credit_id", + feature_id="feature_id", + period="daily", + start_time="start_time", + end_time="end_time", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**period:** `GetEnrichedCreditLedgerRequestPeriod` + +
+
+ +
+
+ +**billing_credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**start_time:** `typing.Optional[str]` + +
+
+ +
+
+ +**end_time:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.count_credit_ledger(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.count_credit_ledger( + company_id="company_id", + billing_credit_id="billing_credit_id", + feature_id="feature_id", + period="daily", + start_time="start_time", + end_time="end_time", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**period:** `CountCreditLedgerRequestPeriod` + +
+
+ +
+
+ +**billing_credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**start_time:** `typing.Optional[str]` + +
+
+ +
+
+ +**end_time:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.list_billing_plan_credit_grants(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.list_billing_plan_credit_grants( + credit_id="credit_id", + plan_id="plan_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.create_billing_plan_credit_grant(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.create_billing_plan_credit_grant( + credit_amount=1, + credit_id="credit_id", + plan_id="plan_id", + reset_cadence="monthly", + reset_start="billing_period", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**credit_amount:** `int` + +
+
+ +
+
+ +**credit_id:** `str` + +
+
+ +
+
+ +**plan_id:** `str` + +
+
+ +
+
+ +**reset_cadence:** `CreateBillingPlanCreditGrantRequestBodyResetCadence` + +
+
+ +
+
+ +**reset_start:** `CreateBillingPlanCreditGrantRequestBodyResetStart` + +
+
+ +
+
+ +**expiry_type:** `typing.Optional[CreateBillingPlanCreditGrantRequestBodyExpiryType]` + +
+
+ +
+
+ +**expiry_unit:** `typing.Optional[CreateBillingPlanCreditGrantRequestBodyExpiryUnit]` + +
+
+ +
+
+ +**expiry_unit_count:** `typing.Optional[int]` + +
+
+ +
+
+ +**reset_type:** `typing.Optional[CreateBillingPlanCreditGrantRequestBodyResetType]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.delete_billing_plan_credit_grant(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.delete_billing_plan_credit_grant( + plan_grant_id="plan_grant_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_grant_id:** `str` — plan_grant_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.credits.count_billing_plan_credit_grants(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.credits.count_billing_plan_credit_grants( + credit_id="credit_id", + plan_id="plan_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## checkout +
client.checkout.internal(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import ( + Schematic, + UpdateAddOnRequestBody, + UpdateCreditBundleRequestBody, + UpdatePayInAdvanceRequestBody, +) + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.checkout.internal( + add_on_ids=[ + UpdateAddOnRequestBody( + add_on_id="add_on_id", + price_id="price_id", + ) + ], + company_id="company_id", + credit_bundles=[ + UpdateCreditBundleRequestBody( + bundle_id="bundle_id", + quantity=1, + ) + ], + new_plan_id="new_plan_id", + new_price_id="new_price_id", + pay_in_advance=[ + UpdatePayInAdvanceRequestBody( + price_id="price_id", + quantity=1, + ) + ], + skip_trial=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**add_on_ids:** `typing.Sequence[UpdateAddOnRequestBody]` + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**credit_bundles:** `typing.Sequence[UpdateCreditBundleRequestBody]` + +
+
+ +
+
+ +**new_plan_id:** `str` + +
+
+ +
+
+ +**new_price_id:** `str` + +
+
+ +
+
+ +**pay_in_advance:** `typing.Sequence[UpdatePayInAdvanceRequestBody]` + +
+
+ +
+
+ +**skip_trial:** `bool` + +
+
+ +
+
+ +**coupon_external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**payment_method_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**promo_code:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.checkout.get_checkout_data(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.checkout.get_checkout_data( + company_id="company_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**selected_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.checkout.preview_checkout_internal(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import ( + Schematic, + UpdateAddOnRequestBody, + UpdateCreditBundleRequestBody, + UpdatePayInAdvanceRequestBody, +) + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.checkout.preview_checkout_internal( + add_on_ids=[ + UpdateAddOnRequestBody( + add_on_id="add_on_id", + price_id="price_id", + ) + ], + company_id="company_id", + credit_bundles=[ + UpdateCreditBundleRequestBody( + bundle_id="bundle_id", + quantity=1, + ) + ], + new_plan_id="new_plan_id", + new_price_id="new_price_id", + pay_in_advance=[ + UpdatePayInAdvanceRequestBody( + price_id="price_id", + quantity=1, + ) + ], + skip_trial=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**add_on_ids:** `typing.Sequence[UpdateAddOnRequestBody]` + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**credit_bundles:** `typing.Sequence[UpdateCreditBundleRequestBody]` + +
+
+ +
+
+ +**new_plan_id:** `str` + +
+
+ +
+
+ +**new_price_id:** `str` + +
+
+ +
+
+ +**pay_in_advance:** `typing.Sequence[UpdatePayInAdvanceRequestBody]` + +
+
+ +
+
+ +**skip_trial:** `bool` + +
+
+ +
+
+ +**coupon_external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**payment_method_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**promo_code:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.checkout.manage_plan(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import ( + PlanSelection, + Schematic, + UpdateCreditBundleRequestBody, + UpdatePayInAdvanceRequestBody, +) + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.checkout.manage_plan( + add_on_selections=[ + PlanSelection( + plan_id="plan_id", + ) + ], + company_id="company_id", + credit_bundles=[ + UpdateCreditBundleRequestBody( + bundle_id="bundle_id", + quantity=1, + ) + ], + pay_in_advance_entitlements=[ + UpdatePayInAdvanceRequestBody( + price_id="price_id", + quantity=1, + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**add_on_selections:** `typing.Sequence[PlanSelection]` + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**credit_bundles:** `typing.Sequence[UpdateCreditBundleRequestBody]` + +
+
+ +
+
+ +**pay_in_advance_entitlements:** `typing.Sequence[UpdatePayInAdvanceRequestBody]` + +
+
+ +
+
+ +**base_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**base_plan_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**coupon_external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**payment_method_external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**promo_code:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.checkout.preview_manage_plan(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import ( + PlanSelection, + Schematic, + UpdateCreditBundleRequestBody, + UpdatePayInAdvanceRequestBody, +) + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.checkout.preview_manage_plan( + add_on_selections=[ + PlanSelection( + plan_id="plan_id", + ) + ], + company_id="company_id", + credit_bundles=[ + UpdateCreditBundleRequestBody( + bundle_id="bundle_id", + quantity=1, + ) + ], + pay_in_advance_entitlements=[ + UpdatePayInAdvanceRequestBody( + price_id="price_id", + quantity=1, + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**add_on_selections:** `typing.Sequence[PlanSelection]` + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**credit_bundles:** `typing.Sequence[UpdateCreditBundleRequestBody]` + +
+
+ +
+
+ +**pay_in_advance_entitlements:** `typing.Sequence[UpdatePayInAdvanceRequestBody]` + +
+
+ +
+
+ +**base_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**base_plan_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**coupon_external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**payment_method_external_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**promo_code:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.checkout.update_customer_subscription_trial_end(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.checkout.update_customer_subscription_trial_end( + subscription_id="subscription_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**subscription_id:** `str` — subscription_id + +
+
+ +
+
+ +**trial_end:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## companies +
client.companies.list_companies(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.list_companies( + plan_id="plan_id", + q="q", + without_feature_override_for="without_feature_override_for", + without_plan=True, + with_subscription=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by multiple company IDs (starts with comp_) + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` — Filter companies by plan ID (starts with plan_) + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for companies by name, keys or string traits + +
+
+ +
+
+ +**without_feature_override_for:** `typing.Optional[str]` — Filter out companies that already have a company override for the specified feature ID + +
+
+ +
+
+ +**without_plan:** `typing.Optional[bool]` — Filter out companies that have a plan + +
+
+ +
+
+ +**with_subscription:** `typing.Optional[bool]` — Filter companies that have a subscription + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.upsert_company(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.upsert_company( + keys={"key": "value"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` — See [Key Management](https://docs.schematichq.com/developer_resources/key_management) for more information + +
+
+ +
+
+ +**id:** `typing.Optional[str]` — If you know the Schematic ID, you can use that here instead of keys + +
+
+ +
+
+ +**last_seen_at:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**traits:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A map of trait names to trait values + +
+
+ +
+
+ +**update_only:** `typing.Optional[bool]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_company(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_company( + company_id="company_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `str` — company_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.delete_company(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.delete_company( + company_id="company_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `str` — company_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.count_companies(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.count_companies( + plan_id="plan_id", + q="q", + without_feature_override_for="without_feature_override_for", + without_plan=True, + with_subscription=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by multiple company IDs (starts with comp_) + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` — Filter companies by plan ID (starts with plan_) + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for companies by name, keys or string traits + +
+
+ +
+
+ +**without_feature_override_for:** `typing.Optional[str]` — Filter out companies that already have a company override for the specified feature ID + +
+
+ +
+
+ +**without_plan:** `typing.Optional[bool]` — Filter out companies that have a plan + +
+
+ +
+
+ +**with_subscription:** `typing.Optional[bool]` — Filter companies that have a subscription + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.count_companies_for_advanced_filter(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.count_companies_for_advanced_filter( + monetized_subscriptions=True, + q="q", + without_plan=True, + without_subscription=True, + sort_order_column="sort_order_column", + sort_order_direction="asc", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by multiple company IDs (starts with comp_) + +
+
+ +
+
+ +**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more plan IDs (each ID starts with plan_) + +
+
+ +
+
+ +**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more feature IDs (each ID starts with feat_) + +
+
+ +
+
+ +**credit_type_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more credit type IDs (each ID starts with bcrd_) + +
+
+ +
+
+ +**subscription_statuses:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid) + +
+
+ +
+
+ +**subscription_types:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more subscription types (paid, free, trial) + +
+
+ +
+
+ +**monetized_subscriptions:** `typing.Optional[bool]` — Filter companies that have monetized subscriptions + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for companies by name, keys or string traits + +
+
+ +
+
+ +**without_plan:** `typing.Optional[bool]` — Filter out companies that have a plan + +
+
+ +
+
+ +**without_subscription:** `typing.Optional[bool]` — Filter out companies that have a subscription + +
+
+ +
+
+ +**sort_order_column:** `typing.Optional[str]` — Column to sort by (e.g. name, created_at, last_seen_at) + +
+
+ +
+
+ +**sort_order_direction:** `typing.Optional[CountCompaniesForAdvancedFilterRequestSortOrderDirection]` — Direction to sort by (asc or desc) + +
+
+ +
+
+ +**display_properties:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Select the display columns to return (e.g. plan, subscription, users, last_seen_at) + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.create_company(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.create_company( + keys={"key": "value"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` — See [Key Management](https://docs.schematichq.com/developer_resources/key_management) for more information + +
+
+ +
+
+ +**id:** `typing.Optional[str]` — If you know the Schematic ID, you can use that here instead of keys + +
+
+ +
+
+ +**last_seen_at:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**traits:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A map of trait names to trait values + +
+
+ +
+
+ +**update_only:** `typing.Optional[bool]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.delete_company_by_keys(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.delete_company_by_keys( + keys={"key": "value"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.list_companies_for_advanced_filter(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.list_companies_for_advanced_filter( + monetized_subscriptions=True, + q="q", + without_plan=True, + without_subscription=True, + sort_order_column="sort_order_column", + sort_order_direction="asc", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by multiple company IDs (starts with comp_) + +
+
+ +
+
+ +**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more plan IDs (each ID starts with plan_) + +
+
+ +
+
+ +**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more feature IDs (each ID starts with feat_) + +
+
+ +
+
+ +**credit_type_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more credit type IDs (each ID starts with bcrd_) + +
+
+ +
+
+ +**subscription_statuses:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more subscription statuses (active, canceled, expired, incomplete, incomplete_expired, past_due, paused, trialing, unpaid) + +
+
+ +
+
+ +**subscription_types:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by one or more subscription types (paid, free, trial) + +
+
+ +
+
+ +**monetized_subscriptions:** `typing.Optional[bool]` — Filter companies that have monetized subscriptions + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for companies by name, keys or string traits + +
+
+ +
+
+ +**without_plan:** `typing.Optional[bool]` — Filter out companies that have a plan + +
+
+ +
+
+ +**without_subscription:** `typing.Optional[bool]` — Filter out companies that have a subscription + +
+
+ +
+
+ +**sort_order_column:** `typing.Optional[str]` — Column to sort by (e.g. name, created_at, last_seen_at) + +
+
+ +
+
+ +**sort_order_direction:** `typing.Optional[ListCompaniesForAdvancedFilterRequestSortOrderDirection]` — Direction to sort by (asc or desc) + +
+
+ +
+
+ +**display_properties:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Select the display columns to return (e.g. plan, subscription, users, last_seen_at) + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.lookup_company(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.lookup_company( + keys={"keys": "keys"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` — Key/value pairs + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_active_deals(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_active_deals( + company_id="company_id", + deal_stage="deal_stage", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**deal_stage:** `str` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.list_company_memberships(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.list_company_memberships( + company_id="company_id", + user_id="user_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_or_create_company_membership(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_or_create_company_membership( + company_id="company_id", + user_id="user_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**user_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.delete_company_membership(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.delete_company_membership( + company_membership_id="company_membership_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_membership_id:** `str` — company_membership_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_active_company_subscription(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_active_company_subscription( + company_id="company_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.upsert_company_trait(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.upsert_company_trait( + keys={"key": "value"}, + trait="trait", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` — Key/value pairs to identify a company or user + +
+
+ +
+
+ +**trait:** `str` — Name of the trait to update + +
+
+ +
+
+ +**incr:** `typing.Optional[int]` — Amount to increment the trait by (positive or negative) + +
+
+ +
+
+ +**set_:** `typing.Optional[str]` — Value to set the trait to + +
+
+ +
+
+ +**update_only:** `typing.Optional[bool]` — Unless this is set, the company or user will be created if it does not already exist + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.list_entity_key_definitions(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.list_entity_key_definitions( + entity_type="company", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_type:** `typing.Optional[ListEntityKeyDefinitionsRequestEntityType]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.count_entity_key_definitions(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.count_entity_key_definitions( + entity_type="company", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_type:** `typing.Optional[CountEntityKeyDefinitionsRequestEntityType]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.list_entity_trait_definitions(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.list_entity_trait_definitions( + entity_type="company", + q="q", + trait_type="boolean", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_type:** `typing.Optional[ListEntityTraitDefinitionsRequestEntityType]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**trait_type:** `typing.Optional[ListEntityTraitDefinitionsRequestTraitType]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_or_create_entity_trait_definition(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_or_create_entity_trait_definition( + entity_type="company", + hierarchy=["hierarchy"], + trait_type="boolean", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_type:** `CreateEntityTraitDefinitionRequestBodyEntityType` + +
+
+ +
+
+ +**hierarchy:** `typing.Sequence[str]` + +
+
+ +
+
+ +**trait_type:** `CreateEntityTraitDefinitionRequestBodyTraitType` + +
+
+ +
+
+ +**display_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_entity_trait_definition(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_entity_trait_definition( + entity_trait_definition_id="entity_trait_definition_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_trait_definition_id:** `str` — entity_trait_definition_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.update_entity_trait_definition(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.update_entity_trait_definition( + entity_trait_definition_id="entity_trait_definition_id", + trait_type="boolean", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_trait_definition_id:** `str` — entity_trait_definition_id + +
+
+ +
+
+ +**trait_type:** `UpdateEntityTraitDefinitionRequestBodyTraitType` + +
+
+ +
+
+ +**display_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.count_entity_trait_definitions(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.count_entity_trait_definitions( + entity_type="company", + q="q", + trait_type="boolean", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_type:** `typing.Optional[CountEntityTraitDefinitionsRequestEntityType]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**trait_type:** `typing.Optional[CountEntityTraitDefinitionsRequestTraitType]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_entity_trait_values(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_entity_trait_values( + definition_id="definition_id", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**definition_id:** `str` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.list_plan_changes(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.list_plan_changes( + action="action", + base_plan_action="base_plan_action", + company_id="company_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**action:** `typing.Optional[str]` + +
+
+ +
+
+ +**base_plan_action:** `typing.Optional[str]` + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_plan_change(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_plan_change( + plan_change_id="plan_change_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_change_id:** `str` — plan_change_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.list_plan_traits(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.list_plan_traits( + plan_id="plan_id", + trait_id="trait_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trait_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trait_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.create_plan_trait(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.create_plan_trait( + plan_id="plan_id", + trait_id="trait_id", + trait_value="trait_value", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_id:** `str` + +
+
+ +
+
+ +**trait_id:** `str` + +
+
+ +
+
+ +**trait_value:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_plan_trait(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_plan_trait( + plan_trait_id="plan_trait_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_trait_id:** `str` — plan_trait_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.update_plan_trait(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.update_plan_trait( + plan_trait_id="plan_trait_id", + plan_id="plan_id", + trait_value="trait_value", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_trait_id:** `str` — plan_trait_id + +
+
+ +
+
+ +**plan_id:** `str` + +
+
+ +
+
+ +**trait_value:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.delete_plan_trait(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.delete_plan_trait( + plan_trait_id="plan_trait_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_trait_id:** `str` — plan_trait_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.update_plan_traits_bulk(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic, UpdatePlanTraitTraitRequestBody + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.update_plan_traits_bulk( + plan_id="plan_id", + traits=[ + UpdatePlanTraitTraitRequestBody( + trait_id="trait_id", + trait_value="trait_value", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_id:** `str` + +
+
+ +
+
+ +**traits:** `typing.Sequence[UpdatePlanTraitTraitRequestBody]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.count_plan_traits(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.count_plan_traits( + plan_id="plan_id", + trait_id="trait_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trait_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trait_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.upsert_user_trait(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.upsert_user_trait( + keys={"key": "value"}, + trait="trait", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` — Key/value pairs to identify a company or user + +
+
+ +
+
+ +**trait:** `str` — Name of the trait to update + +
+
+ +
+
+ +**incr:** `typing.Optional[int]` — Amount to increment the trait by (positive or negative) + +
+
+ +
+
+ +**set_:** `typing.Optional[str]` — Value to set the trait to + +
+
+ +
+
+ +**update_only:** `typing.Optional[bool]` — Unless this is set, the company or user will be created if it does not already exist + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.list_users(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.list_users( + company_id="company_id", + plan_id="plan_id", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` — Filter users by company ID (starts with comp_) + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter users by multiple user IDs (starts with user_) + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` — Filter users by plan ID (starts with plan_) + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for users by name, keys or string traits + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.upsert_user(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.upsert_user( + keys={"key": "value"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` — See [Key Management](https://docs.schematichq.com/developer_resources/key_management) for more information + +
+
+ +
+
+ +**companies:** `typing.Optional[typing.Sequence[typing.Dict[str, str]]]` — Optionally specify companies using array of key/value pairs + +
+
+ +
+
+ +**company:** `typing.Optional[typing.Dict[str, str]]` — Add user to this company. Takes priority over companies. For exhaustive list of companies, use companies + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` — Add user to this company. Takes priority over company_ids. For exhaustive list of companies, use company_ids + +
+
+ +
+
+ +**company_ids:** `typing.Optional[typing.Sequence[str]]` — Optionally specify companies using Schematic company ID + +
+
+ +
+
+ +**id:** `typing.Optional[str]` — If you know the Schematic ID, you can use that here instead of keys + +
+
+ +
+
+ +**last_seen_at:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**traits:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A map of trait names to trait values + +
+
+ +
+
+ +**update_only:** `typing.Optional[bool]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.get_user(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.get_user( + user_id="user_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**user_id:** `str` — user_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.delete_user(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.delete_user( + user_id="user_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**user_id:** `str` — user_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.count_users(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.count_users( + company_id="company_id", + plan_id="plan_id", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` — Filter users by company ID (starts with comp_) + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter users by multiple user IDs (starts with user_) + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` — Filter users by plan ID (starts with plan_) + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for users by name, keys or string traits + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.create_user(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.create_user( + keys={"key": "value"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` — See [Key Management](https://docs.schematichq.com/developer_resources/key_management) for more information + +
+
+ +
+
+ +**companies:** `typing.Optional[typing.Sequence[typing.Dict[str, str]]]` — Optionally specify companies using array of key/value pairs + +
+
+ +
+
+ +**company:** `typing.Optional[typing.Dict[str, str]]` — Add user to this company. Takes priority over companies. For exhaustive list of companies, use companies + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` — Add user to this company. Takes priority over company_ids. For exhaustive list of companies, use company_ids + +
+
+ +
+
+ +**company_ids:** `typing.Optional[typing.Sequence[str]]` — Optionally specify companies using Schematic company ID + +
+
+ +
+
+ +**id:** `typing.Optional[str]` — If you know the Schematic ID, you can use that here instead of keys + +
+
+ +
+
+ +**last_seen_at:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**traits:** `typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]` — A map of trait names to trait values + +
+
+ +
+
+ +**update_only:** `typing.Optional[bool]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.delete_user_by_keys(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.delete_user_by_keys( + keys={"key": "value"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.companies.lookup_user(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.companies.lookup_user( + keys={"keys": "keys"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` — Key/value pairs + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## entitlements +
client.entitlements.list_company_overrides(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.list_company_overrides( + company_id="company_id", + feature_id="feature_id", + without_expired=True, + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` — Filter company overrides by a single company ID (starting with comp_) + +
+
+ +
+
+ +**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple company IDs (starting with comp_) + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` — Filter company overrides by a single feature ID (starting with feat_) + +
+
+ +
+
+ +**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple feature IDs (starting with feat_) + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple company override IDs (starting with cmov_) + +
+
+ +
+
+ +**without_expired:** `typing.Optional[bool]` — Filter company overrides by whether they have not expired + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for company overrides by feature or company name + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.create_company_override(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.create_company_override( + company_id="company_id", + feature_id="feature_id", + value_type="boolean", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `str` + +
+
+ +
+
+ +**feature_id:** `str` + +
+
+ +
+
+ +**value_type:** `CreateCompanyOverrideRequestBodyValueType` + +
+
+ +
+
+ +**credit_consumption_rate:** `typing.Optional[float]` + +
+
+ +
+
+ +**expiration_date:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**metric_period:** `typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriod]` + +
+
+ +
+
+ +**metric_period_month_reset:** `typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriodMonthReset]` + +
+
+ +
+
+ +**note:** `typing.Optional[str]` + +
+
+ +
+
+ +**value_bool:** `typing.Optional[bool]` + +
+
+ +
+
+ +**value_credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**value_numeric:** `typing.Optional[int]` + +
+
+ +
+
+ +**value_trait_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.get_company_override(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.get_company_override( + company_override_id="company_override_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_override_id:** `str` — company_override_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.update_company_override(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.update_company_override( + company_override_id="company_override_id", + value_type="boolean", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_override_id:** `str` — company_override_id + +
+
+ +
+
+ +**value_type:** `UpdateCompanyOverrideRequestBodyValueType` + +
+
+ +
+
+ +**credit_consumption_rate:** `typing.Optional[float]` + +
+
+ +
+
+ +**expiration_date:** `typing.Optional[dt.datetime]` + +
+
+ +
+
+ +**metric_period:** `typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriod]` + +
+
+ +
+
+ +**metric_period_month_reset:** `typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset]` + +
+
+ +
+
+ +**note:** `typing.Optional[str]` + +
+
+ +
+
+ +**value_bool:** `typing.Optional[bool]` + +
+
+ +
+
+ +**value_credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**value_numeric:** `typing.Optional[int]` + +
+
+ +
+
+ +**value_trait_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.delete_company_override(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.delete_company_override( + company_override_id="company_override_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_override_id:** `str` — company_override_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.count_company_overrides(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.count_company_overrides( + company_id="company_id", + feature_id="feature_id", + without_expired=True, + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` — Filter company overrides by a single company ID (starting with comp_) + +
+
+ +
+
+ +**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple company IDs (starting with comp_) + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` — Filter company overrides by a single feature ID (starting with feat_) + +
+
+ +
+
+ +**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple feature IDs (starting with feat_) + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple company override IDs (starting with cmov_) + +
+
+ +
+
+ +**without_expired:** `typing.Optional[bool]` — Filter company overrides by whether they have not expired + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for company overrides by feature or company name + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.list_feature_companies(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.list_feature_companies( + feature_id="feature_id", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `str` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.count_feature_companies(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.count_feature_companies( + feature_id="feature_id", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `str` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.list_feature_usage(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.list_feature_usage( + company_id="company_id", + q="q", + without_negative_entitlements=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**company_keys:** `typing.Optional[typing.Dict[str, str]]` + +
+
+ +
+
+ +**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**without_negative_entitlements:** `typing.Optional[bool]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.count_feature_usage(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.count_feature_usage( + company_id="company_id", + q="q", + without_negative_entitlements=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**company_keys:** `typing.Optional[typing.Dict[str, str]]` + +
+
+ +
+
+ +**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**without_negative_entitlements:** `typing.Optional[bool]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.list_feature_users(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.list_feature_users( + feature_id="feature_id", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `str` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.count_feature_users(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.count_feature_users( + feature_id="feature_id", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `str` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.list_plan_entitlements(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.list_plan_entitlements( + feature_id="feature_id", + plan_id="plan_id", + q="q", + with_metered_products=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` — Filter plan entitlements by a single feature ID (starting with feat_) + +
+
+ +
+
+ +**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple feature IDs (starting with feat_) + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` — Filter plan entitlements by a single plan ID (starting with plan_) + +
+
+ +
+
+ +**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple plan IDs (starting with plan_) + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for plan entitlements by feature or company name + +
+
+ +
+
+ +**with_metered_products:** `typing.Optional[bool]` — Filter plan entitlements only with metered products + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.create_plan_entitlement(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.create_plan_entitlement( + feature_id="feature_id", + plan_id="plan_id", + value_type="boolean", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `str` + +
+
+ +
+
+ +**plan_id:** `str` + +
+
+ +
+
+ +**value_type:** `CreatePlanEntitlementRequestBodyValueType` + +
+
+ +
+
+ +**billing_product_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**billing_threshold:** `typing.Optional[int]` + +
+
+ +
+
+ +**credit_consumption_rate:** `typing.Optional[float]` + +
+
+ +
+
+ +**currency:** `typing.Optional[str]` + +
+
+ +
+
+ +**metric_period:** `typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriod]` + +
+
+ +
+
+ +**metric_period_month_reset:** `typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriodMonthReset]` + +
+
+ +
+
+ +**monthly_metered_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**monthly_price_tiers:** `typing.Optional[typing.Sequence[CreatePriceTierRequestBody]]` + +
+
+ +
+
+ +**monthly_unit_price:** `typing.Optional[int]` + +
+
+ +
+
+ +**monthly_unit_price_decimal:** `typing.Optional[str]` + +
+
+ +
+
+ +**overage_billing_product_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**price_behavior:** `typing.Optional[CreatePlanEntitlementRequestBodyPriceBehavior]` + +
+
+ +
+
+ +**price_tiers:** `typing.Optional[typing.Sequence[CreatePriceTierRequestBody]]` — Use MonthlyPriceTiers or YearlyPriceTiers instead + +
+
+ +
+
+ +**soft_limit:** `typing.Optional[int]` + +
+
+ +
+
+ +**tier_mode:** `typing.Optional[str]` + +
+
+ +
+
+ +**value_bool:** `typing.Optional[bool]` + +
+
+ +
+
+ +**value_credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**value_numeric:** `typing.Optional[int]` + +
+
+ +
+
+ +**value_trait_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**yearly_metered_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**yearly_price_tiers:** `typing.Optional[typing.Sequence[CreatePriceTierRequestBody]]` + +
+
+ +
+
+ +**yearly_unit_price:** `typing.Optional[int]` + +
+
+ +
+
+ +**yearly_unit_price_decimal:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.get_plan_entitlement(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.get_plan_entitlement( + plan_entitlement_id="plan_entitlement_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_entitlement_id:** `str` — plan_entitlement_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.update_plan_entitlement(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.update_plan_entitlement( + plan_entitlement_id="plan_entitlement_id", + value_type="boolean", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_entitlement_id:** `str` — plan_entitlement_id + +
+
+ +
+
+ +**value_type:** `UpdatePlanEntitlementRequestBodyValueType` + +
+
+ +
+
+ +**billing_product_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**billing_threshold:** `typing.Optional[int]` + +
+
+ +
+
+ +**credit_consumption_rate:** `typing.Optional[float]` + +
+
+ +
+
+ +**currency:** `typing.Optional[str]` + +
+
+ +
+
+ +**metric_period:** `typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriod]` + +
+
+ +
+
+ +**metric_period_month_reset:** `typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset]` + +
+
+ +
+
+ +**monthly_metered_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**monthly_price_tiers:** `typing.Optional[typing.Sequence[CreatePriceTierRequestBody]]` + +
+
+ +
+
+ +**monthly_unit_price:** `typing.Optional[int]` + +
+
+ +
+
+ +**monthly_unit_price_decimal:** `typing.Optional[str]` + +
+
+ +
+
+ +**overage_billing_product_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**price_behavior:** `typing.Optional[UpdatePlanEntitlementRequestBodyPriceBehavior]` + +
+
+ +
+
+ +**price_tiers:** `typing.Optional[typing.Sequence[CreatePriceTierRequestBody]]` — Use MonthlyPriceTiers or YearlyPriceTiers instead + +
+
+ +
+
+ +**soft_limit:** `typing.Optional[int]` + +
+
+ +
+
+ +**tier_mode:** `typing.Optional[str]` + +
+
+ +
+
+ +**value_bool:** `typing.Optional[bool]` + +
+
+ +
+
+ +**value_credit_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**value_numeric:** `typing.Optional[int]` + +
+
+ +
+
+ +**value_trait_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**yearly_metered_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**yearly_price_tiers:** `typing.Optional[typing.Sequence[CreatePriceTierRequestBody]]` + +
+
+ +
+
+ +**yearly_unit_price:** `typing.Optional[int]` + +
+
+ +
+
+ +**yearly_unit_price_decimal:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.delete_plan_entitlement(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.delete_plan_entitlement( + plan_entitlement_id="plan_entitlement_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_entitlement_id:** `str` — plan_entitlement_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.count_plan_entitlements(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.count_plan_entitlements( + feature_id="feature_id", + plan_id="plan_id", + q="q", + with_metered_products=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` — Filter plan entitlements by a single feature ID (starting with feat_) + +
+
+ +
+
+ +**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple feature IDs (starting with feat_) + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) + +
+
+ +
+
+ +**plan_id:** `typing.Optional[str]` — Filter plan entitlements by a single plan ID (starting with plan_) + +
+
+ +
+
+ +**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple plan IDs (starting with plan_) + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search for plan entitlements by feature or company name + +
+
+ +
+
+ +**with_metered_products:** `typing.Optional[bool]` — Filter plan entitlements only with metered products + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.entitlements.get_feature_usage_by_company(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.entitlements.get_feature_usage_by_company( + keys={"keys": "keys"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**keys:** `typing.Dict[str, str]` — Key/value pairs + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## plans +
client.plans.update_company_plans(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plans.update_company_plans( + company_plan_id="company_plan_id", + add_on_ids=["add_on_ids"], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_plan_id:** `str` — company_plan_id + +
+
+ +
+
+ +**add_on_ids:** `typing.Sequence[str]` + +
+
+ +
+
+ +**base_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plans.list_plans(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plans.list_plans( + company_id="company_id", + for_fallback_plan=True, + for_initial_plan=True, + for_trial_expiry_plan=True, + has_product_id=True, + plan_type="plan", + q="q", + requires_payment_method=True, + without_entitlement_for="without_entitlement_for", + without_product_id=True, + without_paid_product_id=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**for_fallback_plan:** `typing.Optional[bool]` — Filter for plans valid as fallback plans (not linked to billing) + +
+
+ +
+
+ +**for_initial_plan:** `typing.Optional[bool]` — Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) + +
+
+ +
+
+ +**for_trial_expiry_plan:** `typing.Optional[bool]` — Filter for plans valid as trial expiry plans (not linked to billing or free) + +
+
+ +
+
+ +**has_product_id:** `typing.Optional[bool]` — Filter out plans that do not have a billing product ID + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**plan_type:** `typing.Optional[ListPlansRequestPlanType]` — Filter by plan type + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**requires_payment_method:** `typing.Optional[bool]` — Filter for plans that require a payment method (inverse of ForInitialPlan) + +
+
+ +
+
+ +**without_entitlement_for:** `typing.Optional[str]` — Filter out plans that already have a plan entitlement for the specified feature ID + +
+
+ +
+
+ +**without_product_id:** `typing.Optional[bool]` — Filter out plans that have a billing product ID + +
+
+ +
+
+ +**without_paid_product_id:** `typing.Optional[bool]` — Filter out plans that have a paid billing product ID + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plans.create_plan(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plans.create_plan( + description="description", + name="name", + plan_type="plan", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**description:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**plan_type:** `CreatePlanRequestBodyPlanType` + +
+
+ +
+
+ +**icon:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plans.get_plan(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plans.get_plan( + plan_id="plan_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_id:** `str` — plan_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plans.update_plan(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plans.update_plan( + plan_id="plan_id", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_id:** `str` — plan_id + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**description:** `typing.Optional[str]` + +
+
+ +
+
+ +**icon:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plans.delete_plan(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plans.delete_plan( + plan_id="plan_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_id:** `str` — plan_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plans.upsert_billing_product_plan(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plans.upsert_billing_product_plan( + plan_id="plan_id", + charge_type="one_time", + is_trialable=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_id:** `str` — plan_id + +
+
+ +
+
+ +**charge_type:** `UpsertBillingProductRequestBodyChargeType` + +
+
+ +
+
+ +**is_trialable:** `bool` + +
+
+ +
+
+ +**billing_product_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**currency:** `typing.Optional[str]` + +
+
+ +
+
+ +**monthly_price:** `typing.Optional[int]` + +
+
+ +
+
+ +**monthly_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**one_time_price:** `typing.Optional[int]` + +
+
+ +
+
+ +**one_time_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trial_days:** `typing.Optional[int]` + +
+
+ +
+
+ +**yearly_price:** `typing.Optional[int]` + +
+
+ +
+
+ +**yearly_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plans.count_plans(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plans.count_plans( + company_id="company_id", + for_fallback_plan=True, + for_initial_plan=True, + for_trial_expiry_plan=True, + has_product_id=True, + plan_type="plan", + q="q", + requires_payment_method=True, + without_entitlement_for="without_entitlement_for", + without_product_id=True, + without_paid_product_id=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**for_fallback_plan:** `typing.Optional[bool]` — Filter for plans valid as fallback plans (not linked to billing) + +
+
+ +
+
+ +**for_initial_plan:** `typing.Optional[bool]` — Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) + +
+
+ +
+
+ +**for_trial_expiry_plan:** `typing.Optional[bool]` — Filter for plans valid as trial expiry plans (not linked to billing or free) + +
+
+ +
+
+ +**has_product_id:** `typing.Optional[bool]` — Filter out plans that do not have a billing product ID + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**plan_type:** `typing.Optional[CountPlansRequestPlanType]` — Filter by plan type + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**requires_payment_method:** `typing.Optional[bool]` — Filter for plans that require a payment method (inverse of ForInitialPlan) + +
+
+ +
+
+ +**without_entitlement_for:** `typing.Optional[str]` — Filter out plans that already have a plan entitlement for the specified feature ID + +
+
+ +
+
+ +**without_product_id:** `typing.Optional[bool]` — Filter out plans that have a billing product ID + +
+
+ +
+
+ +**without_paid_product_id:** `typing.Optional[bool]` — Filter out plans that have a paid billing product ID + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plans.list_plan_issues(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plans.list_plan_issues( + plan_id="plan_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## components +
client.components.list_components(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.components.list_components( + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.components.create_component(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.components.create_component( + entity_type="entitlement", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**entity_type:** `CreateComponentRequestBodyEntityType` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**ast:** `typing.Optional[typing.Dict[str, float]]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.components.get_component(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.components.get_component( + component_id="component_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**component_id:** `str` — component_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.components.update_component(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.components.update_component( + component_id="component_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**component_id:** `str` — component_id + +
+
+ +
+
+ +**ast:** `typing.Optional[typing.Dict[str, float]]` + +
+
+ +
+
+ +**entity_type:** `typing.Optional[UpdateComponentRequestBodyEntityType]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**state:** `typing.Optional[UpdateComponentRequestBodyState]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.components.delete_component(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.components.delete_component( + component_id="component_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**component_id:** `str` — component_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.components.count_components(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.components.count_components( + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.components.preview_component_data(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.components.preview_component_data( + company_id="company_id", + component_id="component_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**component_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## crm +
client.crm.upsert_deal_line_item_association(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.crm.upsert_deal_line_item_association( + deal_external_id="deal_external_id", + line_item_external_id="line_item_external_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**deal_external_id:** `str` + +
+
+ +
+
+ +**line_item_external_id:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.crm.upsert_line_item(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.crm.upsert_line_item( + amount="amount", + interval="interval", + line_item_external_id="line_item_external_id", + product_external_id="product_external_id", + quantity=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**amount:** `str` + +
+
+ +
+
+ +**interval:** `str` + +
+
+ +
+
+ +**line_item_external_id:** `str` + +
+
+ +
+
+ +**product_external_id:** `str` + +
+
+ +
+
+ +**quantity:** `int` + +
+
+ +
+
+ +**discount_percentage:** `typing.Optional[str]` + +
+
+ +
+
+ +**term_month:** `typing.Optional[int]` + +
+
+ +
+
+ +**total_discount:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.crm.upsert_crm_deal(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.crm.upsert_crm_deal( + crm_company_key="crm_company_key", + crm_type="crm_type", + deal_external_id="deal_external_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**crm_company_key:** `str` + +
+
+ +
+
+ +**crm_type:** `str` + +
+
+ +
+
+ +**deal_external_id:** `str` + +
+
+ +
+
+ +**arr:** `typing.Optional[str]` + +
+
+ +
+
+ +**crm_company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**crm_product_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**deal_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**deal_stage:** `typing.Optional[str]` + +
+
+ +
+
+ +**mrr:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.crm.list_crm_products(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.crm.list_crm_products( + name="name", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.crm.upsert_crm_product(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.crm.upsert_crm_product( + currency="currency", + description="description", + external_id="external_id", + interval="interval", + name="name", + price="price", + quantity=1, + sku="sku", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**currency:** `str` + +
+
+ +
+
+ +**description:** `str` + +
+
+ +
+
+ +**external_id:** `str` + +
+
+ +
+
+ +**interval:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**price:** `str` + +
+
+ +
+
+ +**quantity:** `int` + +
+
+ +
+
+ +**sku:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## dataexports +
client.dataexports.create_data_export(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.dataexports.create_data_export( + metadata="metadata", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**metadata:** `str` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.dataexports.get_data_export_artifact(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.dataexports.get_data_export_artifact( + data_export_id="data_export_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**data_export_id:** `str` — data_export_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. You can pass in configuration such as `chunk_size`, and more to customize the request and response. + +
+
+
+
+ + +
+
+
+ +## events +
client.events.create_event_batch(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import CreateEventRequestBody, Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.events.create_event_batch( + events=[ + CreateEventRequestBody( + event_type="identify", + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**events:** `typing.Sequence[CreateEventRequestBody]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.events.get_event_summaries(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.events.get_event_summaries( + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**event_subtypes:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.events.list_events(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.events.list_events( + company_id="company_id", + event_subtype="event_subtype", + flag_id="flag_id", + user_id="user_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**event_subtype:** `typing.Optional[str]` + +
+
+ +
+
+ +**event_types:** `typing.Optional[ + typing.Union[ + ListEventsRequestEventTypesItem, + typing.Sequence[ListEventsRequestEventTypesItem], + ] +]` + +
+
+ +
+
+ +**flag_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**user_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.events.create_event(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.events.create_event( + event_type="identify", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**event_type:** `CreateEventRequestBodyEventType` — Either 'identify' or 'track' + +
+
+ +
+
+ +**body:** `typing.Optional[EventBody]` + +
+
+ +
+
+ +**sent_at:** `typing.Optional[dt.datetime]` — Optionally provide a timestamp at which the event was sent to Schematic + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.events.get_event(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.events.get_event( + event_id="event_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**event_id:** `str` — event_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.events.get_segment_integration_status() +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.events.get_segment_integration_status() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## features +
client.features.list_features(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.list_features( + q="q", + without_company_override_for="without_company_override_for", + without_plan_entitlement_for="without_plan_entitlement_for", + boolean_require_event=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search by feature name or ID + +
+
+ +
+
+ +**without_company_override_for:** `typing.Optional[str]` — Filter out features that already have a company override for the specified company ID + +
+
+ +
+
+ +**without_plan_entitlement_for:** `typing.Optional[str]` — Filter out features that already have a plan entitlement for the specified plan ID + +
+
+ +
+
+ +**feature_type:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter by one or more feature types (boolean, event, trait) + +
+
+ +
+
+ +**boolean_require_event:** `typing.Optional[bool]` — Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter. + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.create_feature(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.create_feature( + description="description", + feature_type="boolean", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**description:** `str` + +
+
+ +
+
+ +**feature_type:** `CreateFeatureRequestBodyFeatureType` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**event_subtype:** `typing.Optional[str]` + +
+
+ +
+
+ +**flag:** `typing.Optional[CreateOrUpdateFlagRequestBody]` + +
+
+ +
+
+ +**icon:** `typing.Optional[str]` + +
+
+ +
+
+ +**lifecycle_phase:** `typing.Optional[CreateFeatureRequestBodyLifecyclePhase]` + +
+
+ +
+
+ +**maintainer_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**plural_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**singular_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**trait_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.get_feature(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.get_feature( + feature_id="feature_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `str` — feature_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.update_feature(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.update_feature( + feature_id="feature_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `str` — feature_id + +
+
+ +
+
+ +**description:** `typing.Optional[str]` + +
+
+ +
+
+ +**event_subtype:** `typing.Optional[str]` + +
+
+ +
+
+ +**feature_type:** `typing.Optional[UpdateFeatureRequestBodyFeatureType]` + +
+
+ +
+
+ +**flag:** `typing.Optional[CreateOrUpdateFlagRequestBody]` + +
+
+ +
+
+ +**icon:** `typing.Optional[str]` + +
+
+ +
+
+ +**lifecycle_phase:** `typing.Optional[UpdateFeatureRequestBodyLifecyclePhase]` + +
+
+ +
+
+ +**maintainer_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**plural_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**singular_name:** `typing.Optional[str]` + +
+
+ +
+
+ +**trait_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.delete_feature(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.delete_feature( + feature_id="feature_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `str` — feature_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.count_features(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.count_features( + q="q", + without_company_override_for="without_company_override_for", + without_plan_entitlement_for="without_plan_entitlement_for", + boolean_require_event=True, + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search by feature name or ID + +
+
+ +
+
+ +**without_company_override_for:** `typing.Optional[str]` — Filter out features that already have a company override for the specified company ID + +
+
+ +
+
+ +**without_plan_entitlement_for:** `typing.Optional[str]` — Filter out features that already have a plan entitlement for the specified plan ID + +
+
+ +
+
+ +**feature_type:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter by one or more feature types (boolean, event, trait) + +
+
+ +
+
+ +**boolean_require_event:** `typing.Optional[bool]` — Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter. + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.list_flags(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.list_flags( + feature_id="feature_id", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search by flag name, key, or ID + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.create_flag(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.create_flag( + default_value=True, + description="description", + key="key", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**default_value:** `bool` + +
+
+ +
+
+ +**description:** `str` + +
+
+ +
+
+ +**key:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**maintainer_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.get_flag(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.get_flag( + flag_id="flag_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**flag_id:** `str` — flag_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.update_flag(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.update_flag( + flag_id="flag_id", + default_value=True, + description="description", + key="key", + name="name", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**flag_id:** `str` — flag_id + +
+
+ +
+
+ +**default_value:** `bool` + +
+
+ +
+
+ +**description:** `str` + +
+
+ +
+
+ +**key:** `str` + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**maintainer_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.delete_flag(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.delete_flag( + flag_id="flag_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**flag_id:** `str` — flag_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.update_flag_rules(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import ( + CreateOrUpdateConditionGroupRequestBody, + CreateOrUpdateConditionRequestBody, + CreateOrUpdateRuleRequestBody, + Schematic, +) + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.update_flag_rules( + flag_id="flag_id", + rules=[ + CreateOrUpdateRuleRequestBody( + condition_groups=[ + CreateOrUpdateConditionGroupRequestBody( + conditions=[ + CreateOrUpdateConditionRequestBody( + condition_type="company", + operator="eq", + resource_ids=["resource_ids"], + ) + ], + ) + ], + conditions=[ + CreateOrUpdateConditionRequestBody( + condition_type="company", + operator="eq", + resource_ids=["resource_ids"], + ) + ], + name="name", + priority=1, + value=True, + ) + ], +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**flag_id:** `str` — flag_id + +
+
+ +
+
+ +**rules:** `typing.Sequence[CreateOrUpdateRuleRequestBody]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.check_flag(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.check_flag( + key="key", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**key:** `str` — key + +
+
+ +
+
+ +**company:** `typing.Optional[typing.Dict[str, str]]` + +
+
+ +
+
+ +**user:** `typing.Optional[typing.Dict[str, str]]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.check_flags(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.check_flags() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**company:** `typing.Optional[typing.Dict[str, str]]` + +
+
+ +
+
+ +**user:** `typing.Optional[typing.Dict[str, str]]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.features.count_flags(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.features.count_flags( + feature_id="feature_id", + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**feature_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` — Search by flag name, key, or ID + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## plangroups +
client.plangroups.get_plan_group() +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plangroups.get_plan_group() + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plangroups.create_plan_group(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import OrderedPlansInGroup, PlanGroupBundleOrder, Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plangroups.create_plan_group( + add_on_ids=["add_on_ids"], + checkout_collect_address=True, + checkout_collect_email=True, + checkout_collect_phone=True, + enable_tax_collection=True, + ordered_add_ons=[ + OrderedPlansInGroup( + plan_id="plan_id", + ) + ], + ordered_bundle_list=[ + PlanGroupBundleOrder( + bundle_id="bundleId", + ) + ], + ordered_plans=[ + OrderedPlansInGroup( + plan_id="plan_id", + ) + ], + prevent_downgrades_when_over_limit=True, + show_credits=True, + show_period_toggle=True, + show_zero_price_as_free=True, + sync_customer_billing_details_for_tax=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**add_on_ids:** `typing.Sequence[str]` — Use OrderedAddOns instead + +
+
+ +
+
+ +**checkout_collect_address:** `bool` + +
+
+ +
+
+ +**checkout_collect_email:** `bool` + +
+
+ +
+
+ +**checkout_collect_phone:** `bool` + +
+
+ +
+
+ +**enable_tax_collection:** `bool` + +
+
+ +
+
+ +**ordered_add_ons:** `typing.Sequence[OrderedPlansInGroup]` + +
+
+ +
+
+ +**ordered_bundle_list:** `typing.Sequence[PlanGroupBundleOrder]` + +
+
+ +
+
+ +**ordered_plans:** `typing.Sequence[OrderedPlansInGroup]` + +
+
+ +
+
+ +**prevent_downgrades_when_over_limit:** `bool` + +
+
+ +
+
+ +**show_credits:** `bool` + +
+
+ +
+
+ +**show_period_toggle:** `bool` + +
+
+ +
+
+ +**show_zero_price_as_free:** `bool` + +
+
+ +
+
+ +**sync_customer_billing_details_for_tax:** `bool` + +
+
+ +
+
+ +**add_on_compatibilities:** `typing.Optional[typing.Sequence[CompatiblePlans]]` + +
+
+ +
+
+ +**custom_plan_config:** `typing.Optional[CustomPlanConfig]` + +
+
+ +
+
+ +**custom_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**fallback_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**initial_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**initial_plan_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trial_days:** `typing.Optional[int]` + +
+
+ +
+
+ +**trial_expiry_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trial_expiry_plan_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trial_payment_method_required:** `typing.Optional[bool]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.plangroups.update_plan_group(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import OrderedPlansInGroup, PlanGroupBundleOrder, Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.plangroups.update_plan_group( + plan_group_id="plan_group_id", + add_on_ids=["add_on_ids"], + checkout_collect_address=True, + checkout_collect_email=True, + checkout_collect_phone=True, + enable_tax_collection=True, + ordered_add_ons=[ + OrderedPlansInGroup( + plan_id="plan_id", + ) + ], + ordered_bundle_list=[ + PlanGroupBundleOrder( + bundle_id="bundleId", + ) + ], + ordered_plans=[ + OrderedPlansInGroup( + plan_id="plan_id", + ) + ], + prevent_downgrades_when_over_limit=True, + show_credits=True, + show_period_toggle=True, + show_zero_price_as_free=True, + sync_customer_billing_details_for_tax=True, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**plan_group_id:** `str` — plan_group_id + +
+
+ +
+
+ +**add_on_ids:** `typing.Sequence[str]` — Use OrderedAddOns instead + +
+
+ +
+
+ +**checkout_collect_address:** `bool` + +
+
+ +
+
+ +**checkout_collect_email:** `bool` + +
+
+ +
+
+ +**checkout_collect_phone:** `bool` + +
+
+ +
+
+ +**enable_tax_collection:** `bool` + +
+
+ +
+
+ +**ordered_add_ons:** `typing.Sequence[OrderedPlansInGroup]` + +
+
+ +
+
+ +**ordered_bundle_list:** `typing.Sequence[PlanGroupBundleOrder]` + +
+
+ +
+
+ +**ordered_plans:** `typing.Sequence[OrderedPlansInGroup]` + +
+
+ +
+
+ +**prevent_downgrades_when_over_limit:** `bool` + +
+
+ +
+
+ +**show_credits:** `bool` + +
+
+ +
+
+ +**show_period_toggle:** `bool` + +
+
+ +
+
+ +**show_zero_price_as_free:** `bool` + +
+
+ +
+
+ +**sync_customer_billing_details_for_tax:** `bool` + +
+
+ +
+
+ +**add_on_compatibilities:** `typing.Optional[typing.Sequence[CompatiblePlans]]` + +
+
+ +
+
+ +**custom_plan_config:** `typing.Optional[CustomPlanConfig]` + +
+
+ +
+
+ +**custom_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**fallback_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**initial_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**initial_plan_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trial_days:** `typing.Optional[int]` + +
+
+ +
+
+ +**trial_expiry_plan_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trial_expiry_plan_price_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**trial_payment_method_required:** `typing.Optional[bool]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## accesstokens +
client.accesstokens.issue_temporary_access_token(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.accesstokens.issue_temporary_access_token( + lookup={"key": "value"}, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**lookup:** `typing.Dict[str, str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +## webhooks +
client.webhooks.list_webhook_events(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.webhooks.list_webhook_events( + q="q", + webhook_id="webhook_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**webhook_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.get_webhook_event(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.webhooks.get_webhook_event( + webhook_event_id="webhook_event_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**webhook_event_id:** `str` — webhook_event_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.count_webhook_events(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.webhooks.count_webhook_events( + q="q", + webhook_id="webhook_id", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**webhook_id:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.list_webhooks(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.webhooks.list_webhooks( + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.create_webhook(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.webhooks.create_webhook( + name="name", + request_types=["company.updated"], + url="url", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**name:** `str` + +
+
+ +
+
+ +**request_types:** `typing.Sequence[CreateWebhookRequestBodyRequestTypesItem]` + +
+
+ +
+
+ +**url:** `str` + +
+
+ +
+
+ +**credit_trigger_configs:** `typing.Optional[typing.Sequence[CreditTriggerConfig]]` + +
+
+ +
+
+ +**entitlement_trigger_configs:** `typing.Optional[typing.Sequence[EntitlementTriggerConfig]]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.get_webhook(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.webhooks.get_webhook( + webhook_id="webhook_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**webhook_id:** `str` — webhook_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.update_webhook(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.webhooks.update_webhook( + webhook_id="webhook_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**webhook_id:** `str` — webhook_id + +
+
+ +
+
+ +**credit_trigger_configs:** `typing.Optional[typing.Sequence[CreditTriggerConfig]]` + +
+
+ +
+
+ +**entitlement_trigger_configs:** `typing.Optional[typing.Sequence[EntitlementTriggerConfig]]` + +
+
+ +
+
+ +**name:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_types:** `typing.Optional[typing.Sequence[UpdateWebhookRequestBodyRequestTypesItem]]` + +
+
+ +
+
+ +**status:** `typing.Optional[UpdateWebhookRequestBodyStatus]` + +
+
+ +
+
+ +**url:** `typing.Optional[str]` + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.delete_webhook(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.webhooks.delete_webhook( + webhook_id="webhook_id", +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**webhook_id:** `str` — webhook_id + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ +
client.webhooks.count_webhooks(...) +
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```python +from schematic import Schematic + +client = Schematic( + api_key="YOUR_API_KEY", +) +client.webhooks.count_webhooks( + q="q", + limit=1, + offset=1, +) + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**q:** `typing.Optional[str]` + +
+
+ +
+
+ +**limit:** `typing.Optional[int]` — Page limit (default 100) + +
+
+ +
+
+ +**offset:** `typing.Optional[int]` — Page offset (default 0) + +
+
+ +
+
+ +**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration. + +
+
+
+
+ + +
+
+
+ diff --git a/requirements.txt b/requirements.txt index 170f512..e80f640 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ httpx>=0.21.2 pydantic>= 1.9.2 -pydantic-core==2.18.2 +pydantic-core>=2.18.2 typing_extensions>= 4.0.0 diff --git a/src/schematic/__init__.py b/src/schematic/__init__.py index b7e55f6..fc8a880 100644 --- a/src/schematic/__init__.py +++ b/src/schematic/__init__.py @@ -2,606 +2,1216 @@ # isort: skip_file -from .types import ( - ApiError, - ApiKeyCreateResponseData, - ApiKeyRequestListResponseData, - ApiKeyRequestResponseData, - ApiKeyResponseData, - BillingCouponResponseData, - BillingCreditBundleResponseData, - BillingCreditBundleView, - BillingCreditGrantResponseData, - BillingCreditLedgerResponseData, - BillingCreditResponseData, - BillingCustomerResponseData, - BillingCustomerSubscription, - BillingCustomerWithSubscriptionsResponseData, - BillingMeterResponseData, - BillingPlanCreditGrantResponseData, - BillingPriceResponseData, - BillingPriceView, - BillingProductDetailResponseData, - BillingProductForSubscriptionResponseData, - BillingProductPlanResponseData, - BillingProductPriceResponseData, - BillingProductPriceTierResponseData, - BillingProductPricing, - BillingProductPricingUsageType, - BillingProductResponseData, - BillingSubscriptionDiscount, - BillingSubscriptionDiscountView, - BillingSubscriptionResponseData, - BillingSubscriptionView, - ChangeSubscriptionInternalRequestBody, - ChangeSubscriptionRequestBody, - CheckFlagRequestBody, - CheckFlagResponseData, - CheckFlagsResponseData, - CheckoutDataResponseData, - CheckoutSettingsResponseData, - CheckoutSubscription, - CompanyCrmDealsResponseData, - CompanyDetailResponseData, - CompanyEventPeriodMetricsResponseData, - CompanyLedgerResponseData, - CompanyMembershipDetailResponseData, - CompanyMembershipResponseData, - CompanyOverrideNoteResponseData, - CompanyOverrideResponseData, - CompanyPlanDetailResponseData, - CompanyPlanWithBillingSubView, - CompanyResponseData, - CompanySubscriptionResponseData, - CompanyViewWithFeatureUsageResponseData, - CompatiblePlans, - CompatiblePlansResponseData, - ComponentCapabilities, - ComponentCheckoutSettings, - ComponentHydrateResponseData, - ComponentPreviewResponseData, - ComponentResponseData, - Condition, - ConditionGroup, - CountResponse, - CouponRequestBody, - CreateBillingPriceTierRequestBody, - CreateEntitlementReqCommon, - CreateEntitlementReqCommonMetricPeriod, - CreateEntitlementReqCommonMetricPeriodMonthReset, - CreateEntitlementReqCommonValueType, - CreateEventRequestBody, - CreateEventRequestBodyEventType, - CreateFlagRequestBody, - CreateOrUpdateConditionGroupRequestBody, - CreateOrUpdateConditionRequestBody, - CreateOrUpdateConditionRequestBodyConditionType, - CreateOrUpdateConditionRequestBodyMetricPeriod, - CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset, - CreateOrUpdateConditionRequestBodyOperator, - CreateOrUpdateFlagRequestBody, - CreateOrUpdateRuleRequestBody, - CreateOrUpdateRuleRequestBodyRuleType, - CreatePriceTierRequestBody, - CreditBundlePurchaseResponseData, - CreditCompanyGrantView, - CreditGrantDetail, - CreditGrantDetailGrantReason, - CreditLedgerEnrichedEntryResponseData, - CreditTriggerConfig, - CreditUsage, - CreditUsageResponseData, - CrmDealLineItem, - CrmDealResponseData, - CrmLineItemResponseData, - CrmProductResponseData, - CustomPlanConfig, - CustomPlanViewConfigResponseData, - DataExportResponseData, - Decimal, - DeleteResponse, - EntitlementTriggerConfig, - EntitlementsInPlan, - EntityKeyDefinitionResponseData, - EntityKeyDetailResponseData, - EntityKeyResponseData, - EntityTraitDefinitionResponseData, - EntityTraitDetailResponseData, - EntityTraitResponseData, - EntityTraitValue, - EnvironmentDetailResponseData, - EnvironmentResponseData, - EventBody, - EventBodyFlagCheck, - EventBodyIdentify, - EventBodyIdentifyCompany, - EventBodyTrack, - EventDetailResponseData, - EventResponseData, - EventSummaryResponseData, - FeatureCompanyResponseData, - FeatureCompanyResponseDataAllocationType, - FeatureCompanyResponseDataCreditGrantReason, - FeatureCompanyUserResponseData, - FeatureCompanyUserResponseDataAllocationType, - FeatureDetailResponseData, - FeatureLedgerResponseData, - FeatureResponseData, - FeatureUsageDataResponseData, - FeatureUsageDetailResponseData, - FeatureUsageResponseData, - FeatureUsageResponseDataAllocationType, - FeatureUsageResponseDataCreditGrantReason, - FlagDetailResponseData, - FlagResponseData, - GenericPreviewObject, - InvoiceRequestBody, - InvoiceResponseData, - IssueTemporaryAccessTokenResponseData, - KeysRequestBody, - ManagePlanPreviewResponseResponseData, - ManagePlanRequest, - ManagePlanResponseResponseData, - MeterRequestBody, - OrderedPlansInGroup, - PaymentMethodRequestBody, - PaymentMethodResponseData, - PlanChangeResponseData, - PlanChangeResponseDataAction, - PlanChangeResponseDataActorType, - PlanChangeResponseDataBasePlanAction, - PlanChangeResponseDataSubscriptionChangeAction, - PlanCreditGrantView, - PlanDetailResponseData, - PlanEntitlementResponseData, - PlanEntitlementsOrder, - PlanGroupBundleOrder, - PlanGroupDetailResponseData, - PlanGroupPlanDetailResponseData, - PlanGroupPlanEntitlementsOrder, - PlanGroupResponseData, - PlanIssueResponseData, - PlanResponseData, - PlanSelection, - PlanSnapshotView, - PlanTraitResponseData, - PreviewObject, - PreviewObjectResponseData, - PreviewSubscriptionChangeResponseData, - PreviewSubscriptionFinanceResponseData, - PreviewSubscriptionUpcomingInvoiceLineItems, - QuickstartResp, - RawEventBatchResponseData, - RawEventResponseData, - Rule, - RuleConditionDetailResponseData, - RuleConditionGroupDetailResponseData, - RuleConditionGroupResponseData, - RuleConditionResponseData, - RuleDetailResponseData, - RuleResponseData, - RulesDetailResponseData, - SegmentStatusResp, - StripeEmbedInfo, - SubscriptionTraitUpdate, - TemporaryAccessTokenResponseData, - TraitDefinition, - UpdateAddOnRequestBody, - UpdateCreditBundleRequestBody, - UpdateEntitlementReqCommon, - UpdateEntitlementReqCommonMetricPeriod, - UpdateEntitlementReqCommonMetricPeriodMonthReset, - UpdateEntitlementReqCommonValueType, - UpdatePayInAdvanceRequestBody, - UpdatePlanTraitTraitRequestBody, - UpdateRuleRequestBody, - UpsertCompanyRequestBody, - UpsertTraitRequestBody, - UpsertUserRequestBody, - UpsertUserSubRequestBody, - UsageBasedEntitlementRequestBody, - UsageBasedEntitlementRequestBodyPriceBehavior, - UsageBasedEntitlementResponseData, - UserDetailResponseData, - UserResponseData, - WebhookEventDetailResponseData, - WebhookEventResponseData, - WebhookResponseData, -) -from .errors import BadRequestError, ForbiddenError, InternalServerError, NotFoundError, UnauthorizedError -from . import ( - accesstokens, - accounts, - billing, - checkout, - companies, - components, - credits, - crm, - dataexports, - entitlements, - events, - features, - plangroups, - plans, - webhooks, -) -from .accesstokens import IssueTemporaryAccessTokenResponse -from .accounts import ( - CountApiKeysParams, - CountApiKeysResponse, - CountApiRequestsParams, - CountApiRequestsResponse, - CreateApiKeyResponse, - CreateEnvironmentRequestBodyEnvironmentType, - CreateEnvironmentResponse, - DeleteApiKeyResponse, - DeleteEnvironmentResponse, - GetApiKeyResponse, - GetApiRequestResponse, - GetEnvironmentResponse, - ListApiKeysParams, - ListApiKeysResponse, - ListApiRequestsParams, - ListApiRequestsResponse, - ListEnvironmentsParams, - ListEnvironmentsResponse, - QuickstartResponse, - UpdateApiKeyResponse, - UpdateEnvironmentRequestBodyEnvironmentType, - UpdateEnvironmentResponse, -) -from .billing import ( - CountBillingProductsParams, - CountBillingProductsRequestPriceUsageType, - CountBillingProductsResponse, - CountBillingProductsResponseParamsPriceUsageType, - CountCustomersParams, - CountCustomersResponse, - CreateBillingPriceRequestBodyBillingScheme, - CreateBillingPriceRequestBodyTiersMode, - CreateBillingPriceRequestBodyUsageType, - CreateBillingSubscriptionRequestBodyTrialEndSetting, - DeleteBillingProductResponse, - DeleteProductPriceResponse, - ListBillingProductsParams, - ListBillingProductsRequestPriceUsageType, - ListBillingProductsResponse, - ListBillingProductsResponseParamsPriceUsageType, - ListCouponsParams, - ListCouponsResponse, - ListCustomersWithSubscriptionsParams, - ListCustomersWithSubscriptionsResponse, - ListInvoicesParams, - ListInvoicesResponse, - ListMetersParams, - ListMetersResponse, - ListPaymentMethodsParams, - ListPaymentMethodsResponse, - ListProductPricesParams, - ListProductPricesRequestPriceUsageType, - ListProductPricesResponse, - ListProductPricesResponseParamsPriceUsageType, - SearchBillingPricesParams, - SearchBillingPricesRequestTiersMode, - SearchBillingPricesRequestUsageType, - SearchBillingPricesResponse, - SearchBillingPricesResponseParamsTiersMode, - SearchBillingPricesResponseParamsUsageType, - UpsertBillingCouponResponse, - UpsertBillingCustomerResponse, - UpsertBillingMeterResponse, - UpsertBillingPriceResponse, - UpsertBillingProductResponse, - UpsertBillingSubscriptionResponse, - UpsertInvoiceResponse, - UpsertPaymentMethodResponse, -) -from .checkout import ( - CheckoutInternalResponse, - GetCheckoutDataResponse, - ManagePlanResponse, - PreviewCheckoutInternalResponse, - PreviewManagePlanResponse, - UpdateCustomerSubscriptionTrialEndResponse, -) -from .client import AsyncSchematic, AsyncSchematicConfig, LocalCache, Schematic, SchematicConfig -from .companies import ( - CountCompaniesForAdvancedFilterParams, - CountCompaniesForAdvancedFilterRequestSortOrderDirection, - CountCompaniesForAdvancedFilterResponse, - CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection, - CountCompaniesParams, - CountCompaniesResponse, - CountEntityKeyDefinitionsParams, - CountEntityKeyDefinitionsRequestEntityType, - CountEntityKeyDefinitionsResponse, - CountEntityKeyDefinitionsResponseParamsEntityType, - CountEntityTraitDefinitionsParams, - CountEntityTraitDefinitionsRequestEntityType, - CountEntityTraitDefinitionsRequestTraitType, - CountEntityTraitDefinitionsResponse, - CountEntityTraitDefinitionsResponseParamsEntityType, - CountEntityTraitDefinitionsResponseParamsTraitType, - CountPlanTraitsParams, - CountPlanTraitsResponse, - CountUsersParams, - CountUsersResponse, - CreateCompanyResponse, - CreateEntityTraitDefinitionRequestBodyEntityType, - CreateEntityTraitDefinitionRequestBodyTraitType, - CreatePlanTraitResponse, - CreateUserResponse, - DeleteCompanyByKeysResponse, - DeleteCompanyMembershipResponse, - DeleteCompanyResponse, - DeletePlanTraitResponse, - DeleteUserByKeysResponse, - DeleteUserResponse, - GetActiveCompanySubscriptionParams, - GetActiveCompanySubscriptionResponse, - GetActiveDealsParams, - GetActiveDealsResponse, - GetCompanyResponse, - GetEntityTraitDefinitionResponse, - GetEntityTraitValuesParams, - GetEntityTraitValuesResponse, - GetOrCreateCompanyMembershipResponse, - GetOrCreateEntityTraitDefinitionResponse, - GetPlanChangeResponse, - GetPlanTraitResponse, - GetUserResponse, - ListCompaniesForAdvancedFilterParams, - ListCompaniesForAdvancedFilterRequestSortOrderDirection, - ListCompaniesForAdvancedFilterResponse, - ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection, - ListCompaniesParams, - ListCompaniesResponse, - ListCompanyMembershipsParams, - ListCompanyMembershipsResponse, - ListEntityKeyDefinitionsParams, - ListEntityKeyDefinitionsRequestEntityType, - ListEntityKeyDefinitionsResponse, - ListEntityKeyDefinitionsResponseParamsEntityType, - ListEntityTraitDefinitionsParams, - ListEntityTraitDefinitionsRequestEntityType, - ListEntityTraitDefinitionsRequestTraitType, - ListEntityTraitDefinitionsResponse, - ListEntityTraitDefinitionsResponseParamsEntityType, - ListEntityTraitDefinitionsResponseParamsTraitType, - ListPlanChangesParams, - ListPlanChangesResponse, - ListPlanTraitsParams, - ListPlanTraitsResponse, - ListUsersParams, - ListUsersResponse, - LookupCompanyParams, - LookupCompanyResponse, - LookupUserParams, - LookupUserResponse, - UpdateEntityTraitDefinitionRequestBodyTraitType, - UpdateEntityTraitDefinitionResponse, - UpdatePlanTraitResponse, - UpdatePlanTraitsBulkResponse, - UpsertCompanyResponse, - UpsertCompanyTraitResponse, - UpsertUserResponse, - UpsertUserTraitResponse, -) -from .components import ( - CountComponentsParams, - CountComponentsResponse, - CreateComponentRequestBodyEntityType, - CreateComponentResponse, - DeleteComponentResponse, - GetComponentResponse, - ListComponentsParams, - ListComponentsResponse, - PreviewComponentDataParams, - PreviewComponentDataResponse, - UpdateComponentRequestBodyEntityType, - UpdateComponentRequestBodyState, - UpdateComponentResponse, -) -from .credits import ( - CountBillingCreditsGrantsParams, - CountBillingCreditsGrantsResponse, - CountBillingCreditsParams, - CountBillingCreditsResponse, - CountBillingPlanCreditGrantsParams, - CountBillingPlanCreditGrantsResponse, - CountCreditBundlesParams, - CountCreditBundlesRequestStatus, - CountCreditBundlesResponse, - CountCreditBundlesResponseParamsStatus, - CountCreditLedgerParams, - CountCreditLedgerRequestPeriod, - CountCreditLedgerResponse, - CountCreditLedgerResponseParamsPeriod, - CreateBillingCreditRequestBodyBurnStrategy, - CreateBillingCreditRequestBodyDefaultRolloverPolicy, - CreateBillingCreditResponse, - CreateBillingPlanCreditGrantRequestBodyExpiryType, - CreateBillingPlanCreditGrantRequestBodyExpiryUnit, - CreateBillingPlanCreditGrantRequestBodyResetCadence, - CreateBillingPlanCreditGrantRequestBodyResetStart, - CreateBillingPlanCreditGrantRequestBodyResetType, - CreateBillingPlanCreditGrantResponse, - CreateCompanyCreditGrantExpiryType, - CreateCompanyCreditGrantExpiryUnit, - CreateCreditBundleRequestBodyExpiryType, - CreateCreditBundleRequestBodyExpiryUnit, - CreateCreditBundleRequestBodyStatus, - CreateCreditBundleResponse, - DeleteBillingPlanCreditGrantResponse, - DeleteCreditBundleResponse, - GetCreditBundleResponse, - GetEnrichedCreditLedgerParams, - GetEnrichedCreditLedgerRequestPeriod, - GetEnrichedCreditLedgerResponse, - GetEnrichedCreditLedgerResponseParamsPeriod, - GetSingleBillingCreditResponse, - GrantBillingCreditsToCompanyResponse, - ListBillingCreditsParams, - ListBillingCreditsResponse, - ListBillingPlanCreditGrantsParams, - ListBillingPlanCreditGrantsResponse, - ListCompanyGrantsParams, - ListCompanyGrantsRequestDir, - ListCompanyGrantsRequestOrder, - ListCompanyGrantsResponse, - ListCompanyGrantsResponseParamsDir, - ListCompanyGrantsResponseParamsOrder, - ListCreditBundlesParams, - ListCreditBundlesRequestStatus, - ListCreditBundlesResponse, - ListCreditBundlesResponseParamsStatus, - ListGrantsForCreditParams, - ListGrantsForCreditResponse, - SoftDeleteBillingCreditResponse, - UpdateBillingCreditRequestBodyBurnStrategy, - UpdateBillingCreditRequestBodyDefaultRolloverPolicy, - UpdateBillingCreditResponse, - UpdateCreditBundleDetailsRequestBodyExpiryType, - UpdateCreditBundleDetailsRequestBodyExpiryUnit, - UpdateCreditBundleDetailsRequestBodyStatus, - UpdateCreditBundleDetailsResponse, - ZeroOutGrantRequestBodyReason, - ZeroOutGrantResponse, -) -from .crm import ( - ListCrmProductsParams, - ListCrmProductsResponse, - UpsertCrmDealResponse, - UpsertCrmProductResponse, - UpsertDealLineItemAssociationResponse, - UpsertLineItemResponse, -) -from .dataexports import CreateDataExportResponse -from .entitlements import ( - CountCompanyOverridesParams, - CountCompanyOverridesResponse, - CountFeatureCompaniesParams, - CountFeatureCompaniesResponse, - CountFeatureUsageParams, - CountFeatureUsageResponse, - CountFeatureUsersParams, - CountFeatureUsersResponse, - CountPlanEntitlementsParams, - CountPlanEntitlementsResponse, - CreateCompanyOverrideRequestBodyMetricPeriod, - CreateCompanyOverrideRequestBodyMetricPeriodMonthReset, - CreateCompanyOverrideRequestBodyValueType, - CreateCompanyOverrideResponse, - CreatePlanEntitlementRequestBodyMetricPeriod, - CreatePlanEntitlementRequestBodyMetricPeriodMonthReset, - CreatePlanEntitlementRequestBodyPriceBehavior, - CreatePlanEntitlementRequestBodyValueType, - CreatePlanEntitlementResponse, - DeleteCompanyOverrideResponse, - DeletePlanEntitlementResponse, - GetCompanyOverrideResponse, - GetFeatureUsageByCompanyParams, - GetFeatureUsageByCompanyResponse, - GetPlanEntitlementResponse, - ListCompanyOverridesParams, - ListCompanyOverridesResponse, - ListFeatureCompaniesParams, - ListFeatureCompaniesResponse, - ListFeatureUsageParams, - ListFeatureUsageResponse, - ListFeatureUsersParams, - ListFeatureUsersResponse, - ListPlanEntitlementsParams, - ListPlanEntitlementsResponse, - UpdateCompanyOverrideRequestBodyMetricPeriod, - UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset, - UpdateCompanyOverrideRequestBodyValueType, - UpdateCompanyOverrideResponse, - UpdatePlanEntitlementRequestBodyMetricPeriod, - UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset, - UpdatePlanEntitlementRequestBodyPriceBehavior, - UpdatePlanEntitlementRequestBodyValueType, - UpdatePlanEntitlementResponse, -) -from .environment import SchematicEnvironment -from .events import ( - CreateEventBatchResponse, - CreateEventResponse, - GetEventResponse, - GetEventSummariesParams, - GetEventSummariesResponse, - GetSegmentIntegrationStatusResponse, - ListEventsParams, - ListEventsRequestEventTypesItem, - ListEventsResponse, - ListEventsResponseParamsEventTypesItem, -) -from .features import ( - CheckFlagResponse, - CheckFlagsResponse, - CountFeaturesParams, - CountFeaturesResponse, - CountFlagsParams, - CountFlagsResponse, - CreateFeatureRequestBodyFeatureType, - CreateFeatureRequestBodyLifecyclePhase, - CreateFeatureResponse, - CreateFlagResponse, - DeleteFeatureResponse, - DeleteFlagResponse, - GetFeatureResponse, - GetFlagResponse, - ListFeaturesParams, - ListFeaturesResponse, - ListFlagsParams, - ListFlagsResponse, - UpdateFeatureRequestBodyFeatureType, - UpdateFeatureRequestBodyLifecyclePhase, - UpdateFeatureResponse, - UpdateFlagResponse, - UpdateFlagRulesResponse, -) -from .plangroups import CreatePlanGroupResponse, GetPlanGroupResponse, UpdatePlanGroupResponse -from .plans import ( - CountPlansParams, - CountPlansRequestPlanType, - CountPlansResponse, - CountPlansResponseParamsPlanType, - CreatePlanRequestBodyPlanType, - CreatePlanResponse, - DeletePlanResponse, - GetPlanResponse, - ListPlanIssuesParams, - ListPlanIssuesResponse, - ListPlansParams, - ListPlansRequestPlanType, - ListPlansResponse, - ListPlansResponseParamsPlanType, - UpdateCompanyPlansResponse, - UpdatePlanResponse, - UpsertBillingProductPlanResponse, - UpsertBillingProductRequestBodyChargeType, -) -from .version import __version__ -from .webhooks import ( - CountWebhookEventsParams, - CountWebhookEventsResponse, - CountWebhooksParams, - CountWebhooksResponse, - CreateWebhookRequestBodyRequestTypesItem, - CreateWebhookResponse, - DeleteWebhookResponse, - GetWebhookEventResponse, - GetWebhookResponse, - ListWebhookEventsParams, - ListWebhookEventsResponse, - ListWebhooksParams, - ListWebhooksResponse, - UpdateWebhookRequestBodyRequestTypesItem, - UpdateWebhookRequestBodyStatus, - UpdateWebhookResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + ApiError, + ApiKeyCreateResponseData, + ApiKeyRequestListResponseData, + ApiKeyRequestResponseData, + ApiKeyResponseData, + BillingCouponResponseData, + BillingCreditBundleResponseData, + BillingCreditBundleView, + BillingCreditGrantResponseData, + BillingCreditLedgerResponseData, + BillingCreditResponseData, + BillingCustomerResponseData, + BillingCustomerSubscription, + BillingCustomerWithSubscriptionsResponseData, + BillingMeterResponseData, + BillingPlanCreditGrantResponseData, + BillingPriceResponseData, + BillingPriceView, + BillingProductDetailResponseData, + BillingProductForSubscriptionResponseData, + BillingProductPlanResponseData, + BillingProductPriceResponseData, + BillingProductPriceTierResponseData, + BillingProductPricing, + BillingProductPricingUsageType, + BillingProductResponseData, + BillingSubscriptionDiscount, + BillingSubscriptionDiscountView, + BillingSubscriptionResponseData, + BillingSubscriptionView, + ChangeSubscriptionInternalRequestBody, + ChangeSubscriptionRequestBody, + CheckFlagRequestBody, + CheckFlagResponseData, + CheckFlagsResponseData, + CheckoutDataResponseData, + CheckoutSettingsResponseData, + CheckoutSubscription, + CompanyCrmDealsResponseData, + CompanyDetailResponseData, + CompanyEventPeriodMetricsResponseData, + CompanyLedgerResponseData, + CompanyMembershipDetailResponseData, + CompanyMembershipResponseData, + CompanyOverrideNoteResponseData, + CompanyOverrideResponseData, + CompanyPlanDetailResponseData, + CompanyPlanWithBillingSubView, + CompanyResponseData, + CompanySubscriptionResponseData, + CompanyViewWithFeatureUsageResponseData, + CompatiblePlans, + CompatiblePlansResponseData, + ComponentCapabilities, + ComponentCheckoutSettings, + ComponentHydrateResponseData, + ComponentPreviewResponseData, + ComponentResponseData, + Condition, + ConditionGroup, + CountResponse, + CouponRequestBody, + CreateBillingPriceTierRequestBody, + CreateEntitlementReqCommon, + CreateEntitlementReqCommonMetricPeriod, + CreateEntitlementReqCommonMetricPeriodMonthReset, + CreateEntitlementReqCommonValueType, + CreateEventRequestBody, + CreateEventRequestBodyEventType, + CreateFlagRequestBody, + CreateOrUpdateConditionGroupRequestBody, + CreateOrUpdateConditionRequestBody, + CreateOrUpdateConditionRequestBodyConditionType, + CreateOrUpdateConditionRequestBodyMetricPeriod, + CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset, + CreateOrUpdateConditionRequestBodyOperator, + CreateOrUpdateFlagRequestBody, + CreateOrUpdateRuleRequestBody, + CreateOrUpdateRuleRequestBodyRuleType, + CreatePriceTierRequestBody, + CreditBundlePurchaseResponseData, + CreditCompanyGrantView, + CreditGrantDetail, + CreditGrantDetailGrantReason, + CreditLedgerEnrichedEntryResponseData, + CreditTriggerConfig, + CreditUsage, + CreditUsageResponseData, + CrmDealLineItem, + CrmDealResponseData, + CrmLineItemResponseData, + CrmProductResponseData, + CustomPlanConfig, + CustomPlanViewConfigResponseData, + DataExportResponseData, + Decimal, + DeleteResponse, + EntitlementTriggerConfig, + EntitlementsInPlan, + EntityKeyDefinitionResponseData, + EntityKeyDetailResponseData, + EntityKeyResponseData, + EntityTraitDefinitionResponseData, + EntityTraitDetailResponseData, + EntityTraitResponseData, + EntityTraitValue, + EnvironmentDetailResponseData, + EnvironmentResponseData, + EventBody, + EventBodyFlagCheck, + EventBodyIdentify, + EventBodyIdentifyCompany, + EventBodyTrack, + EventDetailResponseData, + EventResponseData, + EventSummaryResponseData, + FeatureCompanyResponseData, + FeatureCompanyResponseDataAllocationType, + FeatureCompanyResponseDataCreditGrantReason, + FeatureCompanyUserResponseData, + FeatureCompanyUserResponseDataAllocationType, + FeatureDetailResponseData, + FeatureLedgerResponseData, + FeatureResponseData, + FeatureUsageDataResponseData, + FeatureUsageDetailResponseData, + FeatureUsageResponseData, + FeatureUsageResponseDataAllocationType, + FeatureUsageResponseDataCreditGrantReason, + FlagDetailResponseData, + FlagResponseData, + GenericPreviewObject, + InvoiceRequestBody, + InvoiceResponseData, + IssueTemporaryAccessTokenResponseData, + KeysRequestBody, + ManagePlanPreviewResponseResponseData, + ManagePlanRequest, + ManagePlanResponseResponseData, + MeterRequestBody, + OrderedPlansInGroup, + PaymentMethodRequestBody, + PaymentMethodResponseData, + PlanChangeResponseData, + PlanChangeResponseDataAction, + PlanChangeResponseDataActorType, + PlanChangeResponseDataBasePlanAction, + PlanChangeResponseDataSubscriptionChangeAction, + PlanCreditGrantView, + PlanDetailResponseData, + PlanEntitlementResponseData, + PlanEntitlementsOrder, + PlanGroupBundleOrder, + PlanGroupDetailResponseData, + PlanGroupPlanDetailResponseData, + PlanGroupPlanEntitlementsOrder, + PlanGroupResponseData, + PlanIssueResponseData, + PlanResponseData, + PlanSelection, + PlanSnapshotView, + PlanTraitResponseData, + PreviewObject, + PreviewObjectResponseData, + PreviewSubscriptionChangeResponseData, + PreviewSubscriptionFinanceResponseData, + PreviewSubscriptionUpcomingInvoiceLineItems, + QuickstartResp, + RawEventBatchResponseData, + RawEventResponseData, + Rule, + RuleConditionDetailResponseData, + RuleConditionGroupDetailResponseData, + RuleConditionGroupResponseData, + RuleConditionResponseData, + RuleDetailResponseData, + RuleResponseData, + RulesDetailResponseData, + SegmentStatusResp, + StripeEmbedInfo, + SubscriptionTraitUpdate, + TemporaryAccessTokenResponseData, + TraitDefinition, + UpdateAddOnRequestBody, + UpdateCreditBundleRequestBody, + UpdateEntitlementReqCommon, + UpdateEntitlementReqCommonMetricPeriod, + UpdateEntitlementReqCommonMetricPeriodMonthReset, + UpdateEntitlementReqCommonValueType, + UpdatePayInAdvanceRequestBody, + UpdatePlanTraitTraitRequestBody, + UpdateRuleRequestBody, + UpsertCompanyRequestBody, + UpsertTraitRequestBody, + UpsertUserRequestBody, + UpsertUserSubRequestBody, + UsageBasedEntitlementRequestBody, + UsageBasedEntitlementRequestBodyPriceBehavior, + UsageBasedEntitlementResponseData, + UserDetailResponseData, + UserResponseData, + WebhookEventDetailResponseData, + WebhookEventResponseData, + WebhookResponseData, + ) + from .errors import BadRequestError, ForbiddenError, InternalServerError, NotFoundError, UnauthorizedError + from . import ( + accesstokens, + accounts, + billing, + checkout, + companies, + components, + credits, + crm, + dataexports, + entitlements, + events, + features, + plangroups, + plans, + webhooks, + ) + from .accesstokens import IssueTemporaryAccessTokenResponse + from .accounts import ( + CountApiKeysParams, + CountApiKeysResponse, + CountApiRequestsParams, + CountApiRequestsResponse, + CreateApiKeyResponse, + CreateEnvironmentRequestBodyEnvironmentType, + CreateEnvironmentResponse, + DeleteApiKeyResponse, + DeleteEnvironmentResponse, + GetApiKeyResponse, + GetApiRequestResponse, + GetEnvironmentResponse, + ListApiKeysParams, + ListApiKeysResponse, + ListApiRequestsParams, + ListApiRequestsResponse, + ListEnvironmentsParams, + ListEnvironmentsResponse, + QuickstartResponse, + UpdateApiKeyResponse, + UpdateEnvironmentRequestBodyEnvironmentType, + UpdateEnvironmentResponse, + ) + from .billing import ( + CountBillingProductsParams, + CountBillingProductsRequestPriceUsageType, + CountBillingProductsResponse, + CountBillingProductsResponseParamsPriceUsageType, + CountCustomersParams, + CountCustomersResponse, + CreateBillingPriceRequestBodyBillingScheme, + CreateBillingPriceRequestBodyTiersMode, + CreateBillingPriceRequestBodyUsageType, + CreateBillingSubscriptionRequestBodyTrialEndSetting, + DeleteBillingProductResponse, + DeleteProductPriceResponse, + ListBillingProductsParams, + ListBillingProductsRequestPriceUsageType, + ListBillingProductsResponse, + ListBillingProductsResponseParamsPriceUsageType, + ListCouponsParams, + ListCouponsResponse, + ListCustomersWithSubscriptionsParams, + ListCustomersWithSubscriptionsResponse, + ListInvoicesParams, + ListInvoicesResponse, + ListMetersParams, + ListMetersResponse, + ListPaymentMethodsParams, + ListPaymentMethodsResponse, + ListProductPricesParams, + ListProductPricesRequestPriceUsageType, + ListProductPricesResponse, + ListProductPricesResponseParamsPriceUsageType, + SearchBillingPricesParams, + SearchBillingPricesRequestTiersMode, + SearchBillingPricesRequestUsageType, + SearchBillingPricesResponse, + SearchBillingPricesResponseParamsTiersMode, + SearchBillingPricesResponseParamsUsageType, + UpsertBillingCouponResponse, + UpsertBillingCustomerResponse, + UpsertBillingMeterResponse, + UpsertBillingPriceResponse, + UpsertBillingProductResponse, + UpsertBillingSubscriptionResponse, + UpsertInvoiceResponse, + UpsertPaymentMethodResponse, + ) + from .checkout import ( + CheckoutInternalResponse, + GetCheckoutDataResponse, + ManagePlanResponse, + PreviewCheckoutInternalResponse, + PreviewManagePlanResponse, + UpdateCustomerSubscriptionTrialEndResponse, + ) + from .client import AsyncSchematic, AsyncSchematicConfig, LocalCache, Schematic, SchematicConfig + from .companies import ( + CountCompaniesForAdvancedFilterParams, + CountCompaniesForAdvancedFilterRequestSortOrderDirection, + CountCompaniesForAdvancedFilterResponse, + CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection, + CountCompaniesParams, + CountCompaniesResponse, + CountEntityKeyDefinitionsParams, + CountEntityKeyDefinitionsRequestEntityType, + CountEntityKeyDefinitionsResponse, + CountEntityKeyDefinitionsResponseParamsEntityType, + CountEntityTraitDefinitionsParams, + CountEntityTraitDefinitionsRequestEntityType, + CountEntityTraitDefinitionsRequestTraitType, + CountEntityTraitDefinitionsResponse, + CountEntityTraitDefinitionsResponseParamsEntityType, + CountEntityTraitDefinitionsResponseParamsTraitType, + CountPlanTraitsParams, + CountPlanTraitsResponse, + CountUsersParams, + CountUsersResponse, + CreateCompanyResponse, + CreateEntityTraitDefinitionRequestBodyEntityType, + CreateEntityTraitDefinitionRequestBodyTraitType, + CreatePlanTraitResponse, + CreateUserResponse, + DeleteCompanyByKeysResponse, + DeleteCompanyMembershipResponse, + DeleteCompanyResponse, + DeletePlanTraitResponse, + DeleteUserByKeysResponse, + DeleteUserResponse, + GetActiveCompanySubscriptionParams, + GetActiveCompanySubscriptionResponse, + GetActiveDealsParams, + GetActiveDealsResponse, + GetCompanyResponse, + GetEntityTraitDefinitionResponse, + GetEntityTraitValuesParams, + GetEntityTraitValuesResponse, + GetOrCreateCompanyMembershipResponse, + GetOrCreateEntityTraitDefinitionResponse, + GetPlanChangeResponse, + GetPlanTraitResponse, + GetUserResponse, + ListCompaniesForAdvancedFilterParams, + ListCompaniesForAdvancedFilterRequestSortOrderDirection, + ListCompaniesForAdvancedFilterResponse, + ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection, + ListCompaniesParams, + ListCompaniesResponse, + ListCompanyMembershipsParams, + ListCompanyMembershipsResponse, + ListEntityKeyDefinitionsParams, + ListEntityKeyDefinitionsRequestEntityType, + ListEntityKeyDefinitionsResponse, + ListEntityKeyDefinitionsResponseParamsEntityType, + ListEntityTraitDefinitionsParams, + ListEntityTraitDefinitionsRequestEntityType, + ListEntityTraitDefinitionsRequestTraitType, + ListEntityTraitDefinitionsResponse, + ListEntityTraitDefinitionsResponseParamsEntityType, + ListEntityTraitDefinitionsResponseParamsTraitType, + ListPlanChangesParams, + ListPlanChangesResponse, + ListPlanTraitsParams, + ListPlanTraitsResponse, + ListUsersParams, + ListUsersResponse, + LookupCompanyParams, + LookupCompanyResponse, + LookupUserParams, + LookupUserResponse, + UpdateEntityTraitDefinitionRequestBodyTraitType, + UpdateEntityTraitDefinitionResponse, + UpdatePlanTraitResponse, + UpdatePlanTraitsBulkResponse, + UpsertCompanyResponse, + UpsertCompanyTraitResponse, + UpsertUserResponse, + UpsertUserTraitResponse, + ) + from .components import ( + CountComponentsParams, + CountComponentsResponse, + CreateComponentRequestBodyEntityType, + CreateComponentResponse, + DeleteComponentResponse, + GetComponentResponse, + ListComponentsParams, + ListComponentsResponse, + PreviewComponentDataParams, + PreviewComponentDataResponse, + UpdateComponentRequestBodyEntityType, + UpdateComponentRequestBodyState, + UpdateComponentResponse, + ) + from .credits import ( + CountBillingCreditsGrantsParams, + CountBillingCreditsGrantsResponse, + CountBillingCreditsParams, + CountBillingCreditsResponse, + CountBillingPlanCreditGrantsParams, + CountBillingPlanCreditGrantsResponse, + CountCreditBundlesParams, + CountCreditBundlesRequestStatus, + CountCreditBundlesResponse, + CountCreditBundlesResponseParamsStatus, + CountCreditLedgerParams, + CountCreditLedgerRequestPeriod, + CountCreditLedgerResponse, + CountCreditLedgerResponseParamsPeriod, + CreateBillingCreditRequestBodyBurnStrategy, + CreateBillingCreditRequestBodyDefaultRolloverPolicy, + CreateBillingCreditResponse, + CreateBillingPlanCreditGrantRequestBodyExpiryType, + CreateBillingPlanCreditGrantRequestBodyExpiryUnit, + CreateBillingPlanCreditGrantRequestBodyResetCadence, + CreateBillingPlanCreditGrantRequestBodyResetStart, + CreateBillingPlanCreditGrantRequestBodyResetType, + CreateBillingPlanCreditGrantResponse, + CreateCompanyCreditGrantExpiryType, + CreateCompanyCreditGrantExpiryUnit, + CreateCreditBundleRequestBodyExpiryType, + CreateCreditBundleRequestBodyExpiryUnit, + CreateCreditBundleRequestBodyStatus, + CreateCreditBundleResponse, + DeleteBillingPlanCreditGrantResponse, + DeleteCreditBundleResponse, + GetCreditBundleResponse, + GetEnrichedCreditLedgerParams, + GetEnrichedCreditLedgerRequestPeriod, + GetEnrichedCreditLedgerResponse, + GetEnrichedCreditLedgerResponseParamsPeriod, + GetSingleBillingCreditResponse, + GrantBillingCreditsToCompanyResponse, + ListBillingCreditsParams, + ListBillingCreditsResponse, + ListBillingPlanCreditGrantsParams, + ListBillingPlanCreditGrantsResponse, + ListCompanyGrantsParams, + ListCompanyGrantsRequestDir, + ListCompanyGrantsRequestOrder, + ListCompanyGrantsResponse, + ListCompanyGrantsResponseParamsDir, + ListCompanyGrantsResponseParamsOrder, + ListCreditBundlesParams, + ListCreditBundlesRequestStatus, + ListCreditBundlesResponse, + ListCreditBundlesResponseParamsStatus, + ListGrantsForCreditParams, + ListGrantsForCreditResponse, + SoftDeleteBillingCreditResponse, + UpdateBillingCreditRequestBodyBurnStrategy, + UpdateBillingCreditRequestBodyDefaultRolloverPolicy, + UpdateBillingCreditResponse, + UpdateCreditBundleDetailsRequestBodyExpiryType, + UpdateCreditBundleDetailsRequestBodyExpiryUnit, + UpdateCreditBundleDetailsRequestBodyStatus, + UpdateCreditBundleDetailsResponse, + ZeroOutGrantRequestBodyReason, + ZeroOutGrantResponse, + ) + from .crm import ( + ListCrmProductsParams, + ListCrmProductsResponse, + UpsertCrmDealResponse, + UpsertCrmProductResponse, + UpsertDealLineItemAssociationResponse, + UpsertLineItemResponse, + ) + from .dataexports import CreateDataExportResponse + from .entitlements import ( + CountCompanyOverridesParams, + CountCompanyOverridesResponse, + CountFeatureCompaniesParams, + CountFeatureCompaniesResponse, + CountFeatureUsageParams, + CountFeatureUsageResponse, + CountFeatureUsersParams, + CountFeatureUsersResponse, + CountPlanEntitlementsParams, + CountPlanEntitlementsResponse, + CreateCompanyOverrideRequestBodyMetricPeriod, + CreateCompanyOverrideRequestBodyMetricPeriodMonthReset, + CreateCompanyOverrideRequestBodyValueType, + CreateCompanyOverrideResponse, + CreatePlanEntitlementRequestBodyMetricPeriod, + CreatePlanEntitlementRequestBodyMetricPeriodMonthReset, + CreatePlanEntitlementRequestBodyPriceBehavior, + CreatePlanEntitlementRequestBodyValueType, + CreatePlanEntitlementResponse, + DeleteCompanyOverrideResponse, + DeletePlanEntitlementResponse, + GetCompanyOverrideResponse, + GetFeatureUsageByCompanyParams, + GetFeatureUsageByCompanyResponse, + GetPlanEntitlementResponse, + ListCompanyOverridesParams, + ListCompanyOverridesResponse, + ListFeatureCompaniesParams, + ListFeatureCompaniesResponse, + ListFeatureUsageParams, + ListFeatureUsageResponse, + ListFeatureUsersParams, + ListFeatureUsersResponse, + ListPlanEntitlementsParams, + ListPlanEntitlementsResponse, + UpdateCompanyOverrideRequestBodyMetricPeriod, + UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset, + UpdateCompanyOverrideRequestBodyValueType, + UpdateCompanyOverrideResponse, + UpdatePlanEntitlementRequestBodyMetricPeriod, + UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset, + UpdatePlanEntitlementRequestBodyPriceBehavior, + UpdatePlanEntitlementRequestBodyValueType, + UpdatePlanEntitlementResponse, + ) + from .environment import SchematicEnvironment + from .events import ( + CreateEventBatchResponse, + CreateEventResponse, + GetEventResponse, + GetEventSummariesParams, + GetEventSummariesResponse, + GetSegmentIntegrationStatusResponse, + ListEventsParams, + ListEventsRequestEventTypesItem, + ListEventsResponse, + ListEventsResponseParamsEventTypesItem, + ) + from .features import ( + CheckFlagResponse, + CheckFlagsResponse, + CountFeaturesParams, + CountFeaturesResponse, + CountFlagsParams, + CountFlagsResponse, + CreateFeatureRequestBodyFeatureType, + CreateFeatureRequestBodyLifecyclePhase, + CreateFeatureResponse, + CreateFlagResponse, + DeleteFeatureResponse, + DeleteFlagResponse, + GetFeatureResponse, + GetFlagResponse, + ListFeaturesParams, + ListFeaturesResponse, + ListFlagsParams, + ListFlagsResponse, + UpdateFeatureRequestBodyFeatureType, + UpdateFeatureRequestBodyLifecyclePhase, + UpdateFeatureResponse, + UpdateFlagResponse, + UpdateFlagRulesResponse, + ) + from .plangroups import CreatePlanGroupResponse, GetPlanGroupResponse, UpdatePlanGroupResponse + from .plans import ( + CountPlansParams, + CountPlansRequestPlanType, + CountPlansResponse, + CountPlansResponseParamsPlanType, + CreatePlanRequestBodyPlanType, + CreatePlanResponse, + DeletePlanResponse, + GetPlanResponse, + ListPlanIssuesParams, + ListPlanIssuesResponse, + ListPlansParams, + ListPlansRequestPlanType, + ListPlansResponse, + ListPlansResponseParamsPlanType, + UpdateCompanyPlansResponse, + UpdatePlanResponse, + UpsertBillingProductPlanResponse, + UpsertBillingProductRequestBodyChargeType, + ) + from .version import __version__ + from .webhooks import ( + CountWebhookEventsParams, + CountWebhookEventsResponse, + CountWebhooksParams, + CountWebhooksResponse, + CreateWebhookRequestBodyRequestTypesItem, + CreateWebhookResponse, + DeleteWebhookResponse, + GetWebhookEventResponse, + GetWebhookResponse, + ListWebhookEventsParams, + ListWebhookEventsResponse, + ListWebhooksParams, + ListWebhooksResponse, + UpdateWebhookRequestBodyRequestTypesItem, + UpdateWebhookRequestBodyStatus, + UpdateWebhookResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "ApiError": ".types", + "ApiKeyCreateResponseData": ".types", + "ApiKeyRequestListResponseData": ".types", + "ApiKeyRequestResponseData": ".types", + "ApiKeyResponseData": ".types", + "AsyncSchematic": ".client", + "AsyncSchematicConfig": ".client", + "BadRequestError": ".errors", + "BillingCouponResponseData": ".types", + "BillingCreditBundleResponseData": ".types", + "BillingCreditBundleView": ".types", + "BillingCreditGrantResponseData": ".types", + "BillingCreditLedgerResponseData": ".types", + "BillingCreditResponseData": ".types", + "BillingCustomerResponseData": ".types", + "BillingCustomerSubscription": ".types", + "BillingCustomerWithSubscriptionsResponseData": ".types", + "BillingMeterResponseData": ".types", + "BillingPlanCreditGrantResponseData": ".types", + "BillingPriceResponseData": ".types", + "BillingPriceView": ".types", + "BillingProductDetailResponseData": ".types", + "BillingProductForSubscriptionResponseData": ".types", + "BillingProductPlanResponseData": ".types", + "BillingProductPriceResponseData": ".types", + "BillingProductPriceTierResponseData": ".types", + "BillingProductPricing": ".types", + "BillingProductPricingUsageType": ".types", + "BillingProductResponseData": ".types", + "BillingSubscriptionDiscount": ".types", + "BillingSubscriptionDiscountView": ".types", + "BillingSubscriptionResponseData": ".types", + "BillingSubscriptionView": ".types", + "ChangeSubscriptionInternalRequestBody": ".types", + "ChangeSubscriptionRequestBody": ".types", + "CheckFlagRequestBody": ".types", + "CheckFlagResponse": ".features", + "CheckFlagResponseData": ".types", + "CheckFlagsResponse": ".features", + "CheckFlagsResponseData": ".types", + "CheckoutDataResponseData": ".types", + "CheckoutInternalResponse": ".checkout", + "CheckoutSettingsResponseData": ".types", + "CheckoutSubscription": ".types", + "CompanyCrmDealsResponseData": ".types", + "CompanyDetailResponseData": ".types", + "CompanyEventPeriodMetricsResponseData": ".types", + "CompanyLedgerResponseData": ".types", + "CompanyMembershipDetailResponseData": ".types", + "CompanyMembershipResponseData": ".types", + "CompanyOverrideNoteResponseData": ".types", + "CompanyOverrideResponseData": ".types", + "CompanyPlanDetailResponseData": ".types", + "CompanyPlanWithBillingSubView": ".types", + "CompanyResponseData": ".types", + "CompanySubscriptionResponseData": ".types", + "CompanyViewWithFeatureUsageResponseData": ".types", + "CompatiblePlans": ".types", + "CompatiblePlansResponseData": ".types", + "ComponentCapabilities": ".types", + "ComponentCheckoutSettings": ".types", + "ComponentHydrateResponseData": ".types", + "ComponentPreviewResponseData": ".types", + "ComponentResponseData": ".types", + "Condition": ".types", + "ConditionGroup": ".types", + "CountApiKeysParams": ".accounts", + "CountApiKeysResponse": ".accounts", + "CountApiRequestsParams": ".accounts", + "CountApiRequestsResponse": ".accounts", + "CountBillingCreditsGrantsParams": ".credits", + "CountBillingCreditsGrantsResponse": ".credits", + "CountBillingCreditsParams": ".credits", + "CountBillingCreditsResponse": ".credits", + "CountBillingPlanCreditGrantsParams": ".credits", + "CountBillingPlanCreditGrantsResponse": ".credits", + "CountBillingProductsParams": ".billing", + "CountBillingProductsRequestPriceUsageType": ".billing", + "CountBillingProductsResponse": ".billing", + "CountBillingProductsResponseParamsPriceUsageType": ".billing", + "CountCompaniesForAdvancedFilterParams": ".companies", + "CountCompaniesForAdvancedFilterRequestSortOrderDirection": ".companies", + "CountCompaniesForAdvancedFilterResponse": ".companies", + "CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection": ".companies", + "CountCompaniesParams": ".companies", + "CountCompaniesResponse": ".companies", + "CountCompanyOverridesParams": ".entitlements", + "CountCompanyOverridesResponse": ".entitlements", + "CountComponentsParams": ".components", + "CountComponentsResponse": ".components", + "CountCreditBundlesParams": ".credits", + "CountCreditBundlesRequestStatus": ".credits", + "CountCreditBundlesResponse": ".credits", + "CountCreditBundlesResponseParamsStatus": ".credits", + "CountCreditLedgerParams": ".credits", + "CountCreditLedgerRequestPeriod": ".credits", + "CountCreditLedgerResponse": ".credits", + "CountCreditLedgerResponseParamsPeriod": ".credits", + "CountCustomersParams": ".billing", + "CountCustomersResponse": ".billing", + "CountEntityKeyDefinitionsParams": ".companies", + "CountEntityKeyDefinitionsRequestEntityType": ".companies", + "CountEntityKeyDefinitionsResponse": ".companies", + "CountEntityKeyDefinitionsResponseParamsEntityType": ".companies", + "CountEntityTraitDefinitionsParams": ".companies", + "CountEntityTraitDefinitionsRequestEntityType": ".companies", + "CountEntityTraitDefinitionsRequestTraitType": ".companies", + "CountEntityTraitDefinitionsResponse": ".companies", + "CountEntityTraitDefinitionsResponseParamsEntityType": ".companies", + "CountEntityTraitDefinitionsResponseParamsTraitType": ".companies", + "CountFeatureCompaniesParams": ".entitlements", + "CountFeatureCompaniesResponse": ".entitlements", + "CountFeatureUsageParams": ".entitlements", + "CountFeatureUsageResponse": ".entitlements", + "CountFeatureUsersParams": ".entitlements", + "CountFeatureUsersResponse": ".entitlements", + "CountFeaturesParams": ".features", + "CountFeaturesResponse": ".features", + "CountFlagsParams": ".features", + "CountFlagsResponse": ".features", + "CountPlanEntitlementsParams": ".entitlements", + "CountPlanEntitlementsResponse": ".entitlements", + "CountPlanTraitsParams": ".companies", + "CountPlanTraitsResponse": ".companies", + "CountPlansParams": ".plans", + "CountPlansRequestPlanType": ".plans", + "CountPlansResponse": ".plans", + "CountPlansResponseParamsPlanType": ".plans", + "CountResponse": ".types", + "CountUsersParams": ".companies", + "CountUsersResponse": ".companies", + "CountWebhookEventsParams": ".webhooks", + "CountWebhookEventsResponse": ".webhooks", + "CountWebhooksParams": ".webhooks", + "CountWebhooksResponse": ".webhooks", + "CouponRequestBody": ".types", + "CreateApiKeyResponse": ".accounts", + "CreateBillingCreditRequestBodyBurnStrategy": ".credits", + "CreateBillingCreditRequestBodyDefaultRolloverPolicy": ".credits", + "CreateBillingCreditResponse": ".credits", + "CreateBillingPlanCreditGrantRequestBodyExpiryType": ".credits", + "CreateBillingPlanCreditGrantRequestBodyExpiryUnit": ".credits", + "CreateBillingPlanCreditGrantRequestBodyResetCadence": ".credits", + "CreateBillingPlanCreditGrantRequestBodyResetStart": ".credits", + "CreateBillingPlanCreditGrantRequestBodyResetType": ".credits", + "CreateBillingPlanCreditGrantResponse": ".credits", + "CreateBillingPriceRequestBodyBillingScheme": ".billing", + "CreateBillingPriceRequestBodyTiersMode": ".billing", + "CreateBillingPriceRequestBodyUsageType": ".billing", + "CreateBillingPriceTierRequestBody": ".types", + "CreateBillingSubscriptionRequestBodyTrialEndSetting": ".billing", + "CreateCompanyCreditGrantExpiryType": ".credits", + "CreateCompanyCreditGrantExpiryUnit": ".credits", + "CreateCompanyOverrideRequestBodyMetricPeriod": ".entitlements", + "CreateCompanyOverrideRequestBodyMetricPeriodMonthReset": ".entitlements", + "CreateCompanyOverrideRequestBodyValueType": ".entitlements", + "CreateCompanyOverrideResponse": ".entitlements", + "CreateCompanyResponse": ".companies", + "CreateComponentRequestBodyEntityType": ".components", + "CreateComponentResponse": ".components", + "CreateCreditBundleRequestBodyExpiryType": ".credits", + "CreateCreditBundleRequestBodyExpiryUnit": ".credits", + "CreateCreditBundleRequestBodyStatus": ".credits", + "CreateCreditBundleResponse": ".credits", + "CreateDataExportResponse": ".dataexports", + "CreateEntitlementReqCommon": ".types", + "CreateEntitlementReqCommonMetricPeriod": ".types", + "CreateEntitlementReqCommonMetricPeriodMonthReset": ".types", + "CreateEntitlementReqCommonValueType": ".types", + "CreateEntityTraitDefinitionRequestBodyEntityType": ".companies", + "CreateEntityTraitDefinitionRequestBodyTraitType": ".companies", + "CreateEnvironmentRequestBodyEnvironmentType": ".accounts", + "CreateEnvironmentResponse": ".accounts", + "CreateEventBatchResponse": ".events", + "CreateEventRequestBody": ".types", + "CreateEventRequestBodyEventType": ".types", + "CreateEventResponse": ".events", + "CreateFeatureRequestBodyFeatureType": ".features", + "CreateFeatureRequestBodyLifecyclePhase": ".features", + "CreateFeatureResponse": ".features", + "CreateFlagRequestBody": ".types", + "CreateFlagResponse": ".features", + "CreateOrUpdateConditionGroupRequestBody": ".types", + "CreateOrUpdateConditionRequestBody": ".types", + "CreateOrUpdateConditionRequestBodyConditionType": ".types", + "CreateOrUpdateConditionRequestBodyMetricPeriod": ".types", + "CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset": ".types", + "CreateOrUpdateConditionRequestBodyOperator": ".types", + "CreateOrUpdateFlagRequestBody": ".types", + "CreateOrUpdateRuleRequestBody": ".types", + "CreateOrUpdateRuleRequestBodyRuleType": ".types", + "CreatePlanEntitlementRequestBodyMetricPeriod": ".entitlements", + "CreatePlanEntitlementRequestBodyMetricPeriodMonthReset": ".entitlements", + "CreatePlanEntitlementRequestBodyPriceBehavior": ".entitlements", + "CreatePlanEntitlementRequestBodyValueType": ".entitlements", + "CreatePlanEntitlementResponse": ".entitlements", + "CreatePlanGroupResponse": ".plangroups", + "CreatePlanRequestBodyPlanType": ".plans", + "CreatePlanResponse": ".plans", + "CreatePlanTraitResponse": ".companies", + "CreatePriceTierRequestBody": ".types", + "CreateUserResponse": ".companies", + "CreateWebhookRequestBodyRequestTypesItem": ".webhooks", + "CreateWebhookResponse": ".webhooks", + "CreditBundlePurchaseResponseData": ".types", + "CreditCompanyGrantView": ".types", + "CreditGrantDetail": ".types", + "CreditGrantDetailGrantReason": ".types", + "CreditLedgerEnrichedEntryResponseData": ".types", + "CreditTriggerConfig": ".types", + "CreditUsage": ".types", + "CreditUsageResponseData": ".types", + "CrmDealLineItem": ".types", + "CrmDealResponseData": ".types", + "CrmLineItemResponseData": ".types", + "CrmProductResponseData": ".types", + "CustomPlanConfig": ".types", + "CustomPlanViewConfigResponseData": ".types", + "DataExportResponseData": ".types", + "Decimal": ".types", + "DeleteApiKeyResponse": ".accounts", + "DeleteBillingPlanCreditGrantResponse": ".credits", + "DeleteBillingProductResponse": ".billing", + "DeleteCompanyByKeysResponse": ".companies", + "DeleteCompanyMembershipResponse": ".companies", + "DeleteCompanyOverrideResponse": ".entitlements", + "DeleteCompanyResponse": ".companies", + "DeleteComponentResponse": ".components", + "DeleteCreditBundleResponse": ".credits", + "DeleteEnvironmentResponse": ".accounts", + "DeleteFeatureResponse": ".features", + "DeleteFlagResponse": ".features", + "DeletePlanEntitlementResponse": ".entitlements", + "DeletePlanResponse": ".plans", + "DeletePlanTraitResponse": ".companies", + "DeleteProductPriceResponse": ".billing", + "DeleteResponse": ".types", + "DeleteUserByKeysResponse": ".companies", + "DeleteUserResponse": ".companies", + "DeleteWebhookResponse": ".webhooks", + "EntitlementTriggerConfig": ".types", + "EntitlementsInPlan": ".types", + "EntityKeyDefinitionResponseData": ".types", + "EntityKeyDetailResponseData": ".types", + "EntityKeyResponseData": ".types", + "EntityTraitDefinitionResponseData": ".types", + "EntityTraitDetailResponseData": ".types", + "EntityTraitResponseData": ".types", + "EntityTraitValue": ".types", + "EnvironmentDetailResponseData": ".types", + "EnvironmentResponseData": ".types", + "EventBody": ".types", + "EventBodyFlagCheck": ".types", + "EventBodyIdentify": ".types", + "EventBodyIdentifyCompany": ".types", + "EventBodyTrack": ".types", + "EventDetailResponseData": ".types", + "EventResponseData": ".types", + "EventSummaryResponseData": ".types", + "FeatureCompanyResponseData": ".types", + "FeatureCompanyResponseDataAllocationType": ".types", + "FeatureCompanyResponseDataCreditGrantReason": ".types", + "FeatureCompanyUserResponseData": ".types", + "FeatureCompanyUserResponseDataAllocationType": ".types", + "FeatureDetailResponseData": ".types", + "FeatureLedgerResponseData": ".types", + "FeatureResponseData": ".types", + "FeatureUsageDataResponseData": ".types", + "FeatureUsageDetailResponseData": ".types", + "FeatureUsageResponseData": ".types", + "FeatureUsageResponseDataAllocationType": ".types", + "FeatureUsageResponseDataCreditGrantReason": ".types", + "FlagDetailResponseData": ".types", + "FlagResponseData": ".types", + "ForbiddenError": ".errors", + "GenericPreviewObject": ".types", + "GetActiveCompanySubscriptionParams": ".companies", + "GetActiveCompanySubscriptionResponse": ".companies", + "GetActiveDealsParams": ".companies", + "GetActiveDealsResponse": ".companies", + "GetApiKeyResponse": ".accounts", + "GetApiRequestResponse": ".accounts", + "GetCheckoutDataResponse": ".checkout", + "GetCompanyOverrideResponse": ".entitlements", + "GetCompanyResponse": ".companies", + "GetComponentResponse": ".components", + "GetCreditBundleResponse": ".credits", + "GetEnrichedCreditLedgerParams": ".credits", + "GetEnrichedCreditLedgerRequestPeriod": ".credits", + "GetEnrichedCreditLedgerResponse": ".credits", + "GetEnrichedCreditLedgerResponseParamsPeriod": ".credits", + "GetEntityTraitDefinitionResponse": ".companies", + "GetEntityTraitValuesParams": ".companies", + "GetEntityTraitValuesResponse": ".companies", + "GetEnvironmentResponse": ".accounts", + "GetEventResponse": ".events", + "GetEventSummariesParams": ".events", + "GetEventSummariesResponse": ".events", + "GetFeatureResponse": ".features", + "GetFeatureUsageByCompanyParams": ".entitlements", + "GetFeatureUsageByCompanyResponse": ".entitlements", + "GetFlagResponse": ".features", + "GetOrCreateCompanyMembershipResponse": ".companies", + "GetOrCreateEntityTraitDefinitionResponse": ".companies", + "GetPlanChangeResponse": ".companies", + "GetPlanEntitlementResponse": ".entitlements", + "GetPlanGroupResponse": ".plangroups", + "GetPlanResponse": ".plans", + "GetPlanTraitResponse": ".companies", + "GetSegmentIntegrationStatusResponse": ".events", + "GetSingleBillingCreditResponse": ".credits", + "GetUserResponse": ".companies", + "GetWebhookEventResponse": ".webhooks", + "GetWebhookResponse": ".webhooks", + "GrantBillingCreditsToCompanyResponse": ".credits", + "InternalServerError": ".errors", + "InvoiceRequestBody": ".types", + "InvoiceResponseData": ".types", + "IssueTemporaryAccessTokenResponse": ".accesstokens", + "IssueTemporaryAccessTokenResponseData": ".types", + "KeysRequestBody": ".types", + "ListApiKeysParams": ".accounts", + "ListApiKeysResponse": ".accounts", + "ListApiRequestsParams": ".accounts", + "ListApiRequestsResponse": ".accounts", + "ListBillingCreditsParams": ".credits", + "ListBillingCreditsResponse": ".credits", + "ListBillingPlanCreditGrantsParams": ".credits", + "ListBillingPlanCreditGrantsResponse": ".credits", + "ListBillingProductsParams": ".billing", + "ListBillingProductsRequestPriceUsageType": ".billing", + "ListBillingProductsResponse": ".billing", + "ListBillingProductsResponseParamsPriceUsageType": ".billing", + "ListCompaniesForAdvancedFilterParams": ".companies", + "ListCompaniesForAdvancedFilterRequestSortOrderDirection": ".companies", + "ListCompaniesForAdvancedFilterResponse": ".companies", + "ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection": ".companies", + "ListCompaniesParams": ".companies", + "ListCompaniesResponse": ".companies", + "ListCompanyGrantsParams": ".credits", + "ListCompanyGrantsRequestDir": ".credits", + "ListCompanyGrantsRequestOrder": ".credits", + "ListCompanyGrantsResponse": ".credits", + "ListCompanyGrantsResponseParamsDir": ".credits", + "ListCompanyGrantsResponseParamsOrder": ".credits", + "ListCompanyMembershipsParams": ".companies", + "ListCompanyMembershipsResponse": ".companies", + "ListCompanyOverridesParams": ".entitlements", + "ListCompanyOverridesResponse": ".entitlements", + "ListComponentsParams": ".components", + "ListComponentsResponse": ".components", + "ListCouponsParams": ".billing", + "ListCouponsResponse": ".billing", + "ListCreditBundlesParams": ".credits", + "ListCreditBundlesRequestStatus": ".credits", + "ListCreditBundlesResponse": ".credits", + "ListCreditBundlesResponseParamsStatus": ".credits", + "ListCrmProductsParams": ".crm", + "ListCrmProductsResponse": ".crm", + "ListCustomersWithSubscriptionsParams": ".billing", + "ListCustomersWithSubscriptionsResponse": ".billing", + "ListEntityKeyDefinitionsParams": ".companies", + "ListEntityKeyDefinitionsRequestEntityType": ".companies", + "ListEntityKeyDefinitionsResponse": ".companies", + "ListEntityKeyDefinitionsResponseParamsEntityType": ".companies", + "ListEntityTraitDefinitionsParams": ".companies", + "ListEntityTraitDefinitionsRequestEntityType": ".companies", + "ListEntityTraitDefinitionsRequestTraitType": ".companies", + "ListEntityTraitDefinitionsResponse": ".companies", + "ListEntityTraitDefinitionsResponseParamsEntityType": ".companies", + "ListEntityTraitDefinitionsResponseParamsTraitType": ".companies", + "ListEnvironmentsParams": ".accounts", + "ListEnvironmentsResponse": ".accounts", + "ListEventsParams": ".events", + "ListEventsRequestEventTypesItem": ".events", + "ListEventsResponse": ".events", + "ListEventsResponseParamsEventTypesItem": ".events", + "ListFeatureCompaniesParams": ".entitlements", + "ListFeatureCompaniesResponse": ".entitlements", + "ListFeatureUsageParams": ".entitlements", + "ListFeatureUsageResponse": ".entitlements", + "ListFeatureUsersParams": ".entitlements", + "ListFeatureUsersResponse": ".entitlements", + "ListFeaturesParams": ".features", + "ListFeaturesResponse": ".features", + "ListFlagsParams": ".features", + "ListFlagsResponse": ".features", + "ListGrantsForCreditParams": ".credits", + "ListGrantsForCreditResponse": ".credits", + "ListInvoicesParams": ".billing", + "ListInvoicesResponse": ".billing", + "ListMetersParams": ".billing", + "ListMetersResponse": ".billing", + "ListPaymentMethodsParams": ".billing", + "ListPaymentMethodsResponse": ".billing", + "ListPlanChangesParams": ".companies", + "ListPlanChangesResponse": ".companies", + "ListPlanEntitlementsParams": ".entitlements", + "ListPlanEntitlementsResponse": ".entitlements", + "ListPlanIssuesParams": ".plans", + "ListPlanIssuesResponse": ".plans", + "ListPlanTraitsParams": ".companies", + "ListPlanTraitsResponse": ".companies", + "ListPlansParams": ".plans", + "ListPlansRequestPlanType": ".plans", + "ListPlansResponse": ".plans", + "ListPlansResponseParamsPlanType": ".plans", + "ListProductPricesParams": ".billing", + "ListProductPricesRequestPriceUsageType": ".billing", + "ListProductPricesResponse": ".billing", + "ListProductPricesResponseParamsPriceUsageType": ".billing", + "ListUsersParams": ".companies", + "ListUsersResponse": ".companies", + "ListWebhookEventsParams": ".webhooks", + "ListWebhookEventsResponse": ".webhooks", + "ListWebhooksParams": ".webhooks", + "ListWebhooksResponse": ".webhooks", + "LocalCache": ".client", + "LookupCompanyParams": ".companies", + "LookupCompanyResponse": ".companies", + "LookupUserParams": ".companies", + "LookupUserResponse": ".companies", + "ManagePlanPreviewResponseResponseData": ".types", + "ManagePlanRequest": ".types", + "ManagePlanResponse": ".checkout", + "ManagePlanResponseResponseData": ".types", + "MeterRequestBody": ".types", + "NotFoundError": ".errors", + "OrderedPlansInGroup": ".types", + "PaymentMethodRequestBody": ".types", + "PaymentMethodResponseData": ".types", + "PlanChangeResponseData": ".types", + "PlanChangeResponseDataAction": ".types", + "PlanChangeResponseDataActorType": ".types", + "PlanChangeResponseDataBasePlanAction": ".types", + "PlanChangeResponseDataSubscriptionChangeAction": ".types", + "PlanCreditGrantView": ".types", + "PlanDetailResponseData": ".types", + "PlanEntitlementResponseData": ".types", + "PlanEntitlementsOrder": ".types", + "PlanGroupBundleOrder": ".types", + "PlanGroupDetailResponseData": ".types", + "PlanGroupPlanDetailResponseData": ".types", + "PlanGroupPlanEntitlementsOrder": ".types", + "PlanGroupResponseData": ".types", + "PlanIssueResponseData": ".types", + "PlanResponseData": ".types", + "PlanSelection": ".types", + "PlanSnapshotView": ".types", + "PlanTraitResponseData": ".types", + "PreviewCheckoutInternalResponse": ".checkout", + "PreviewComponentDataParams": ".components", + "PreviewComponentDataResponse": ".components", + "PreviewManagePlanResponse": ".checkout", + "PreviewObject": ".types", + "PreviewObjectResponseData": ".types", + "PreviewSubscriptionChangeResponseData": ".types", + "PreviewSubscriptionFinanceResponseData": ".types", + "PreviewSubscriptionUpcomingInvoiceLineItems": ".types", + "QuickstartResp": ".types", + "QuickstartResponse": ".accounts", + "RawEventBatchResponseData": ".types", + "RawEventResponseData": ".types", + "Rule": ".types", + "RuleConditionDetailResponseData": ".types", + "RuleConditionGroupDetailResponseData": ".types", + "RuleConditionGroupResponseData": ".types", + "RuleConditionResponseData": ".types", + "RuleDetailResponseData": ".types", + "RuleResponseData": ".types", + "RulesDetailResponseData": ".types", + "Schematic": ".client", + "SchematicConfig": ".client", + "SchematicEnvironment": ".environment", + "SearchBillingPricesParams": ".billing", + "SearchBillingPricesRequestTiersMode": ".billing", + "SearchBillingPricesRequestUsageType": ".billing", + "SearchBillingPricesResponse": ".billing", + "SearchBillingPricesResponseParamsTiersMode": ".billing", + "SearchBillingPricesResponseParamsUsageType": ".billing", + "SegmentStatusResp": ".types", + "SoftDeleteBillingCreditResponse": ".credits", + "StripeEmbedInfo": ".types", + "SubscriptionTraitUpdate": ".types", + "TemporaryAccessTokenResponseData": ".types", + "TraitDefinition": ".types", + "UnauthorizedError": ".errors", + "UpdateAddOnRequestBody": ".types", + "UpdateApiKeyResponse": ".accounts", + "UpdateBillingCreditRequestBodyBurnStrategy": ".credits", + "UpdateBillingCreditRequestBodyDefaultRolloverPolicy": ".credits", + "UpdateBillingCreditResponse": ".credits", + "UpdateCompanyOverrideRequestBodyMetricPeriod": ".entitlements", + "UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset": ".entitlements", + "UpdateCompanyOverrideRequestBodyValueType": ".entitlements", + "UpdateCompanyOverrideResponse": ".entitlements", + "UpdateCompanyPlansResponse": ".plans", + "UpdateComponentRequestBodyEntityType": ".components", + "UpdateComponentRequestBodyState": ".components", + "UpdateComponentResponse": ".components", + "UpdateCreditBundleDetailsRequestBodyExpiryType": ".credits", + "UpdateCreditBundleDetailsRequestBodyExpiryUnit": ".credits", + "UpdateCreditBundleDetailsRequestBodyStatus": ".credits", + "UpdateCreditBundleDetailsResponse": ".credits", + "UpdateCreditBundleRequestBody": ".types", + "UpdateCustomerSubscriptionTrialEndResponse": ".checkout", + "UpdateEntitlementReqCommon": ".types", + "UpdateEntitlementReqCommonMetricPeriod": ".types", + "UpdateEntitlementReqCommonMetricPeriodMonthReset": ".types", + "UpdateEntitlementReqCommonValueType": ".types", + "UpdateEntityTraitDefinitionRequestBodyTraitType": ".companies", + "UpdateEntityTraitDefinitionResponse": ".companies", + "UpdateEnvironmentRequestBodyEnvironmentType": ".accounts", + "UpdateEnvironmentResponse": ".accounts", + "UpdateFeatureRequestBodyFeatureType": ".features", + "UpdateFeatureRequestBodyLifecyclePhase": ".features", + "UpdateFeatureResponse": ".features", + "UpdateFlagResponse": ".features", + "UpdateFlagRulesResponse": ".features", + "UpdatePayInAdvanceRequestBody": ".types", + "UpdatePlanEntitlementRequestBodyMetricPeriod": ".entitlements", + "UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset": ".entitlements", + "UpdatePlanEntitlementRequestBodyPriceBehavior": ".entitlements", + "UpdatePlanEntitlementRequestBodyValueType": ".entitlements", + "UpdatePlanEntitlementResponse": ".entitlements", + "UpdatePlanGroupResponse": ".plangroups", + "UpdatePlanResponse": ".plans", + "UpdatePlanTraitResponse": ".companies", + "UpdatePlanTraitTraitRequestBody": ".types", + "UpdatePlanTraitsBulkResponse": ".companies", + "UpdateRuleRequestBody": ".types", + "UpdateWebhookRequestBodyRequestTypesItem": ".webhooks", + "UpdateWebhookRequestBodyStatus": ".webhooks", + "UpdateWebhookResponse": ".webhooks", + "UpsertBillingCouponResponse": ".billing", + "UpsertBillingCustomerResponse": ".billing", + "UpsertBillingMeterResponse": ".billing", + "UpsertBillingPriceResponse": ".billing", + "UpsertBillingProductPlanResponse": ".plans", + "UpsertBillingProductRequestBodyChargeType": ".plans", + "UpsertBillingProductResponse": ".billing", + "UpsertBillingSubscriptionResponse": ".billing", + "UpsertCompanyRequestBody": ".types", + "UpsertCompanyResponse": ".companies", + "UpsertCompanyTraitResponse": ".companies", + "UpsertCrmDealResponse": ".crm", + "UpsertCrmProductResponse": ".crm", + "UpsertDealLineItemAssociationResponse": ".crm", + "UpsertInvoiceResponse": ".billing", + "UpsertLineItemResponse": ".crm", + "UpsertPaymentMethodResponse": ".billing", + "UpsertTraitRequestBody": ".types", + "UpsertUserRequestBody": ".types", + "UpsertUserResponse": ".companies", + "UpsertUserSubRequestBody": ".types", + "UpsertUserTraitResponse": ".companies", + "UsageBasedEntitlementRequestBody": ".types", + "UsageBasedEntitlementRequestBodyPriceBehavior": ".types", + "UsageBasedEntitlementResponseData": ".types", + "UserDetailResponseData": ".types", + "UserResponseData": ".types", + "WebhookEventDetailResponseData": ".types", + "WebhookEventResponseData": ".types", + "WebhookResponseData": ".types", + "ZeroOutGrantRequestBodyReason": ".credits", + "ZeroOutGrantResponse": ".credits", + "__version__": ".version", + "accesstokens": ".accesstokens", + "accounts": ".accounts", + "billing": ".billing", + "checkout": ".checkout", + "companies": ".companies", + "components": ".components", + "credits": ".credits", + "crm": ".crm", + "dataexports": ".dataexports", + "entitlements": ".entitlements", + "events": ".events", + "features": ".features", + "plangroups": ".plangroups", + "plans": ".plans", + "webhooks": ".webhooks", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ApiError", diff --git a/src/schematic/accesstokens/__init__.py b/src/schematic/accesstokens/__init__.py index d3317d1..ce9a8e6 100644 --- a/src/schematic/accesstokens/__init__.py +++ b/src/schematic/accesstokens/__init__.py @@ -2,6 +2,33 @@ # isort: skip_file -from .types import IssueTemporaryAccessTokenResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import IssueTemporaryAccessTokenResponse +_dynamic_imports: typing.Dict[str, str] = {"IssueTemporaryAccessTokenResponse": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["IssueTemporaryAccessTokenResponse"] diff --git a/src/schematic/accesstokens/types/__init__.py b/src/schematic/accesstokens/types/__init__.py index 3f3fb48..20be490 100644 --- a/src/schematic/accesstokens/types/__init__.py +++ b/src/schematic/accesstokens/types/__init__.py @@ -2,6 +2,35 @@ # isort: skip_file -from .issue_temporary_access_token_response import IssueTemporaryAccessTokenResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .issue_temporary_access_token_response import IssueTemporaryAccessTokenResponse +_dynamic_imports: typing.Dict[str, str] = { + "IssueTemporaryAccessTokenResponse": ".issue_temporary_access_token_response" +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["IssueTemporaryAccessTokenResponse"] diff --git a/src/schematic/accounts/__init__.py b/src/schematic/accounts/__init__.py index 4a19039..53dd1ab 100644 --- a/src/schematic/accounts/__init__.py +++ b/src/schematic/accounts/__init__.py @@ -2,30 +2,80 @@ # isort: skip_file -from .types import ( - CountApiKeysParams, - CountApiKeysResponse, - CountApiRequestsParams, - CountApiRequestsResponse, - CreateApiKeyResponse, - CreateEnvironmentRequestBodyEnvironmentType, - CreateEnvironmentResponse, - DeleteApiKeyResponse, - DeleteEnvironmentResponse, - GetApiKeyResponse, - GetApiRequestResponse, - GetEnvironmentResponse, - ListApiKeysParams, - ListApiKeysResponse, - ListApiRequestsParams, - ListApiRequestsResponse, - ListEnvironmentsParams, - ListEnvironmentsResponse, - QuickstartResponse, - UpdateApiKeyResponse, - UpdateEnvironmentRequestBodyEnvironmentType, - UpdateEnvironmentResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CountApiKeysParams, + CountApiKeysResponse, + CountApiRequestsParams, + CountApiRequestsResponse, + CreateApiKeyResponse, + CreateEnvironmentRequestBodyEnvironmentType, + CreateEnvironmentResponse, + DeleteApiKeyResponse, + DeleteEnvironmentResponse, + GetApiKeyResponse, + GetApiRequestResponse, + GetEnvironmentResponse, + ListApiKeysParams, + ListApiKeysResponse, + ListApiRequestsParams, + ListApiRequestsResponse, + ListEnvironmentsParams, + ListEnvironmentsResponse, + QuickstartResponse, + UpdateApiKeyResponse, + UpdateEnvironmentRequestBodyEnvironmentType, + UpdateEnvironmentResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CountApiKeysParams": ".types", + "CountApiKeysResponse": ".types", + "CountApiRequestsParams": ".types", + "CountApiRequestsResponse": ".types", + "CreateApiKeyResponse": ".types", + "CreateEnvironmentRequestBodyEnvironmentType": ".types", + "CreateEnvironmentResponse": ".types", + "DeleteApiKeyResponse": ".types", + "DeleteEnvironmentResponse": ".types", + "GetApiKeyResponse": ".types", + "GetApiRequestResponse": ".types", + "GetEnvironmentResponse": ".types", + "ListApiKeysParams": ".types", + "ListApiKeysResponse": ".types", + "ListApiRequestsParams": ".types", + "ListApiRequestsResponse": ".types", + "ListEnvironmentsParams": ".types", + "ListEnvironmentsResponse": ".types", + "QuickstartResponse": ".types", + "UpdateApiKeyResponse": ".types", + "UpdateEnvironmentRequestBodyEnvironmentType": ".types", + "UpdateEnvironmentResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountApiKeysParams", diff --git a/src/schematic/accounts/types/__init__.py b/src/schematic/accounts/types/__init__.py index 69313b3..620b886 100644 --- a/src/schematic/accounts/types/__init__.py +++ b/src/schematic/accounts/types/__init__.py @@ -2,28 +2,78 @@ # isort: skip_file -from .count_api_keys_params import CountApiKeysParams -from .count_api_keys_response import CountApiKeysResponse -from .count_api_requests_params import CountApiRequestsParams -from .count_api_requests_response import CountApiRequestsResponse -from .create_api_key_response import CreateApiKeyResponse -from .create_environment_request_body_environment_type import CreateEnvironmentRequestBodyEnvironmentType -from .create_environment_response import CreateEnvironmentResponse -from .delete_api_key_response import DeleteApiKeyResponse -from .delete_environment_response import DeleteEnvironmentResponse -from .get_api_key_response import GetApiKeyResponse -from .get_api_request_response import GetApiRequestResponse -from .get_environment_response import GetEnvironmentResponse -from .list_api_keys_params import ListApiKeysParams -from .list_api_keys_response import ListApiKeysResponse -from .list_api_requests_params import ListApiRequestsParams -from .list_api_requests_response import ListApiRequestsResponse -from .list_environments_params import ListEnvironmentsParams -from .list_environments_response import ListEnvironmentsResponse -from .quickstart_response import QuickstartResponse -from .update_api_key_response import UpdateApiKeyResponse -from .update_environment_request_body_environment_type import UpdateEnvironmentRequestBodyEnvironmentType -from .update_environment_response import UpdateEnvironmentResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .count_api_keys_params import CountApiKeysParams + from .count_api_keys_response import CountApiKeysResponse + from .count_api_requests_params import CountApiRequestsParams + from .count_api_requests_response import CountApiRequestsResponse + from .create_api_key_response import CreateApiKeyResponse + from .create_environment_request_body_environment_type import CreateEnvironmentRequestBodyEnvironmentType + from .create_environment_response import CreateEnvironmentResponse + from .delete_api_key_response import DeleteApiKeyResponse + from .delete_environment_response import DeleteEnvironmentResponse + from .get_api_key_response import GetApiKeyResponse + from .get_api_request_response import GetApiRequestResponse + from .get_environment_response import GetEnvironmentResponse + from .list_api_keys_params import ListApiKeysParams + from .list_api_keys_response import ListApiKeysResponse + from .list_api_requests_params import ListApiRequestsParams + from .list_api_requests_response import ListApiRequestsResponse + from .list_environments_params import ListEnvironmentsParams + from .list_environments_response import ListEnvironmentsResponse + from .quickstart_response import QuickstartResponse + from .update_api_key_response import UpdateApiKeyResponse + from .update_environment_request_body_environment_type import UpdateEnvironmentRequestBodyEnvironmentType + from .update_environment_response import UpdateEnvironmentResponse +_dynamic_imports: typing.Dict[str, str] = { + "CountApiKeysParams": ".count_api_keys_params", + "CountApiKeysResponse": ".count_api_keys_response", + "CountApiRequestsParams": ".count_api_requests_params", + "CountApiRequestsResponse": ".count_api_requests_response", + "CreateApiKeyResponse": ".create_api_key_response", + "CreateEnvironmentRequestBodyEnvironmentType": ".create_environment_request_body_environment_type", + "CreateEnvironmentResponse": ".create_environment_response", + "DeleteApiKeyResponse": ".delete_api_key_response", + "DeleteEnvironmentResponse": ".delete_environment_response", + "GetApiKeyResponse": ".get_api_key_response", + "GetApiRequestResponse": ".get_api_request_response", + "GetEnvironmentResponse": ".get_environment_response", + "ListApiKeysParams": ".list_api_keys_params", + "ListApiKeysResponse": ".list_api_keys_response", + "ListApiRequestsParams": ".list_api_requests_params", + "ListApiRequestsResponse": ".list_api_requests_response", + "ListEnvironmentsParams": ".list_environments_params", + "ListEnvironmentsResponse": ".list_environments_response", + "QuickstartResponse": ".quickstart_response", + "UpdateApiKeyResponse": ".update_api_key_response", + "UpdateEnvironmentRequestBodyEnvironmentType": ".update_environment_request_body_environment_type", + "UpdateEnvironmentResponse": ".update_environment_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountApiKeysParams", diff --git a/src/schematic/base_client.py b/src/schematic/base_client.py index 38f8a34..d1d17c8 100644 --- a/src/schematic/base_client.py +++ b/src/schematic/base_client.py @@ -1,27 +1,31 @@ # This file was auto-generated by Fern from our API Definition. +from __future__ import annotations + import typing import httpx -from .accesstokens.client import AccesstokensClient, AsyncAccesstokensClient -from .accounts.client import AccountsClient, AsyncAccountsClient -from .billing.client import AsyncBillingClient, BillingClient -from .checkout.client import AsyncCheckoutClient, CheckoutClient -from .companies.client import AsyncCompaniesClient, CompaniesClient -from .components.client import AsyncComponentsClient, ComponentsClient from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper from .core.request_options import RequestOptions -from .credits.client import AsyncCreditsClient, CreditsClient -from .crm.client import AsyncCrmClient, CrmClient -from .dataexports.client import AsyncDataexportsClient, DataexportsClient -from .entitlements.client import AsyncEntitlementsClient, EntitlementsClient from .environment import SchematicEnvironment -from .events.client import AsyncEventsClient, EventsClient -from .features.client import AsyncFeaturesClient, FeaturesClient -from .plangroups.client import AsyncPlangroupsClient, PlangroupsClient -from .plans.client import AsyncPlansClient, PlansClient from .raw_base_client import AsyncRawBaseSchematic, RawBaseSchematic -from .webhooks.client import AsyncWebhooksClient, WebhooksClient + +if typing.TYPE_CHECKING: + from .accesstokens.client import AccesstokensClient, AsyncAccesstokensClient + from .accounts.client import AccountsClient, AsyncAccountsClient + from .billing.client import AsyncBillingClient, BillingClient + from .checkout.client import AsyncCheckoutClient, CheckoutClient + from .companies.client import AsyncCompaniesClient, CompaniesClient + from .components.client import AsyncComponentsClient, ComponentsClient + from .credits.client import AsyncCreditsClient, CreditsClient + from .crm.client import AsyncCrmClient, CrmClient + from .dataexports.client import AsyncDataexportsClient, DataexportsClient + from .entitlements.client import AsyncEntitlementsClient, EntitlementsClient + from .events.client import AsyncEventsClient, EventsClient + from .features.client import AsyncFeaturesClient, FeaturesClient + from .plangroups.client import AsyncPlangroupsClient, PlangroupsClient + from .plans.client import AsyncPlansClient, PlansClient + from .webhooks.client import AsyncWebhooksClient, WebhooksClient class BaseSchematic: @@ -43,6 +47,9 @@ class BaseSchematic: api_key : str + headers : typing.Optional[typing.Dict[str, str]] + Additional headers to send with every request. + timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -67,6 +74,7 @@ def __init__( base_url: typing.Optional[str] = None, environment: SchematicEnvironment = SchematicEnvironment.DEFAULT, api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.Client] = None, @@ -77,6 +85,7 @@ def __init__( self._client_wrapper = SyncClientWrapper( base_url=_get_base_url(base_url=base_url, environment=environment), api_key=api_key, + headers=headers, httpx_client=httpx_client if httpx_client is not None else httpx.Client(timeout=_defaulted_timeout, follow_redirects=follow_redirects) @@ -85,21 +94,21 @@ def __init__( timeout=_defaulted_timeout, ) self._raw_client = RawBaseSchematic(client_wrapper=self._client_wrapper) - self.accounts = AccountsClient(client_wrapper=self._client_wrapper) - self.billing = BillingClient(client_wrapper=self._client_wrapper) - self.credits = CreditsClient(client_wrapper=self._client_wrapper) - self.checkout = CheckoutClient(client_wrapper=self._client_wrapper) - self.companies = CompaniesClient(client_wrapper=self._client_wrapper) - self.entitlements = EntitlementsClient(client_wrapper=self._client_wrapper) - self.plans = PlansClient(client_wrapper=self._client_wrapper) - self.components = ComponentsClient(client_wrapper=self._client_wrapper) - self.crm = CrmClient(client_wrapper=self._client_wrapper) - self.dataexports = DataexportsClient(client_wrapper=self._client_wrapper) - self.events = EventsClient(client_wrapper=self._client_wrapper) - self.features = FeaturesClient(client_wrapper=self._client_wrapper) - self.plangroups = PlangroupsClient(client_wrapper=self._client_wrapper) - self.accesstokens = AccesstokensClient(client_wrapper=self._client_wrapper) - self.webhooks = WebhooksClient(client_wrapper=self._client_wrapper) + self._accounts: typing.Optional[AccountsClient] = None + self._billing: typing.Optional[BillingClient] = None + self._credits: typing.Optional[CreditsClient] = None + self._checkout: typing.Optional[CheckoutClient] = None + self._companies: typing.Optional[CompaniesClient] = None + self._entitlements: typing.Optional[EntitlementsClient] = None + self._plans: typing.Optional[PlansClient] = None + self._components: typing.Optional[ComponentsClient] = None + self._crm: typing.Optional[CrmClient] = None + self._dataexports: typing.Optional[DataexportsClient] = None + self._events: typing.Optional[EventsClient] = None + self._features: typing.Optional[FeaturesClient] = None + self._plangroups: typing.Optional[PlangroupsClient] = None + self._accesstokens: typing.Optional[AccesstokensClient] = None + self._webhooks: typing.Optional[WebhooksClient] = None @property def with_raw_response(self) -> RawBaseSchematic: @@ -174,6 +183,126 @@ def delete_plan_audiences_plan_audience_id( ) return _response.data + @property + def accounts(self): + if self._accounts is None: + from .accounts.client import AccountsClient # noqa: E402 + + self._accounts = AccountsClient(client_wrapper=self._client_wrapper) + return self._accounts + + @property + def billing(self): + if self._billing is None: + from .billing.client import BillingClient # noqa: E402 + + self._billing = BillingClient(client_wrapper=self._client_wrapper) + return self._billing + + @property + def credits(self): + if self._credits is None: + from .credits.client import CreditsClient # noqa: E402 + + self._credits = CreditsClient(client_wrapper=self._client_wrapper) + return self._credits + + @property + def checkout(self): + if self._checkout is None: + from .checkout.client import CheckoutClient # noqa: E402 + + self._checkout = CheckoutClient(client_wrapper=self._client_wrapper) + return self._checkout + + @property + def companies(self): + if self._companies is None: + from .companies.client import CompaniesClient # noqa: E402 + + self._companies = CompaniesClient(client_wrapper=self._client_wrapper) + return self._companies + + @property + def entitlements(self): + if self._entitlements is None: + from .entitlements.client import EntitlementsClient # noqa: E402 + + self._entitlements = EntitlementsClient(client_wrapper=self._client_wrapper) + return self._entitlements + + @property + def plans(self): + if self._plans is None: + from .plans.client import PlansClient # noqa: E402 + + self._plans = PlansClient(client_wrapper=self._client_wrapper) + return self._plans + + @property + def components(self): + if self._components is None: + from .components.client import ComponentsClient # noqa: E402 + + self._components = ComponentsClient(client_wrapper=self._client_wrapper) + return self._components + + @property + def crm(self): + if self._crm is None: + from .crm.client import CrmClient # noqa: E402 + + self._crm = CrmClient(client_wrapper=self._client_wrapper) + return self._crm + + @property + def dataexports(self): + if self._dataexports is None: + from .dataexports.client import DataexportsClient # noqa: E402 + + self._dataexports = DataexportsClient(client_wrapper=self._client_wrapper) + return self._dataexports + + @property + def events(self): + if self._events is None: + from .events.client import EventsClient # noqa: E402 + + self._events = EventsClient(client_wrapper=self._client_wrapper) + return self._events + + @property + def features(self): + if self._features is None: + from .features.client import FeaturesClient # noqa: E402 + + self._features = FeaturesClient(client_wrapper=self._client_wrapper) + return self._features + + @property + def plangroups(self): + if self._plangroups is None: + from .plangroups.client import PlangroupsClient # noqa: E402 + + self._plangroups = PlangroupsClient(client_wrapper=self._client_wrapper) + return self._plangroups + + @property + def accesstokens(self): + if self._accesstokens is None: + from .accesstokens.client import AccesstokensClient # noqa: E402 + + self._accesstokens = AccesstokensClient(client_wrapper=self._client_wrapper) + return self._accesstokens + + @property + def webhooks(self): + if self._webhooks is None: + from .webhooks.client import WebhooksClient # noqa: E402 + + self._webhooks = WebhooksClient(client_wrapper=self._client_wrapper) + return self._webhooks + class AsyncBaseSchematic: """ @@ -194,6 +323,9 @@ class AsyncBaseSchematic: api_key : str + headers : typing.Optional[typing.Dict[str, str]] + Additional headers to send with every request. + timeout : typing.Optional[float] The timeout to be used, in seconds, for requests. By default the timeout is 60 seconds, unless a custom httpx client is used, in which case this default is not enforced. @@ -218,6 +350,7 @@ def __init__( base_url: typing.Optional[str] = None, environment: SchematicEnvironment = SchematicEnvironment.DEFAULT, api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, timeout: typing.Optional[float] = None, follow_redirects: typing.Optional[bool] = True, httpx_client: typing.Optional[httpx.AsyncClient] = None, @@ -228,6 +361,7 @@ def __init__( self._client_wrapper = AsyncClientWrapper( base_url=_get_base_url(base_url=base_url, environment=environment), api_key=api_key, + headers=headers, httpx_client=httpx_client if httpx_client is not None else httpx.AsyncClient(timeout=_defaulted_timeout, follow_redirects=follow_redirects) @@ -236,21 +370,21 @@ def __init__( timeout=_defaulted_timeout, ) self._raw_client = AsyncRawBaseSchematic(client_wrapper=self._client_wrapper) - self.accounts = AsyncAccountsClient(client_wrapper=self._client_wrapper) - self.billing = AsyncBillingClient(client_wrapper=self._client_wrapper) - self.credits = AsyncCreditsClient(client_wrapper=self._client_wrapper) - self.checkout = AsyncCheckoutClient(client_wrapper=self._client_wrapper) - self.companies = AsyncCompaniesClient(client_wrapper=self._client_wrapper) - self.entitlements = AsyncEntitlementsClient(client_wrapper=self._client_wrapper) - self.plans = AsyncPlansClient(client_wrapper=self._client_wrapper) - self.components = AsyncComponentsClient(client_wrapper=self._client_wrapper) - self.crm = AsyncCrmClient(client_wrapper=self._client_wrapper) - self.dataexports = AsyncDataexportsClient(client_wrapper=self._client_wrapper) - self.events = AsyncEventsClient(client_wrapper=self._client_wrapper) - self.features = AsyncFeaturesClient(client_wrapper=self._client_wrapper) - self.plangroups = AsyncPlangroupsClient(client_wrapper=self._client_wrapper) - self.accesstokens = AsyncAccesstokensClient(client_wrapper=self._client_wrapper) - self.webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) + self._accounts: typing.Optional[AsyncAccountsClient] = None + self._billing: typing.Optional[AsyncBillingClient] = None + self._credits: typing.Optional[AsyncCreditsClient] = None + self._checkout: typing.Optional[AsyncCheckoutClient] = None + self._companies: typing.Optional[AsyncCompaniesClient] = None + self._entitlements: typing.Optional[AsyncEntitlementsClient] = None + self._plans: typing.Optional[AsyncPlansClient] = None + self._components: typing.Optional[AsyncComponentsClient] = None + self._crm: typing.Optional[AsyncCrmClient] = None + self._dataexports: typing.Optional[AsyncDataexportsClient] = None + self._events: typing.Optional[AsyncEventsClient] = None + self._features: typing.Optional[AsyncFeaturesClient] = None + self._plangroups: typing.Optional[AsyncPlangroupsClient] = None + self._accesstokens: typing.Optional[AsyncAccesstokensClient] = None + self._webhooks: typing.Optional[AsyncWebhooksClient] = None @property def with_raw_response(self) -> AsyncRawBaseSchematic: @@ -341,6 +475,126 @@ async def main() -> None: ) return _response.data + @property + def accounts(self): + if self._accounts is None: + from .accounts.client import AsyncAccountsClient # noqa: E402 + + self._accounts = AsyncAccountsClient(client_wrapper=self._client_wrapper) + return self._accounts + + @property + def billing(self): + if self._billing is None: + from .billing.client import AsyncBillingClient # noqa: E402 + + self._billing = AsyncBillingClient(client_wrapper=self._client_wrapper) + return self._billing + + @property + def credits(self): + if self._credits is None: + from .credits.client import AsyncCreditsClient # noqa: E402 + + self._credits = AsyncCreditsClient(client_wrapper=self._client_wrapper) + return self._credits + + @property + def checkout(self): + if self._checkout is None: + from .checkout.client import AsyncCheckoutClient # noqa: E402 + + self._checkout = AsyncCheckoutClient(client_wrapper=self._client_wrapper) + return self._checkout + + @property + def companies(self): + if self._companies is None: + from .companies.client import AsyncCompaniesClient # noqa: E402 + + self._companies = AsyncCompaniesClient(client_wrapper=self._client_wrapper) + return self._companies + + @property + def entitlements(self): + if self._entitlements is None: + from .entitlements.client import AsyncEntitlementsClient # noqa: E402 + + self._entitlements = AsyncEntitlementsClient(client_wrapper=self._client_wrapper) + return self._entitlements + + @property + def plans(self): + if self._plans is None: + from .plans.client import AsyncPlansClient # noqa: E402 + + self._plans = AsyncPlansClient(client_wrapper=self._client_wrapper) + return self._plans + + @property + def components(self): + if self._components is None: + from .components.client import AsyncComponentsClient # noqa: E402 + + self._components = AsyncComponentsClient(client_wrapper=self._client_wrapper) + return self._components + + @property + def crm(self): + if self._crm is None: + from .crm.client import AsyncCrmClient # noqa: E402 + + self._crm = AsyncCrmClient(client_wrapper=self._client_wrapper) + return self._crm + + @property + def dataexports(self): + if self._dataexports is None: + from .dataexports.client import AsyncDataexportsClient # noqa: E402 + + self._dataexports = AsyncDataexportsClient(client_wrapper=self._client_wrapper) + return self._dataexports + + @property + def events(self): + if self._events is None: + from .events.client import AsyncEventsClient # noqa: E402 + + self._events = AsyncEventsClient(client_wrapper=self._client_wrapper) + return self._events + + @property + def features(self): + if self._features is None: + from .features.client import AsyncFeaturesClient # noqa: E402 + + self._features = AsyncFeaturesClient(client_wrapper=self._client_wrapper) + return self._features + + @property + def plangroups(self): + if self._plangroups is None: + from .plangroups.client import AsyncPlangroupsClient # noqa: E402 + + self._plangroups = AsyncPlangroupsClient(client_wrapper=self._client_wrapper) + return self._plangroups + + @property + def accesstokens(self): + if self._accesstokens is None: + from .accesstokens.client import AsyncAccesstokensClient # noqa: E402 + + self._accesstokens = AsyncAccesstokensClient(client_wrapper=self._client_wrapper) + return self._accesstokens + + @property + def webhooks(self): + if self._webhooks is None: + from .webhooks.client import AsyncWebhooksClient # noqa: E402 + + self._webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper) + return self._webhooks + def _get_base_url(*, base_url: typing.Optional[str] = None, environment: SchematicEnvironment) -> str: if base_url is not None: diff --git a/src/schematic/billing/__init__.py b/src/schematic/billing/__init__.py index 2686586..6a0f869 100644 --- a/src/schematic/billing/__init__.py +++ b/src/schematic/billing/__init__.py @@ -2,52 +2,124 @@ # isort: skip_file -from .types import ( - CountBillingProductsParams, - CountBillingProductsRequestPriceUsageType, - CountBillingProductsResponse, - CountBillingProductsResponseParamsPriceUsageType, - CountCustomersParams, - CountCustomersResponse, - CreateBillingPriceRequestBodyBillingScheme, - CreateBillingPriceRequestBodyTiersMode, - CreateBillingPriceRequestBodyUsageType, - CreateBillingSubscriptionRequestBodyTrialEndSetting, - DeleteBillingProductResponse, - DeleteProductPriceResponse, - ListBillingProductsParams, - ListBillingProductsRequestPriceUsageType, - ListBillingProductsResponse, - ListBillingProductsResponseParamsPriceUsageType, - ListCouponsParams, - ListCouponsResponse, - ListCustomersWithSubscriptionsParams, - ListCustomersWithSubscriptionsResponse, - ListInvoicesParams, - ListInvoicesResponse, - ListMetersParams, - ListMetersResponse, - ListPaymentMethodsParams, - ListPaymentMethodsResponse, - ListProductPricesParams, - ListProductPricesRequestPriceUsageType, - ListProductPricesResponse, - ListProductPricesResponseParamsPriceUsageType, - SearchBillingPricesParams, - SearchBillingPricesRequestTiersMode, - SearchBillingPricesRequestUsageType, - SearchBillingPricesResponse, - SearchBillingPricesResponseParamsTiersMode, - SearchBillingPricesResponseParamsUsageType, - UpsertBillingCouponResponse, - UpsertBillingCustomerResponse, - UpsertBillingMeterResponse, - UpsertBillingPriceResponse, - UpsertBillingProductResponse, - UpsertBillingSubscriptionResponse, - UpsertInvoiceResponse, - UpsertPaymentMethodResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CountBillingProductsParams, + CountBillingProductsRequestPriceUsageType, + CountBillingProductsResponse, + CountBillingProductsResponseParamsPriceUsageType, + CountCustomersParams, + CountCustomersResponse, + CreateBillingPriceRequestBodyBillingScheme, + CreateBillingPriceRequestBodyTiersMode, + CreateBillingPriceRequestBodyUsageType, + CreateBillingSubscriptionRequestBodyTrialEndSetting, + DeleteBillingProductResponse, + DeleteProductPriceResponse, + ListBillingProductsParams, + ListBillingProductsRequestPriceUsageType, + ListBillingProductsResponse, + ListBillingProductsResponseParamsPriceUsageType, + ListCouponsParams, + ListCouponsResponse, + ListCustomersWithSubscriptionsParams, + ListCustomersWithSubscriptionsResponse, + ListInvoicesParams, + ListInvoicesResponse, + ListMetersParams, + ListMetersResponse, + ListPaymentMethodsParams, + ListPaymentMethodsResponse, + ListProductPricesParams, + ListProductPricesRequestPriceUsageType, + ListProductPricesResponse, + ListProductPricesResponseParamsPriceUsageType, + SearchBillingPricesParams, + SearchBillingPricesRequestTiersMode, + SearchBillingPricesRequestUsageType, + SearchBillingPricesResponse, + SearchBillingPricesResponseParamsTiersMode, + SearchBillingPricesResponseParamsUsageType, + UpsertBillingCouponResponse, + UpsertBillingCustomerResponse, + UpsertBillingMeterResponse, + UpsertBillingPriceResponse, + UpsertBillingProductResponse, + UpsertBillingSubscriptionResponse, + UpsertInvoiceResponse, + UpsertPaymentMethodResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CountBillingProductsParams": ".types", + "CountBillingProductsRequestPriceUsageType": ".types", + "CountBillingProductsResponse": ".types", + "CountBillingProductsResponseParamsPriceUsageType": ".types", + "CountCustomersParams": ".types", + "CountCustomersResponse": ".types", + "CreateBillingPriceRequestBodyBillingScheme": ".types", + "CreateBillingPriceRequestBodyTiersMode": ".types", + "CreateBillingPriceRequestBodyUsageType": ".types", + "CreateBillingSubscriptionRequestBodyTrialEndSetting": ".types", + "DeleteBillingProductResponse": ".types", + "DeleteProductPriceResponse": ".types", + "ListBillingProductsParams": ".types", + "ListBillingProductsRequestPriceUsageType": ".types", + "ListBillingProductsResponse": ".types", + "ListBillingProductsResponseParamsPriceUsageType": ".types", + "ListCouponsParams": ".types", + "ListCouponsResponse": ".types", + "ListCustomersWithSubscriptionsParams": ".types", + "ListCustomersWithSubscriptionsResponse": ".types", + "ListInvoicesParams": ".types", + "ListInvoicesResponse": ".types", + "ListMetersParams": ".types", + "ListMetersResponse": ".types", + "ListPaymentMethodsParams": ".types", + "ListPaymentMethodsResponse": ".types", + "ListProductPricesParams": ".types", + "ListProductPricesRequestPriceUsageType": ".types", + "ListProductPricesResponse": ".types", + "ListProductPricesResponseParamsPriceUsageType": ".types", + "SearchBillingPricesParams": ".types", + "SearchBillingPricesRequestTiersMode": ".types", + "SearchBillingPricesRequestUsageType": ".types", + "SearchBillingPricesResponse": ".types", + "SearchBillingPricesResponseParamsTiersMode": ".types", + "SearchBillingPricesResponseParamsUsageType": ".types", + "UpsertBillingCouponResponse": ".types", + "UpsertBillingCustomerResponse": ".types", + "UpsertBillingMeterResponse": ".types", + "UpsertBillingPriceResponse": ".types", + "UpsertBillingProductResponse": ".types", + "UpsertBillingSubscriptionResponse": ".types", + "UpsertInvoiceResponse": ".types", + "UpsertPaymentMethodResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountBillingProductsParams", diff --git a/src/schematic/billing/types/__init__.py b/src/schematic/billing/types/__init__.py index cb33138..4e9a120 100644 --- a/src/schematic/billing/types/__init__.py +++ b/src/schematic/billing/types/__init__.py @@ -2,52 +2,126 @@ # isort: skip_file -from .count_billing_products_params import CountBillingProductsParams -from .count_billing_products_request_price_usage_type import CountBillingProductsRequestPriceUsageType -from .count_billing_products_response import CountBillingProductsResponse -from .count_billing_products_response_params_price_usage_type import CountBillingProductsResponseParamsPriceUsageType -from .count_customers_params import CountCustomersParams -from .count_customers_response import CountCustomersResponse -from .create_billing_price_request_body_billing_scheme import CreateBillingPriceRequestBodyBillingScheme -from .create_billing_price_request_body_tiers_mode import CreateBillingPriceRequestBodyTiersMode -from .create_billing_price_request_body_usage_type import CreateBillingPriceRequestBodyUsageType -from .create_billing_subscription_request_body_trial_end_setting import ( - CreateBillingSubscriptionRequestBodyTrialEndSetting, -) -from .delete_billing_product_response import DeleteBillingProductResponse -from .delete_product_price_response import DeleteProductPriceResponse -from .list_billing_products_params import ListBillingProductsParams -from .list_billing_products_request_price_usage_type import ListBillingProductsRequestPriceUsageType -from .list_billing_products_response import ListBillingProductsResponse -from .list_billing_products_response_params_price_usage_type import ListBillingProductsResponseParamsPriceUsageType -from .list_coupons_params import ListCouponsParams -from .list_coupons_response import ListCouponsResponse -from .list_customers_with_subscriptions_params import ListCustomersWithSubscriptionsParams -from .list_customers_with_subscriptions_response import ListCustomersWithSubscriptionsResponse -from .list_invoices_params import ListInvoicesParams -from .list_invoices_response import ListInvoicesResponse -from .list_meters_params import ListMetersParams -from .list_meters_response import ListMetersResponse -from .list_payment_methods_params import ListPaymentMethodsParams -from .list_payment_methods_response import ListPaymentMethodsResponse -from .list_product_prices_params import ListProductPricesParams -from .list_product_prices_request_price_usage_type import ListProductPricesRequestPriceUsageType -from .list_product_prices_response import ListProductPricesResponse -from .list_product_prices_response_params_price_usage_type import ListProductPricesResponseParamsPriceUsageType -from .search_billing_prices_params import SearchBillingPricesParams -from .search_billing_prices_request_tiers_mode import SearchBillingPricesRequestTiersMode -from .search_billing_prices_request_usage_type import SearchBillingPricesRequestUsageType -from .search_billing_prices_response import SearchBillingPricesResponse -from .search_billing_prices_response_params_tiers_mode import SearchBillingPricesResponseParamsTiersMode -from .search_billing_prices_response_params_usage_type import SearchBillingPricesResponseParamsUsageType -from .upsert_billing_coupon_response import UpsertBillingCouponResponse -from .upsert_billing_customer_response import UpsertBillingCustomerResponse -from .upsert_billing_meter_response import UpsertBillingMeterResponse -from .upsert_billing_price_response import UpsertBillingPriceResponse -from .upsert_billing_product_response import UpsertBillingProductResponse -from .upsert_billing_subscription_response import UpsertBillingSubscriptionResponse -from .upsert_invoice_response import UpsertInvoiceResponse -from .upsert_payment_method_response import UpsertPaymentMethodResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .count_billing_products_params import CountBillingProductsParams + from .count_billing_products_request_price_usage_type import CountBillingProductsRequestPriceUsageType + from .count_billing_products_response import CountBillingProductsResponse + from .count_billing_products_response_params_price_usage_type import ( + CountBillingProductsResponseParamsPriceUsageType, + ) + from .count_customers_params import CountCustomersParams + from .count_customers_response import CountCustomersResponse + from .create_billing_price_request_body_billing_scheme import CreateBillingPriceRequestBodyBillingScheme + from .create_billing_price_request_body_tiers_mode import CreateBillingPriceRequestBodyTiersMode + from .create_billing_price_request_body_usage_type import CreateBillingPriceRequestBodyUsageType + from .create_billing_subscription_request_body_trial_end_setting import ( + CreateBillingSubscriptionRequestBodyTrialEndSetting, + ) + from .delete_billing_product_response import DeleteBillingProductResponse + from .delete_product_price_response import DeleteProductPriceResponse + from .list_billing_products_params import ListBillingProductsParams + from .list_billing_products_request_price_usage_type import ListBillingProductsRequestPriceUsageType + from .list_billing_products_response import ListBillingProductsResponse + from .list_billing_products_response_params_price_usage_type import ListBillingProductsResponseParamsPriceUsageType + from .list_coupons_params import ListCouponsParams + from .list_coupons_response import ListCouponsResponse + from .list_customers_with_subscriptions_params import ListCustomersWithSubscriptionsParams + from .list_customers_with_subscriptions_response import ListCustomersWithSubscriptionsResponse + from .list_invoices_params import ListInvoicesParams + from .list_invoices_response import ListInvoicesResponse + from .list_meters_params import ListMetersParams + from .list_meters_response import ListMetersResponse + from .list_payment_methods_params import ListPaymentMethodsParams + from .list_payment_methods_response import ListPaymentMethodsResponse + from .list_product_prices_params import ListProductPricesParams + from .list_product_prices_request_price_usage_type import ListProductPricesRequestPriceUsageType + from .list_product_prices_response import ListProductPricesResponse + from .list_product_prices_response_params_price_usage_type import ListProductPricesResponseParamsPriceUsageType + from .search_billing_prices_params import SearchBillingPricesParams + from .search_billing_prices_request_tiers_mode import SearchBillingPricesRequestTiersMode + from .search_billing_prices_request_usage_type import SearchBillingPricesRequestUsageType + from .search_billing_prices_response import SearchBillingPricesResponse + from .search_billing_prices_response_params_tiers_mode import SearchBillingPricesResponseParamsTiersMode + from .search_billing_prices_response_params_usage_type import SearchBillingPricesResponseParamsUsageType + from .upsert_billing_coupon_response import UpsertBillingCouponResponse + from .upsert_billing_customer_response import UpsertBillingCustomerResponse + from .upsert_billing_meter_response import UpsertBillingMeterResponse + from .upsert_billing_price_response import UpsertBillingPriceResponse + from .upsert_billing_product_response import UpsertBillingProductResponse + from .upsert_billing_subscription_response import UpsertBillingSubscriptionResponse + from .upsert_invoice_response import UpsertInvoiceResponse + from .upsert_payment_method_response import UpsertPaymentMethodResponse +_dynamic_imports: typing.Dict[str, str] = { + "CountBillingProductsParams": ".count_billing_products_params", + "CountBillingProductsRequestPriceUsageType": ".count_billing_products_request_price_usage_type", + "CountBillingProductsResponse": ".count_billing_products_response", + "CountBillingProductsResponseParamsPriceUsageType": ".count_billing_products_response_params_price_usage_type", + "CountCustomersParams": ".count_customers_params", + "CountCustomersResponse": ".count_customers_response", + "CreateBillingPriceRequestBodyBillingScheme": ".create_billing_price_request_body_billing_scheme", + "CreateBillingPriceRequestBodyTiersMode": ".create_billing_price_request_body_tiers_mode", + "CreateBillingPriceRequestBodyUsageType": ".create_billing_price_request_body_usage_type", + "CreateBillingSubscriptionRequestBodyTrialEndSetting": ".create_billing_subscription_request_body_trial_end_setting", + "DeleteBillingProductResponse": ".delete_billing_product_response", + "DeleteProductPriceResponse": ".delete_product_price_response", + "ListBillingProductsParams": ".list_billing_products_params", + "ListBillingProductsRequestPriceUsageType": ".list_billing_products_request_price_usage_type", + "ListBillingProductsResponse": ".list_billing_products_response", + "ListBillingProductsResponseParamsPriceUsageType": ".list_billing_products_response_params_price_usage_type", + "ListCouponsParams": ".list_coupons_params", + "ListCouponsResponse": ".list_coupons_response", + "ListCustomersWithSubscriptionsParams": ".list_customers_with_subscriptions_params", + "ListCustomersWithSubscriptionsResponse": ".list_customers_with_subscriptions_response", + "ListInvoicesParams": ".list_invoices_params", + "ListInvoicesResponse": ".list_invoices_response", + "ListMetersParams": ".list_meters_params", + "ListMetersResponse": ".list_meters_response", + "ListPaymentMethodsParams": ".list_payment_methods_params", + "ListPaymentMethodsResponse": ".list_payment_methods_response", + "ListProductPricesParams": ".list_product_prices_params", + "ListProductPricesRequestPriceUsageType": ".list_product_prices_request_price_usage_type", + "ListProductPricesResponse": ".list_product_prices_response", + "ListProductPricesResponseParamsPriceUsageType": ".list_product_prices_response_params_price_usage_type", + "SearchBillingPricesParams": ".search_billing_prices_params", + "SearchBillingPricesRequestTiersMode": ".search_billing_prices_request_tiers_mode", + "SearchBillingPricesRequestUsageType": ".search_billing_prices_request_usage_type", + "SearchBillingPricesResponse": ".search_billing_prices_response", + "SearchBillingPricesResponseParamsTiersMode": ".search_billing_prices_response_params_tiers_mode", + "SearchBillingPricesResponseParamsUsageType": ".search_billing_prices_response_params_usage_type", + "UpsertBillingCouponResponse": ".upsert_billing_coupon_response", + "UpsertBillingCustomerResponse": ".upsert_billing_customer_response", + "UpsertBillingMeterResponse": ".upsert_billing_meter_response", + "UpsertBillingPriceResponse": ".upsert_billing_price_response", + "UpsertBillingProductResponse": ".upsert_billing_product_response", + "UpsertBillingSubscriptionResponse": ".upsert_billing_subscription_response", + "UpsertInvoiceResponse": ".upsert_invoice_response", + "UpsertPaymentMethodResponse": ".upsert_payment_method_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountBillingProductsParams", diff --git a/src/schematic/checkout/__init__.py b/src/schematic/checkout/__init__.py index ea9f3bb..8d5607a 100644 --- a/src/schematic/checkout/__init__.py +++ b/src/schematic/checkout/__init__.py @@ -2,14 +2,48 @@ # isort: skip_file -from .types import ( - CheckoutInternalResponse, - GetCheckoutDataResponse, - ManagePlanResponse, - PreviewCheckoutInternalResponse, - PreviewManagePlanResponse, - UpdateCustomerSubscriptionTrialEndResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CheckoutInternalResponse, + GetCheckoutDataResponse, + ManagePlanResponse, + PreviewCheckoutInternalResponse, + PreviewManagePlanResponse, + UpdateCustomerSubscriptionTrialEndResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CheckoutInternalResponse": ".types", + "GetCheckoutDataResponse": ".types", + "ManagePlanResponse": ".types", + "PreviewCheckoutInternalResponse": ".types", + "PreviewManagePlanResponse": ".types", + "UpdateCustomerSubscriptionTrialEndResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CheckoutInternalResponse", diff --git a/src/schematic/checkout/types/__init__.py b/src/schematic/checkout/types/__init__.py index 3d2f135..68a6253 100644 --- a/src/schematic/checkout/types/__init__.py +++ b/src/schematic/checkout/types/__init__.py @@ -2,12 +2,46 @@ # isort: skip_file -from .checkout_internal_response import CheckoutInternalResponse -from .get_checkout_data_response import GetCheckoutDataResponse -from .manage_plan_response import ManagePlanResponse -from .preview_checkout_internal_response import PreviewCheckoutInternalResponse -from .preview_manage_plan_response import PreviewManagePlanResponse -from .update_customer_subscription_trial_end_response import UpdateCustomerSubscriptionTrialEndResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .checkout_internal_response import CheckoutInternalResponse + from .get_checkout_data_response import GetCheckoutDataResponse + from .manage_plan_response import ManagePlanResponse + from .preview_checkout_internal_response import PreviewCheckoutInternalResponse + from .preview_manage_plan_response import PreviewManagePlanResponse + from .update_customer_subscription_trial_end_response import UpdateCustomerSubscriptionTrialEndResponse +_dynamic_imports: typing.Dict[str, str] = { + "CheckoutInternalResponse": ".checkout_internal_response", + "GetCheckoutDataResponse": ".get_checkout_data_response", + "ManagePlanResponse": ".manage_plan_response", + "PreviewCheckoutInternalResponse": ".preview_checkout_internal_response", + "PreviewManagePlanResponse": ".preview_manage_plan_response", + "UpdateCustomerSubscriptionTrialEndResponse": ".update_customer_subscription_trial_end_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CheckoutInternalResponse", diff --git a/src/schematic/companies/__init__.py b/src/schematic/companies/__init__.py index a8eabcf..60687ad 100644 --- a/src/schematic/companies/__init__.py +++ b/src/schematic/companies/__init__.py @@ -2,88 +2,196 @@ # isort: skip_file -from .types import ( - CountCompaniesForAdvancedFilterParams, - CountCompaniesForAdvancedFilterRequestSortOrderDirection, - CountCompaniesForAdvancedFilterResponse, - CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection, - CountCompaniesParams, - CountCompaniesResponse, - CountEntityKeyDefinitionsParams, - CountEntityKeyDefinitionsRequestEntityType, - CountEntityKeyDefinitionsResponse, - CountEntityKeyDefinitionsResponseParamsEntityType, - CountEntityTraitDefinitionsParams, - CountEntityTraitDefinitionsRequestEntityType, - CountEntityTraitDefinitionsRequestTraitType, - CountEntityTraitDefinitionsResponse, - CountEntityTraitDefinitionsResponseParamsEntityType, - CountEntityTraitDefinitionsResponseParamsTraitType, - CountPlanTraitsParams, - CountPlanTraitsResponse, - CountUsersParams, - CountUsersResponse, - CreateCompanyResponse, - CreateEntityTraitDefinitionRequestBodyEntityType, - CreateEntityTraitDefinitionRequestBodyTraitType, - CreatePlanTraitResponse, - CreateUserResponse, - DeleteCompanyByKeysResponse, - DeleteCompanyMembershipResponse, - DeleteCompanyResponse, - DeletePlanTraitResponse, - DeleteUserByKeysResponse, - DeleteUserResponse, - GetActiveCompanySubscriptionParams, - GetActiveCompanySubscriptionResponse, - GetActiveDealsParams, - GetActiveDealsResponse, - GetCompanyResponse, - GetEntityTraitDefinitionResponse, - GetEntityTraitValuesParams, - GetEntityTraitValuesResponse, - GetOrCreateCompanyMembershipResponse, - GetOrCreateEntityTraitDefinitionResponse, - GetPlanChangeResponse, - GetPlanTraitResponse, - GetUserResponse, - ListCompaniesForAdvancedFilterParams, - ListCompaniesForAdvancedFilterRequestSortOrderDirection, - ListCompaniesForAdvancedFilterResponse, - ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection, - ListCompaniesParams, - ListCompaniesResponse, - ListCompanyMembershipsParams, - ListCompanyMembershipsResponse, - ListEntityKeyDefinitionsParams, - ListEntityKeyDefinitionsRequestEntityType, - ListEntityKeyDefinitionsResponse, - ListEntityKeyDefinitionsResponseParamsEntityType, - ListEntityTraitDefinitionsParams, - ListEntityTraitDefinitionsRequestEntityType, - ListEntityTraitDefinitionsRequestTraitType, - ListEntityTraitDefinitionsResponse, - ListEntityTraitDefinitionsResponseParamsEntityType, - ListEntityTraitDefinitionsResponseParamsTraitType, - ListPlanChangesParams, - ListPlanChangesResponse, - ListPlanTraitsParams, - ListPlanTraitsResponse, - ListUsersParams, - ListUsersResponse, - LookupCompanyParams, - LookupCompanyResponse, - LookupUserParams, - LookupUserResponse, - UpdateEntityTraitDefinitionRequestBodyTraitType, - UpdateEntityTraitDefinitionResponse, - UpdatePlanTraitResponse, - UpdatePlanTraitsBulkResponse, - UpsertCompanyResponse, - UpsertCompanyTraitResponse, - UpsertUserResponse, - UpsertUserTraitResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CountCompaniesForAdvancedFilterParams, + CountCompaniesForAdvancedFilterRequestSortOrderDirection, + CountCompaniesForAdvancedFilterResponse, + CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection, + CountCompaniesParams, + CountCompaniesResponse, + CountEntityKeyDefinitionsParams, + CountEntityKeyDefinitionsRequestEntityType, + CountEntityKeyDefinitionsResponse, + CountEntityKeyDefinitionsResponseParamsEntityType, + CountEntityTraitDefinitionsParams, + CountEntityTraitDefinitionsRequestEntityType, + CountEntityTraitDefinitionsRequestTraitType, + CountEntityTraitDefinitionsResponse, + CountEntityTraitDefinitionsResponseParamsEntityType, + CountEntityTraitDefinitionsResponseParamsTraitType, + CountPlanTraitsParams, + CountPlanTraitsResponse, + CountUsersParams, + CountUsersResponse, + CreateCompanyResponse, + CreateEntityTraitDefinitionRequestBodyEntityType, + CreateEntityTraitDefinitionRequestBodyTraitType, + CreatePlanTraitResponse, + CreateUserResponse, + DeleteCompanyByKeysResponse, + DeleteCompanyMembershipResponse, + DeleteCompanyResponse, + DeletePlanTraitResponse, + DeleteUserByKeysResponse, + DeleteUserResponse, + GetActiveCompanySubscriptionParams, + GetActiveCompanySubscriptionResponse, + GetActiveDealsParams, + GetActiveDealsResponse, + GetCompanyResponse, + GetEntityTraitDefinitionResponse, + GetEntityTraitValuesParams, + GetEntityTraitValuesResponse, + GetOrCreateCompanyMembershipResponse, + GetOrCreateEntityTraitDefinitionResponse, + GetPlanChangeResponse, + GetPlanTraitResponse, + GetUserResponse, + ListCompaniesForAdvancedFilterParams, + ListCompaniesForAdvancedFilterRequestSortOrderDirection, + ListCompaniesForAdvancedFilterResponse, + ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection, + ListCompaniesParams, + ListCompaniesResponse, + ListCompanyMembershipsParams, + ListCompanyMembershipsResponse, + ListEntityKeyDefinitionsParams, + ListEntityKeyDefinitionsRequestEntityType, + ListEntityKeyDefinitionsResponse, + ListEntityKeyDefinitionsResponseParamsEntityType, + ListEntityTraitDefinitionsParams, + ListEntityTraitDefinitionsRequestEntityType, + ListEntityTraitDefinitionsRequestTraitType, + ListEntityTraitDefinitionsResponse, + ListEntityTraitDefinitionsResponseParamsEntityType, + ListEntityTraitDefinitionsResponseParamsTraitType, + ListPlanChangesParams, + ListPlanChangesResponse, + ListPlanTraitsParams, + ListPlanTraitsResponse, + ListUsersParams, + ListUsersResponse, + LookupCompanyParams, + LookupCompanyResponse, + LookupUserParams, + LookupUserResponse, + UpdateEntityTraitDefinitionRequestBodyTraitType, + UpdateEntityTraitDefinitionResponse, + UpdatePlanTraitResponse, + UpdatePlanTraitsBulkResponse, + UpsertCompanyResponse, + UpsertCompanyTraitResponse, + UpsertUserResponse, + UpsertUserTraitResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CountCompaniesForAdvancedFilterParams": ".types", + "CountCompaniesForAdvancedFilterRequestSortOrderDirection": ".types", + "CountCompaniesForAdvancedFilterResponse": ".types", + "CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection": ".types", + "CountCompaniesParams": ".types", + "CountCompaniesResponse": ".types", + "CountEntityKeyDefinitionsParams": ".types", + "CountEntityKeyDefinitionsRequestEntityType": ".types", + "CountEntityKeyDefinitionsResponse": ".types", + "CountEntityKeyDefinitionsResponseParamsEntityType": ".types", + "CountEntityTraitDefinitionsParams": ".types", + "CountEntityTraitDefinitionsRequestEntityType": ".types", + "CountEntityTraitDefinitionsRequestTraitType": ".types", + "CountEntityTraitDefinitionsResponse": ".types", + "CountEntityTraitDefinitionsResponseParamsEntityType": ".types", + "CountEntityTraitDefinitionsResponseParamsTraitType": ".types", + "CountPlanTraitsParams": ".types", + "CountPlanTraitsResponse": ".types", + "CountUsersParams": ".types", + "CountUsersResponse": ".types", + "CreateCompanyResponse": ".types", + "CreateEntityTraitDefinitionRequestBodyEntityType": ".types", + "CreateEntityTraitDefinitionRequestBodyTraitType": ".types", + "CreatePlanTraitResponse": ".types", + "CreateUserResponse": ".types", + "DeleteCompanyByKeysResponse": ".types", + "DeleteCompanyMembershipResponse": ".types", + "DeleteCompanyResponse": ".types", + "DeletePlanTraitResponse": ".types", + "DeleteUserByKeysResponse": ".types", + "DeleteUserResponse": ".types", + "GetActiveCompanySubscriptionParams": ".types", + "GetActiveCompanySubscriptionResponse": ".types", + "GetActiveDealsParams": ".types", + "GetActiveDealsResponse": ".types", + "GetCompanyResponse": ".types", + "GetEntityTraitDefinitionResponse": ".types", + "GetEntityTraitValuesParams": ".types", + "GetEntityTraitValuesResponse": ".types", + "GetOrCreateCompanyMembershipResponse": ".types", + "GetOrCreateEntityTraitDefinitionResponse": ".types", + "GetPlanChangeResponse": ".types", + "GetPlanTraitResponse": ".types", + "GetUserResponse": ".types", + "ListCompaniesForAdvancedFilterParams": ".types", + "ListCompaniesForAdvancedFilterRequestSortOrderDirection": ".types", + "ListCompaniesForAdvancedFilterResponse": ".types", + "ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection": ".types", + "ListCompaniesParams": ".types", + "ListCompaniesResponse": ".types", + "ListCompanyMembershipsParams": ".types", + "ListCompanyMembershipsResponse": ".types", + "ListEntityKeyDefinitionsParams": ".types", + "ListEntityKeyDefinitionsRequestEntityType": ".types", + "ListEntityKeyDefinitionsResponse": ".types", + "ListEntityKeyDefinitionsResponseParamsEntityType": ".types", + "ListEntityTraitDefinitionsParams": ".types", + "ListEntityTraitDefinitionsRequestEntityType": ".types", + "ListEntityTraitDefinitionsRequestTraitType": ".types", + "ListEntityTraitDefinitionsResponse": ".types", + "ListEntityTraitDefinitionsResponseParamsEntityType": ".types", + "ListEntityTraitDefinitionsResponseParamsTraitType": ".types", + "ListPlanChangesParams": ".types", + "ListPlanChangesResponse": ".types", + "ListPlanTraitsParams": ".types", + "ListPlanTraitsResponse": ".types", + "ListUsersParams": ".types", + "ListUsersResponse": ".types", + "LookupCompanyParams": ".types", + "LookupCompanyResponse": ".types", + "LookupUserParams": ".types", + "LookupUserResponse": ".types", + "UpdateEntityTraitDefinitionRequestBodyTraitType": ".types", + "UpdateEntityTraitDefinitionResponse": ".types", + "UpdatePlanTraitResponse": ".types", + "UpdatePlanTraitsBulkResponse": ".types", + "UpsertCompanyResponse": ".types", + "UpsertCompanyTraitResponse": ".types", + "UpsertUserResponse": ".types", + "UpsertUserTraitResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountCompaniesForAdvancedFilterParams", diff --git a/src/schematic/companies/types/__init__.py b/src/schematic/companies/types/__init__.py index fd6c194..f8ff0e8 100644 --- a/src/schematic/companies/types/__init__.py +++ b/src/schematic/companies/types/__init__.py @@ -2,100 +2,216 @@ # isort: skip_file -from .count_companies_for_advanced_filter_params import CountCompaniesForAdvancedFilterParams -from .count_companies_for_advanced_filter_request_sort_order_direction import ( - CountCompaniesForAdvancedFilterRequestSortOrderDirection, -) -from .count_companies_for_advanced_filter_response import CountCompaniesForAdvancedFilterResponse -from .count_companies_for_advanced_filter_response_params_sort_order_direction import ( - CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection, -) -from .count_companies_params import CountCompaniesParams -from .count_companies_response import CountCompaniesResponse -from .count_entity_key_definitions_params import CountEntityKeyDefinitionsParams -from .count_entity_key_definitions_request_entity_type import CountEntityKeyDefinitionsRequestEntityType -from .count_entity_key_definitions_response import CountEntityKeyDefinitionsResponse -from .count_entity_key_definitions_response_params_entity_type import CountEntityKeyDefinitionsResponseParamsEntityType -from .count_entity_trait_definitions_params import CountEntityTraitDefinitionsParams -from .count_entity_trait_definitions_request_entity_type import CountEntityTraitDefinitionsRequestEntityType -from .count_entity_trait_definitions_request_trait_type import CountEntityTraitDefinitionsRequestTraitType -from .count_entity_trait_definitions_response import CountEntityTraitDefinitionsResponse -from .count_entity_trait_definitions_response_params_entity_type import ( - CountEntityTraitDefinitionsResponseParamsEntityType, -) -from .count_entity_trait_definitions_response_params_trait_type import ( - CountEntityTraitDefinitionsResponseParamsTraitType, -) -from .count_plan_traits_params import CountPlanTraitsParams -from .count_plan_traits_response import CountPlanTraitsResponse -from .count_users_params import CountUsersParams -from .count_users_response import CountUsersResponse -from .create_company_response import CreateCompanyResponse -from .create_entity_trait_definition_request_body_entity_type import CreateEntityTraitDefinitionRequestBodyEntityType -from .create_entity_trait_definition_request_body_trait_type import CreateEntityTraitDefinitionRequestBodyTraitType -from .create_plan_trait_response import CreatePlanTraitResponse -from .create_user_response import CreateUserResponse -from .delete_company_by_keys_response import DeleteCompanyByKeysResponse -from .delete_company_membership_response import DeleteCompanyMembershipResponse -from .delete_company_response import DeleteCompanyResponse -from .delete_plan_trait_response import DeletePlanTraitResponse -from .delete_user_by_keys_response import DeleteUserByKeysResponse -from .delete_user_response import DeleteUserResponse -from .get_active_company_subscription_params import GetActiveCompanySubscriptionParams -from .get_active_company_subscription_response import GetActiveCompanySubscriptionResponse -from .get_active_deals_params import GetActiveDealsParams -from .get_active_deals_response import GetActiveDealsResponse -from .get_company_response import GetCompanyResponse -from .get_entity_trait_definition_response import GetEntityTraitDefinitionResponse -from .get_entity_trait_values_params import GetEntityTraitValuesParams -from .get_entity_trait_values_response import GetEntityTraitValuesResponse -from .get_or_create_company_membership_response import GetOrCreateCompanyMembershipResponse -from .get_or_create_entity_trait_definition_response import GetOrCreateEntityTraitDefinitionResponse -from .get_plan_change_response import GetPlanChangeResponse -from .get_plan_trait_response import GetPlanTraitResponse -from .get_user_response import GetUserResponse -from .list_companies_for_advanced_filter_params import ListCompaniesForAdvancedFilterParams -from .list_companies_for_advanced_filter_request_sort_order_direction import ( - ListCompaniesForAdvancedFilterRequestSortOrderDirection, -) -from .list_companies_for_advanced_filter_response import ListCompaniesForAdvancedFilterResponse -from .list_companies_for_advanced_filter_response_params_sort_order_direction import ( - ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection, -) -from .list_companies_params import ListCompaniesParams -from .list_companies_response import ListCompaniesResponse -from .list_company_memberships_params import ListCompanyMembershipsParams -from .list_company_memberships_response import ListCompanyMembershipsResponse -from .list_entity_key_definitions_params import ListEntityKeyDefinitionsParams -from .list_entity_key_definitions_request_entity_type import ListEntityKeyDefinitionsRequestEntityType -from .list_entity_key_definitions_response import ListEntityKeyDefinitionsResponse -from .list_entity_key_definitions_response_params_entity_type import ListEntityKeyDefinitionsResponseParamsEntityType -from .list_entity_trait_definitions_params import ListEntityTraitDefinitionsParams -from .list_entity_trait_definitions_request_entity_type import ListEntityTraitDefinitionsRequestEntityType -from .list_entity_trait_definitions_request_trait_type import ListEntityTraitDefinitionsRequestTraitType -from .list_entity_trait_definitions_response import ListEntityTraitDefinitionsResponse -from .list_entity_trait_definitions_response_params_entity_type import ( - ListEntityTraitDefinitionsResponseParamsEntityType, -) -from .list_entity_trait_definitions_response_params_trait_type import ListEntityTraitDefinitionsResponseParamsTraitType -from .list_plan_changes_params import ListPlanChangesParams -from .list_plan_changes_response import ListPlanChangesResponse -from .list_plan_traits_params import ListPlanTraitsParams -from .list_plan_traits_response import ListPlanTraitsResponse -from .list_users_params import ListUsersParams -from .list_users_response import ListUsersResponse -from .lookup_company_params import LookupCompanyParams -from .lookup_company_response import LookupCompanyResponse -from .lookup_user_params import LookupUserParams -from .lookup_user_response import LookupUserResponse -from .update_entity_trait_definition_request_body_trait_type import UpdateEntityTraitDefinitionRequestBodyTraitType -from .update_entity_trait_definition_response import UpdateEntityTraitDefinitionResponse -from .update_plan_trait_response import UpdatePlanTraitResponse -from .update_plan_traits_bulk_response import UpdatePlanTraitsBulkResponse -from .upsert_company_response import UpsertCompanyResponse -from .upsert_company_trait_response import UpsertCompanyTraitResponse -from .upsert_user_response import UpsertUserResponse -from .upsert_user_trait_response import UpsertUserTraitResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .count_companies_for_advanced_filter_params import CountCompaniesForAdvancedFilterParams + from .count_companies_for_advanced_filter_request_sort_order_direction import ( + CountCompaniesForAdvancedFilterRequestSortOrderDirection, + ) + from .count_companies_for_advanced_filter_response import CountCompaniesForAdvancedFilterResponse + from .count_companies_for_advanced_filter_response_params_sort_order_direction import ( + CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection, + ) + from .count_companies_params import CountCompaniesParams + from .count_companies_response import CountCompaniesResponse + from .count_entity_key_definitions_params import CountEntityKeyDefinitionsParams + from .count_entity_key_definitions_request_entity_type import CountEntityKeyDefinitionsRequestEntityType + from .count_entity_key_definitions_response import CountEntityKeyDefinitionsResponse + from .count_entity_key_definitions_response_params_entity_type import ( + CountEntityKeyDefinitionsResponseParamsEntityType, + ) + from .count_entity_trait_definitions_params import CountEntityTraitDefinitionsParams + from .count_entity_trait_definitions_request_entity_type import CountEntityTraitDefinitionsRequestEntityType + from .count_entity_trait_definitions_request_trait_type import CountEntityTraitDefinitionsRequestTraitType + from .count_entity_trait_definitions_response import CountEntityTraitDefinitionsResponse + from .count_entity_trait_definitions_response_params_entity_type import ( + CountEntityTraitDefinitionsResponseParamsEntityType, + ) + from .count_entity_trait_definitions_response_params_trait_type import ( + CountEntityTraitDefinitionsResponseParamsTraitType, + ) + from .count_plan_traits_params import CountPlanTraitsParams + from .count_plan_traits_response import CountPlanTraitsResponse + from .count_users_params import CountUsersParams + from .count_users_response import CountUsersResponse + from .create_company_response import CreateCompanyResponse + from .create_entity_trait_definition_request_body_entity_type import ( + CreateEntityTraitDefinitionRequestBodyEntityType, + ) + from .create_entity_trait_definition_request_body_trait_type import CreateEntityTraitDefinitionRequestBodyTraitType + from .create_plan_trait_response import CreatePlanTraitResponse + from .create_user_response import CreateUserResponse + from .delete_company_by_keys_response import DeleteCompanyByKeysResponse + from .delete_company_membership_response import DeleteCompanyMembershipResponse + from .delete_company_response import DeleteCompanyResponse + from .delete_plan_trait_response import DeletePlanTraitResponse + from .delete_user_by_keys_response import DeleteUserByKeysResponse + from .delete_user_response import DeleteUserResponse + from .get_active_company_subscription_params import GetActiveCompanySubscriptionParams + from .get_active_company_subscription_response import GetActiveCompanySubscriptionResponse + from .get_active_deals_params import GetActiveDealsParams + from .get_active_deals_response import GetActiveDealsResponse + from .get_company_response import GetCompanyResponse + from .get_entity_trait_definition_response import GetEntityTraitDefinitionResponse + from .get_entity_trait_values_params import GetEntityTraitValuesParams + from .get_entity_trait_values_response import GetEntityTraitValuesResponse + from .get_or_create_company_membership_response import GetOrCreateCompanyMembershipResponse + from .get_or_create_entity_trait_definition_response import GetOrCreateEntityTraitDefinitionResponse + from .get_plan_change_response import GetPlanChangeResponse + from .get_plan_trait_response import GetPlanTraitResponse + from .get_user_response import GetUserResponse + from .list_companies_for_advanced_filter_params import ListCompaniesForAdvancedFilterParams + from .list_companies_for_advanced_filter_request_sort_order_direction import ( + ListCompaniesForAdvancedFilterRequestSortOrderDirection, + ) + from .list_companies_for_advanced_filter_response import ListCompaniesForAdvancedFilterResponse + from .list_companies_for_advanced_filter_response_params_sort_order_direction import ( + ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection, + ) + from .list_companies_params import ListCompaniesParams + from .list_companies_response import ListCompaniesResponse + from .list_company_memberships_params import ListCompanyMembershipsParams + from .list_company_memberships_response import ListCompanyMembershipsResponse + from .list_entity_key_definitions_params import ListEntityKeyDefinitionsParams + from .list_entity_key_definitions_request_entity_type import ListEntityKeyDefinitionsRequestEntityType + from .list_entity_key_definitions_response import ListEntityKeyDefinitionsResponse + from .list_entity_key_definitions_response_params_entity_type import ( + ListEntityKeyDefinitionsResponseParamsEntityType, + ) + from .list_entity_trait_definitions_params import ListEntityTraitDefinitionsParams + from .list_entity_trait_definitions_request_entity_type import ListEntityTraitDefinitionsRequestEntityType + from .list_entity_trait_definitions_request_trait_type import ListEntityTraitDefinitionsRequestTraitType + from .list_entity_trait_definitions_response import ListEntityTraitDefinitionsResponse + from .list_entity_trait_definitions_response_params_entity_type import ( + ListEntityTraitDefinitionsResponseParamsEntityType, + ) + from .list_entity_trait_definitions_response_params_trait_type import ( + ListEntityTraitDefinitionsResponseParamsTraitType, + ) + from .list_plan_changes_params import ListPlanChangesParams + from .list_plan_changes_response import ListPlanChangesResponse + from .list_plan_traits_params import ListPlanTraitsParams + from .list_plan_traits_response import ListPlanTraitsResponse + from .list_users_params import ListUsersParams + from .list_users_response import ListUsersResponse + from .lookup_company_params import LookupCompanyParams + from .lookup_company_response import LookupCompanyResponse + from .lookup_user_params import LookupUserParams + from .lookup_user_response import LookupUserResponse + from .update_entity_trait_definition_request_body_trait_type import UpdateEntityTraitDefinitionRequestBodyTraitType + from .update_entity_trait_definition_response import UpdateEntityTraitDefinitionResponse + from .update_plan_trait_response import UpdatePlanTraitResponse + from .update_plan_traits_bulk_response import UpdatePlanTraitsBulkResponse + from .upsert_company_response import UpsertCompanyResponse + from .upsert_company_trait_response import UpsertCompanyTraitResponse + from .upsert_user_response import UpsertUserResponse + from .upsert_user_trait_response import UpsertUserTraitResponse +_dynamic_imports: typing.Dict[str, str] = { + "CountCompaniesForAdvancedFilterParams": ".count_companies_for_advanced_filter_params", + "CountCompaniesForAdvancedFilterRequestSortOrderDirection": ".count_companies_for_advanced_filter_request_sort_order_direction", + "CountCompaniesForAdvancedFilterResponse": ".count_companies_for_advanced_filter_response", + "CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection": ".count_companies_for_advanced_filter_response_params_sort_order_direction", + "CountCompaniesParams": ".count_companies_params", + "CountCompaniesResponse": ".count_companies_response", + "CountEntityKeyDefinitionsParams": ".count_entity_key_definitions_params", + "CountEntityKeyDefinitionsRequestEntityType": ".count_entity_key_definitions_request_entity_type", + "CountEntityKeyDefinitionsResponse": ".count_entity_key_definitions_response", + "CountEntityKeyDefinitionsResponseParamsEntityType": ".count_entity_key_definitions_response_params_entity_type", + "CountEntityTraitDefinitionsParams": ".count_entity_trait_definitions_params", + "CountEntityTraitDefinitionsRequestEntityType": ".count_entity_trait_definitions_request_entity_type", + "CountEntityTraitDefinitionsRequestTraitType": ".count_entity_trait_definitions_request_trait_type", + "CountEntityTraitDefinitionsResponse": ".count_entity_trait_definitions_response", + "CountEntityTraitDefinitionsResponseParamsEntityType": ".count_entity_trait_definitions_response_params_entity_type", + "CountEntityTraitDefinitionsResponseParamsTraitType": ".count_entity_trait_definitions_response_params_trait_type", + "CountPlanTraitsParams": ".count_plan_traits_params", + "CountPlanTraitsResponse": ".count_plan_traits_response", + "CountUsersParams": ".count_users_params", + "CountUsersResponse": ".count_users_response", + "CreateCompanyResponse": ".create_company_response", + "CreateEntityTraitDefinitionRequestBodyEntityType": ".create_entity_trait_definition_request_body_entity_type", + "CreateEntityTraitDefinitionRequestBodyTraitType": ".create_entity_trait_definition_request_body_trait_type", + "CreatePlanTraitResponse": ".create_plan_trait_response", + "CreateUserResponse": ".create_user_response", + "DeleteCompanyByKeysResponse": ".delete_company_by_keys_response", + "DeleteCompanyMembershipResponse": ".delete_company_membership_response", + "DeleteCompanyResponse": ".delete_company_response", + "DeletePlanTraitResponse": ".delete_plan_trait_response", + "DeleteUserByKeysResponse": ".delete_user_by_keys_response", + "DeleteUserResponse": ".delete_user_response", + "GetActiveCompanySubscriptionParams": ".get_active_company_subscription_params", + "GetActiveCompanySubscriptionResponse": ".get_active_company_subscription_response", + "GetActiveDealsParams": ".get_active_deals_params", + "GetActiveDealsResponse": ".get_active_deals_response", + "GetCompanyResponse": ".get_company_response", + "GetEntityTraitDefinitionResponse": ".get_entity_trait_definition_response", + "GetEntityTraitValuesParams": ".get_entity_trait_values_params", + "GetEntityTraitValuesResponse": ".get_entity_trait_values_response", + "GetOrCreateCompanyMembershipResponse": ".get_or_create_company_membership_response", + "GetOrCreateEntityTraitDefinitionResponse": ".get_or_create_entity_trait_definition_response", + "GetPlanChangeResponse": ".get_plan_change_response", + "GetPlanTraitResponse": ".get_plan_trait_response", + "GetUserResponse": ".get_user_response", + "ListCompaniesForAdvancedFilterParams": ".list_companies_for_advanced_filter_params", + "ListCompaniesForAdvancedFilterRequestSortOrderDirection": ".list_companies_for_advanced_filter_request_sort_order_direction", + "ListCompaniesForAdvancedFilterResponse": ".list_companies_for_advanced_filter_response", + "ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection": ".list_companies_for_advanced_filter_response_params_sort_order_direction", + "ListCompaniesParams": ".list_companies_params", + "ListCompaniesResponse": ".list_companies_response", + "ListCompanyMembershipsParams": ".list_company_memberships_params", + "ListCompanyMembershipsResponse": ".list_company_memberships_response", + "ListEntityKeyDefinitionsParams": ".list_entity_key_definitions_params", + "ListEntityKeyDefinitionsRequestEntityType": ".list_entity_key_definitions_request_entity_type", + "ListEntityKeyDefinitionsResponse": ".list_entity_key_definitions_response", + "ListEntityKeyDefinitionsResponseParamsEntityType": ".list_entity_key_definitions_response_params_entity_type", + "ListEntityTraitDefinitionsParams": ".list_entity_trait_definitions_params", + "ListEntityTraitDefinitionsRequestEntityType": ".list_entity_trait_definitions_request_entity_type", + "ListEntityTraitDefinitionsRequestTraitType": ".list_entity_trait_definitions_request_trait_type", + "ListEntityTraitDefinitionsResponse": ".list_entity_trait_definitions_response", + "ListEntityTraitDefinitionsResponseParamsEntityType": ".list_entity_trait_definitions_response_params_entity_type", + "ListEntityTraitDefinitionsResponseParamsTraitType": ".list_entity_trait_definitions_response_params_trait_type", + "ListPlanChangesParams": ".list_plan_changes_params", + "ListPlanChangesResponse": ".list_plan_changes_response", + "ListPlanTraitsParams": ".list_plan_traits_params", + "ListPlanTraitsResponse": ".list_plan_traits_response", + "ListUsersParams": ".list_users_params", + "ListUsersResponse": ".list_users_response", + "LookupCompanyParams": ".lookup_company_params", + "LookupCompanyResponse": ".lookup_company_response", + "LookupUserParams": ".lookup_user_params", + "LookupUserResponse": ".lookup_user_response", + "UpdateEntityTraitDefinitionRequestBodyTraitType": ".update_entity_trait_definition_request_body_trait_type", + "UpdateEntityTraitDefinitionResponse": ".update_entity_trait_definition_response", + "UpdatePlanTraitResponse": ".update_plan_trait_response", + "UpdatePlanTraitsBulkResponse": ".update_plan_traits_bulk_response", + "UpsertCompanyResponse": ".upsert_company_response", + "UpsertCompanyTraitResponse": ".upsert_company_trait_response", + "UpsertUserResponse": ".upsert_user_response", + "UpsertUserTraitResponse": ".upsert_user_trait_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountCompaniesForAdvancedFilterParams", diff --git a/src/schematic/components/__init__.py b/src/schematic/components/__init__.py index a7f7b1b..558be29 100644 --- a/src/schematic/components/__init__.py +++ b/src/schematic/components/__init__.py @@ -2,21 +2,62 @@ # isort: skip_file -from .types import ( - CountComponentsParams, - CountComponentsResponse, - CreateComponentRequestBodyEntityType, - CreateComponentResponse, - DeleteComponentResponse, - GetComponentResponse, - ListComponentsParams, - ListComponentsResponse, - PreviewComponentDataParams, - PreviewComponentDataResponse, - UpdateComponentRequestBodyEntityType, - UpdateComponentRequestBodyState, - UpdateComponentResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CountComponentsParams, + CountComponentsResponse, + CreateComponentRequestBodyEntityType, + CreateComponentResponse, + DeleteComponentResponse, + GetComponentResponse, + ListComponentsParams, + ListComponentsResponse, + PreviewComponentDataParams, + PreviewComponentDataResponse, + UpdateComponentRequestBodyEntityType, + UpdateComponentRequestBodyState, + UpdateComponentResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CountComponentsParams": ".types", + "CountComponentsResponse": ".types", + "CreateComponentRequestBodyEntityType": ".types", + "CreateComponentResponse": ".types", + "DeleteComponentResponse": ".types", + "GetComponentResponse": ".types", + "ListComponentsParams": ".types", + "ListComponentsResponse": ".types", + "PreviewComponentDataParams": ".types", + "PreviewComponentDataResponse": ".types", + "UpdateComponentRequestBodyEntityType": ".types", + "UpdateComponentRequestBodyState": ".types", + "UpdateComponentResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountComponentsParams", diff --git a/src/schematic/components/types/__init__.py b/src/schematic/components/types/__init__.py index f4bdeea..5f85804 100644 --- a/src/schematic/components/types/__init__.py +++ b/src/schematic/components/types/__init__.py @@ -2,19 +2,60 @@ # isort: skip_file -from .count_components_params import CountComponentsParams -from .count_components_response import CountComponentsResponse -from .create_component_request_body_entity_type import CreateComponentRequestBodyEntityType -from .create_component_response import CreateComponentResponse -from .delete_component_response import DeleteComponentResponse -from .get_component_response import GetComponentResponse -from .list_components_params import ListComponentsParams -from .list_components_response import ListComponentsResponse -from .preview_component_data_params import PreviewComponentDataParams -from .preview_component_data_response import PreviewComponentDataResponse -from .update_component_request_body_entity_type import UpdateComponentRequestBodyEntityType -from .update_component_request_body_state import UpdateComponentRequestBodyState -from .update_component_response import UpdateComponentResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .count_components_params import CountComponentsParams + from .count_components_response import CountComponentsResponse + from .create_component_request_body_entity_type import CreateComponentRequestBodyEntityType + from .create_component_response import CreateComponentResponse + from .delete_component_response import DeleteComponentResponse + from .get_component_response import GetComponentResponse + from .list_components_params import ListComponentsParams + from .list_components_response import ListComponentsResponse + from .preview_component_data_params import PreviewComponentDataParams + from .preview_component_data_response import PreviewComponentDataResponse + from .update_component_request_body_entity_type import UpdateComponentRequestBodyEntityType + from .update_component_request_body_state import UpdateComponentRequestBodyState + from .update_component_response import UpdateComponentResponse +_dynamic_imports: typing.Dict[str, str] = { + "CountComponentsParams": ".count_components_params", + "CountComponentsResponse": ".count_components_response", + "CreateComponentRequestBodyEntityType": ".create_component_request_body_entity_type", + "CreateComponentResponse": ".create_component_response", + "DeleteComponentResponse": ".delete_component_response", + "GetComponentResponse": ".get_component_response", + "ListComponentsParams": ".list_components_params", + "ListComponentsResponse": ".list_components_response", + "PreviewComponentDataParams": ".preview_component_data_params", + "PreviewComponentDataResponse": ".preview_component_data_response", + "UpdateComponentRequestBodyEntityType": ".update_component_request_body_entity_type", + "UpdateComponentRequestBodyState": ".update_component_request_body_state", + "UpdateComponentResponse": ".update_component_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountComponentsParams", diff --git a/src/schematic/core/__init__.py b/src/schematic/core/__init__.py index 31bbb81..9a33e23 100644 --- a/src/schematic/core/__init__.py +++ b/src/schematic/core/__init__.py @@ -2,26 +2,79 @@ # isort: skip_file -from .api_error import ApiError -from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper -from .datetime_utils import serialize_datetime -from .file import File, convert_file_dict_to_httpx_tuples, with_content_type -from .http_client import AsyncHttpClient, HttpClient -from .http_response import AsyncHttpResponse, HttpResponse -from .jsonable_encoder import jsonable_encoder -from .pydantic_utilities import ( - IS_PYDANTIC_V2, - UniversalBaseModel, - UniversalRootModel, - parse_obj_as, - universal_field_validator, - universal_root_validator, - update_forward_refs, -) -from .query_encoder import encode_query -from .remove_none_from_dict import remove_none_from_dict -from .request_options import RequestOptions -from .serialization import FieldMetadata, convert_and_respect_annotation_metadata +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .api_error import ApiError + from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper + from .datetime_utils import serialize_datetime + from .file import File, convert_file_dict_to_httpx_tuples, with_content_type + from .http_client import AsyncHttpClient, HttpClient + from .http_response import AsyncHttpResponse, HttpResponse + from .jsonable_encoder import jsonable_encoder + from .pydantic_utilities import ( + IS_PYDANTIC_V2, + UniversalBaseModel, + UniversalRootModel, + parse_obj_as, + universal_field_validator, + universal_root_validator, + update_forward_refs, + ) + from .query_encoder import encode_query + from .remove_none_from_dict import remove_none_from_dict + from .request_options import RequestOptions + from .serialization import FieldMetadata, convert_and_respect_annotation_metadata +_dynamic_imports: typing.Dict[str, str] = { + "ApiError": ".api_error", + "AsyncClientWrapper": ".client_wrapper", + "AsyncHttpClient": ".http_client", + "AsyncHttpResponse": ".http_response", + "BaseClientWrapper": ".client_wrapper", + "FieldMetadata": ".serialization", + "File": ".file", + "HttpClient": ".http_client", + "HttpResponse": ".http_response", + "IS_PYDANTIC_V2": ".pydantic_utilities", + "RequestOptions": ".request_options", + "SyncClientWrapper": ".client_wrapper", + "UniversalBaseModel": ".pydantic_utilities", + "UniversalRootModel": ".pydantic_utilities", + "convert_and_respect_annotation_metadata": ".serialization", + "convert_file_dict_to_httpx_tuples": ".file", + "encode_query": ".query_encoder", + "jsonable_encoder": ".jsonable_encoder", + "parse_obj_as": ".pydantic_utilities", + "remove_none_from_dict": ".remove_none_from_dict", + "serialize_datetime": ".datetime_utils", + "universal_field_validator": ".pydantic_utilities", + "universal_root_validator": ".pydantic_utilities", + "update_forward_refs": ".pydantic_utilities", + "with_content_type": ".file", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ApiError", diff --git a/src/schematic/core/client_wrapper.py b/src/schematic/core/client_wrapper.py index f85f3a3..d5598f2 100644 --- a/src/schematic/core/client_wrapper.py +++ b/src/schematic/core/client_wrapper.py @@ -7,8 +7,16 @@ class BaseClientWrapper: - def __init__(self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None): + def __init__( + self, + *, + api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + ): self.api_key = api_key + self._headers = headers self._base_url = base_url self._timeout = timeout @@ -18,10 +26,14 @@ def get_headers(self) -> typing.Dict[str, str]: "X-Fern-Language": "Python", "X-Fern-SDK-Name": "schematichq", "X-Fern-SDK-Version": "1.1.2", + **(self.get_custom_headers() or {}), } headers["X-Schematic-Api-Key"] = self.api_key return headers + def get_custom_headers(self) -> typing.Optional[typing.Dict[str, str]]: + return self._headers + def get_base_url(self) -> str: return self._base_url @@ -31,9 +43,15 @@ def get_timeout(self) -> typing.Optional[float]: class SyncClientWrapper(BaseClientWrapper): def __init__( - self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client + self, + *, + api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + httpx_client: httpx.Client, ): - super().__init__(api_key=api_key, base_url=base_url, timeout=timeout) + super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout) self.httpx_client = HttpClient( httpx_client=httpx_client, base_headers=self.get_headers, @@ -44,9 +62,15 @@ def __init__( class AsyncClientWrapper(BaseClientWrapper): def __init__( - self, *, api_key: str, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient + self, + *, + api_key: str, + headers: typing.Optional[typing.Dict[str, str]] = None, + base_url: str, + timeout: typing.Optional[float] = None, + httpx_client: httpx.AsyncClient, ): - super().__init__(api_key=api_key, base_url=base_url, timeout=timeout) + super().__init__(api_key=api_key, headers=headers, base_url=base_url, timeout=timeout) self.httpx_client = AsyncHttpClient( httpx_client=httpx_client, base_headers=self.get_headers, diff --git a/src/schematic/core/force_multipart.py b/src/schematic/core/force_multipart.py index ae24ccf..5440913 100644 --- a/src/schematic/core/force_multipart.py +++ b/src/schematic/core/force_multipart.py @@ -1,7 +1,9 @@ # This file was auto-generated by Fern from our API Definition. +from typing import Any, Dict -class ForceMultipartDict(dict): + +class ForceMultipartDict(Dict[str, Any]): """ A dictionary subclass that always evaluates to True in boolean contexts. @@ -9,7 +11,7 @@ class ForceMultipartDict(dict): the dictionary is empty, which would normally evaluate to False. """ - def __bool__(self): + def __bool__(self) -> bool: return True diff --git a/src/schematic/core/http_response.py b/src/schematic/core/http_response.py index 48a1798..2479747 100644 --- a/src/schematic/core/http_response.py +++ b/src/schematic/core/http_response.py @@ -4,8 +4,8 @@ import httpx +# Generic to represent the underlying type of the data wrapped by the HTTP response. T = TypeVar("T") -"""Generic to represent the underlying type of the data wrapped by the HTTP response.""" class BaseHttpResponse: diff --git a/src/schematic/core/http_sse/__init__.py b/src/schematic/core/http_sse/__init__.py new file mode 100644 index 0000000..730e5a3 --- /dev/null +++ b/src/schematic/core/http_sse/__init__.py @@ -0,0 +1,42 @@ +# This file was auto-generated by Fern from our API Definition. + +# isort: skip_file + +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from ._api import EventSource, aconnect_sse, connect_sse + from ._exceptions import SSEError + from ._models import ServerSentEvent +_dynamic_imports: typing.Dict[str, str] = { + "EventSource": "._api", + "SSEError": "._exceptions", + "ServerSentEvent": "._models", + "aconnect_sse": "._api", + "connect_sse": "._api", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + + +__all__ = ["EventSource", "SSEError", "ServerSentEvent", "aconnect_sse", "connect_sse"] diff --git a/src/schematic/core/http_sse/_api.py b/src/schematic/core/http_sse/_api.py new file mode 100644 index 0000000..f900b3b --- /dev/null +++ b/src/schematic/core/http_sse/_api.py @@ -0,0 +1,112 @@ +# This file was auto-generated by Fern from our API Definition. + +import re +from contextlib import asynccontextmanager, contextmanager +from typing import Any, AsyncGenerator, AsyncIterator, Iterator, cast + +import httpx +from ._decoders import SSEDecoder +from ._exceptions import SSEError +from ._models import ServerSentEvent + + +class EventSource: + def __init__(self, response: httpx.Response) -> None: + self._response = response + + def _check_content_type(self) -> None: + content_type = self._response.headers.get("content-type", "").partition(";")[0] + if "text/event-stream" not in content_type: + raise SSEError( + f"Expected response header Content-Type to contain 'text/event-stream', got {content_type!r}" + ) + + def _get_charset(self) -> str: + """Extract charset from Content-Type header, fallback to UTF-8.""" + content_type = self._response.headers.get("content-type", "") + + # Parse charset parameter using regex + charset_match = re.search(r"charset=([^;\s]+)", content_type, re.IGNORECASE) + if charset_match: + charset = charset_match.group(1).strip("\"'") + # Validate that it's a known encoding + try: + # Test if the charset is valid by trying to encode/decode + "test".encode(charset).decode(charset) + return charset + except (LookupError, UnicodeError): + # If charset is invalid, fall back to UTF-8 + pass + + # Default to UTF-8 if no charset specified or invalid charset + return "utf-8" + + @property + def response(self) -> httpx.Response: + return self._response + + def iter_sse(self) -> Iterator[ServerSentEvent]: + self._check_content_type() + decoder = SSEDecoder() + charset = self._get_charset() + + buffer = "" + for chunk in self._response.iter_bytes(): + # Decode chunk using detected charset + text_chunk = chunk.decode(charset, errors="replace") + buffer += text_chunk + + # Process complete lines + while "\n" in buffer: + line, buffer = buffer.split("\n", 1) + line = line.rstrip("\r") + sse = decoder.decode(line) + # when we reach a "\n\n" => line = '' + # => decoder will attempt to return an SSE Event + if sse is not None: + yield sse + + # Process any remaining data in buffer + if buffer.strip(): + line = buffer.rstrip("\r") + sse = decoder.decode(line) + if sse is not None: + yield sse + + async def aiter_sse(self) -> AsyncGenerator[ServerSentEvent, None]: + self._check_content_type() + decoder = SSEDecoder() + lines = cast(AsyncGenerator[str, None], self._response.aiter_lines()) + try: + async for line in lines: + line = line.rstrip("\n") + sse = decoder.decode(line) + if sse is not None: + yield sse + finally: + await lines.aclose() + + +@contextmanager +def connect_sse(client: httpx.Client, method: str, url: str, **kwargs: Any) -> Iterator[EventSource]: + headers = kwargs.pop("headers", {}) + headers["Accept"] = "text/event-stream" + headers["Cache-Control"] = "no-store" + + with client.stream(method, url, headers=headers, **kwargs) as response: + yield EventSource(response) + + +@asynccontextmanager +async def aconnect_sse( + client: httpx.AsyncClient, + method: str, + url: str, + **kwargs: Any, +) -> AsyncIterator[EventSource]: + headers = kwargs.pop("headers", {}) + headers["Accept"] = "text/event-stream" + headers["Cache-Control"] = "no-store" + + async with client.stream(method, url, headers=headers, **kwargs) as response: + yield EventSource(response) diff --git a/src/schematic/core/http_sse/_decoders.py b/src/schematic/core/http_sse/_decoders.py new file mode 100644 index 0000000..339b089 --- /dev/null +++ b/src/schematic/core/http_sse/_decoders.py @@ -0,0 +1,61 @@ +# This file was auto-generated by Fern from our API Definition. + +from typing import List, Optional + +from ._models import ServerSentEvent + + +class SSEDecoder: + def __init__(self) -> None: + self._event = "" + self._data: List[str] = [] + self._last_event_id = "" + self._retry: Optional[int] = None + + def decode(self, line: str) -> Optional[ServerSentEvent]: + # See: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation # noqa: E501 + + if not line: + if not self._event and not self._data and not self._last_event_id and self._retry is None: + return None + + sse = ServerSentEvent( + event=self._event, + data="\n".join(self._data), + id=self._last_event_id, + retry=self._retry, + ) + + # NOTE: as per the SSE spec, do not reset last_event_id. + self._event = "" + self._data = [] + self._retry = None + + return sse + + if line.startswith(":"): + return None + + fieldname, _, value = line.partition(":") + + if value.startswith(" "): + value = value[1:] + + if fieldname == "event": + self._event = value + elif fieldname == "data": + self._data.append(value) + elif fieldname == "id": + if "\0" in value: + pass + else: + self._last_event_id = value + elif fieldname == "retry": + try: + self._retry = int(value) + except (TypeError, ValueError): + pass + else: + pass # Field is ignored. + + return None diff --git a/src/schematic/core/http_sse/_exceptions.py b/src/schematic/core/http_sse/_exceptions.py new file mode 100644 index 0000000..81605a8 --- /dev/null +++ b/src/schematic/core/http_sse/_exceptions.py @@ -0,0 +1,7 @@ +# This file was auto-generated by Fern from our API Definition. + +import httpx + + +class SSEError(httpx.TransportError): + pass diff --git a/src/schematic/core/http_sse/_models.py b/src/schematic/core/http_sse/_models.py new file mode 100644 index 0000000..1af57f8 --- /dev/null +++ b/src/schematic/core/http_sse/_models.py @@ -0,0 +1,17 @@ +# This file was auto-generated by Fern from our API Definition. + +import json +from dataclasses import dataclass +from typing import Any, Optional + + +@dataclass(frozen=True) +class ServerSentEvent: + event: str = "message" + data: str = "" + id: str = "" + retry: Optional[int] = None + + def json(self) -> Any: + """Parse the data field as JSON.""" + return json.loads(self.data) diff --git a/src/schematic/core/pydantic_utilities.py b/src/schematic/core/pydantic_utilities.py index 0360ef4..8906cdf 100644 --- a/src/schematic/core/pydantic_utilities.py +++ b/src/schematic/core/pydantic_utilities.py @@ -59,9 +59,9 @@ class UniversalBaseModel(pydantic.BaseModel): protected_namespaces=(), ) - @pydantic.model_serializer(mode="wrap", when_used="json") # type: ignore[attr-defined] - def serialize_model(self, handler: pydantic.SerializerFunctionWrapHandler) -> Any: # type: ignore[name-defined] - serialized = handler(self) + @pydantic.model_serializer(mode="plain", when_used="json") # type: ignore[attr-defined] + def serialize_model(self) -> Any: # type: ignore[name-defined] + serialized = self.dict() # type: ignore[attr-defined] data = {k: serialize_datetime(v) if isinstance(v, dt.datetime) else v for k, v in serialized.items()} return data @@ -147,7 +147,10 @@ def dict(self, **kwargs: Any) -> Dict[str, Any]: dict_dump = super().dict(**kwargs_with_defaults_exclude_unset_include_fields) - return convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write") + return cast( + Dict[str, Any], + convert_and_respect_annotation_metadata(object_=dict_dump, annotation=self.__class__, direction="write"), + ) def _union_list_of_pydantic_dicts(source: List[Any], destination: List[Any]) -> List[Any]: diff --git a/src/schematic/credits/__init__.py b/src/schematic/credits/__init__.py index e08fcf4..2a257b3 100644 --- a/src/schematic/credits/__init__.py +++ b/src/schematic/credits/__init__.py @@ -2,72 +2,164 @@ # isort: skip_file -from .types import ( - CountBillingCreditsGrantsParams, - CountBillingCreditsGrantsResponse, - CountBillingCreditsParams, - CountBillingCreditsResponse, - CountBillingPlanCreditGrantsParams, - CountBillingPlanCreditGrantsResponse, - CountCreditBundlesParams, - CountCreditBundlesRequestStatus, - CountCreditBundlesResponse, - CountCreditBundlesResponseParamsStatus, - CountCreditLedgerParams, - CountCreditLedgerRequestPeriod, - CountCreditLedgerResponse, - CountCreditLedgerResponseParamsPeriod, - CreateBillingCreditRequestBodyBurnStrategy, - CreateBillingCreditRequestBodyDefaultRolloverPolicy, - CreateBillingCreditResponse, - CreateBillingPlanCreditGrantRequestBodyExpiryType, - CreateBillingPlanCreditGrantRequestBodyExpiryUnit, - CreateBillingPlanCreditGrantRequestBodyResetCadence, - CreateBillingPlanCreditGrantRequestBodyResetStart, - CreateBillingPlanCreditGrantRequestBodyResetType, - CreateBillingPlanCreditGrantResponse, - CreateCompanyCreditGrantExpiryType, - CreateCompanyCreditGrantExpiryUnit, - CreateCreditBundleRequestBodyExpiryType, - CreateCreditBundleRequestBodyExpiryUnit, - CreateCreditBundleRequestBodyStatus, - CreateCreditBundleResponse, - DeleteBillingPlanCreditGrantResponse, - DeleteCreditBundleResponse, - GetCreditBundleResponse, - GetEnrichedCreditLedgerParams, - GetEnrichedCreditLedgerRequestPeriod, - GetEnrichedCreditLedgerResponse, - GetEnrichedCreditLedgerResponseParamsPeriod, - GetSingleBillingCreditResponse, - GrantBillingCreditsToCompanyResponse, - ListBillingCreditsParams, - ListBillingCreditsResponse, - ListBillingPlanCreditGrantsParams, - ListBillingPlanCreditGrantsResponse, - ListCompanyGrantsParams, - ListCompanyGrantsRequestDir, - ListCompanyGrantsRequestOrder, - ListCompanyGrantsResponse, - ListCompanyGrantsResponseParamsDir, - ListCompanyGrantsResponseParamsOrder, - ListCreditBundlesParams, - ListCreditBundlesRequestStatus, - ListCreditBundlesResponse, - ListCreditBundlesResponseParamsStatus, - ListGrantsForCreditParams, - ListGrantsForCreditResponse, - SoftDeleteBillingCreditResponse, - UpdateBillingCreditRequestBodyBurnStrategy, - UpdateBillingCreditRequestBodyDefaultRolloverPolicy, - UpdateBillingCreditResponse, - UpdateCreditBundleDetailsRequestBodyExpiryType, - UpdateCreditBundleDetailsRequestBodyExpiryUnit, - UpdateCreditBundleDetailsRequestBodyStatus, - UpdateCreditBundleDetailsResponse, - ZeroOutGrantRequestBodyReason, - ZeroOutGrantResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CountBillingCreditsGrantsParams, + CountBillingCreditsGrantsResponse, + CountBillingCreditsParams, + CountBillingCreditsResponse, + CountBillingPlanCreditGrantsParams, + CountBillingPlanCreditGrantsResponse, + CountCreditBundlesParams, + CountCreditBundlesRequestStatus, + CountCreditBundlesResponse, + CountCreditBundlesResponseParamsStatus, + CountCreditLedgerParams, + CountCreditLedgerRequestPeriod, + CountCreditLedgerResponse, + CountCreditLedgerResponseParamsPeriod, + CreateBillingCreditRequestBodyBurnStrategy, + CreateBillingCreditRequestBodyDefaultRolloverPolicy, + CreateBillingCreditResponse, + CreateBillingPlanCreditGrantRequestBodyExpiryType, + CreateBillingPlanCreditGrantRequestBodyExpiryUnit, + CreateBillingPlanCreditGrantRequestBodyResetCadence, + CreateBillingPlanCreditGrantRequestBodyResetStart, + CreateBillingPlanCreditGrantRequestBodyResetType, + CreateBillingPlanCreditGrantResponse, + CreateCompanyCreditGrantExpiryType, + CreateCompanyCreditGrantExpiryUnit, + CreateCreditBundleRequestBodyExpiryType, + CreateCreditBundleRequestBodyExpiryUnit, + CreateCreditBundleRequestBodyStatus, + CreateCreditBundleResponse, + DeleteBillingPlanCreditGrantResponse, + DeleteCreditBundleResponse, + GetCreditBundleResponse, + GetEnrichedCreditLedgerParams, + GetEnrichedCreditLedgerRequestPeriod, + GetEnrichedCreditLedgerResponse, + GetEnrichedCreditLedgerResponseParamsPeriod, + GetSingleBillingCreditResponse, + GrantBillingCreditsToCompanyResponse, + ListBillingCreditsParams, + ListBillingCreditsResponse, + ListBillingPlanCreditGrantsParams, + ListBillingPlanCreditGrantsResponse, + ListCompanyGrantsParams, + ListCompanyGrantsRequestDir, + ListCompanyGrantsRequestOrder, + ListCompanyGrantsResponse, + ListCompanyGrantsResponseParamsDir, + ListCompanyGrantsResponseParamsOrder, + ListCreditBundlesParams, + ListCreditBundlesRequestStatus, + ListCreditBundlesResponse, + ListCreditBundlesResponseParamsStatus, + ListGrantsForCreditParams, + ListGrantsForCreditResponse, + SoftDeleteBillingCreditResponse, + UpdateBillingCreditRequestBodyBurnStrategy, + UpdateBillingCreditRequestBodyDefaultRolloverPolicy, + UpdateBillingCreditResponse, + UpdateCreditBundleDetailsRequestBodyExpiryType, + UpdateCreditBundleDetailsRequestBodyExpiryUnit, + UpdateCreditBundleDetailsRequestBodyStatus, + UpdateCreditBundleDetailsResponse, + ZeroOutGrantRequestBodyReason, + ZeroOutGrantResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CountBillingCreditsGrantsParams": ".types", + "CountBillingCreditsGrantsResponse": ".types", + "CountBillingCreditsParams": ".types", + "CountBillingCreditsResponse": ".types", + "CountBillingPlanCreditGrantsParams": ".types", + "CountBillingPlanCreditGrantsResponse": ".types", + "CountCreditBundlesParams": ".types", + "CountCreditBundlesRequestStatus": ".types", + "CountCreditBundlesResponse": ".types", + "CountCreditBundlesResponseParamsStatus": ".types", + "CountCreditLedgerParams": ".types", + "CountCreditLedgerRequestPeriod": ".types", + "CountCreditLedgerResponse": ".types", + "CountCreditLedgerResponseParamsPeriod": ".types", + "CreateBillingCreditRequestBodyBurnStrategy": ".types", + "CreateBillingCreditRequestBodyDefaultRolloverPolicy": ".types", + "CreateBillingCreditResponse": ".types", + "CreateBillingPlanCreditGrantRequestBodyExpiryType": ".types", + "CreateBillingPlanCreditGrantRequestBodyExpiryUnit": ".types", + "CreateBillingPlanCreditGrantRequestBodyResetCadence": ".types", + "CreateBillingPlanCreditGrantRequestBodyResetStart": ".types", + "CreateBillingPlanCreditGrantRequestBodyResetType": ".types", + "CreateBillingPlanCreditGrantResponse": ".types", + "CreateCompanyCreditGrantExpiryType": ".types", + "CreateCompanyCreditGrantExpiryUnit": ".types", + "CreateCreditBundleRequestBodyExpiryType": ".types", + "CreateCreditBundleRequestBodyExpiryUnit": ".types", + "CreateCreditBundleRequestBodyStatus": ".types", + "CreateCreditBundleResponse": ".types", + "DeleteBillingPlanCreditGrantResponse": ".types", + "DeleteCreditBundleResponse": ".types", + "GetCreditBundleResponse": ".types", + "GetEnrichedCreditLedgerParams": ".types", + "GetEnrichedCreditLedgerRequestPeriod": ".types", + "GetEnrichedCreditLedgerResponse": ".types", + "GetEnrichedCreditLedgerResponseParamsPeriod": ".types", + "GetSingleBillingCreditResponse": ".types", + "GrantBillingCreditsToCompanyResponse": ".types", + "ListBillingCreditsParams": ".types", + "ListBillingCreditsResponse": ".types", + "ListBillingPlanCreditGrantsParams": ".types", + "ListBillingPlanCreditGrantsResponse": ".types", + "ListCompanyGrantsParams": ".types", + "ListCompanyGrantsRequestDir": ".types", + "ListCompanyGrantsRequestOrder": ".types", + "ListCompanyGrantsResponse": ".types", + "ListCompanyGrantsResponseParamsDir": ".types", + "ListCompanyGrantsResponseParamsOrder": ".types", + "ListCreditBundlesParams": ".types", + "ListCreditBundlesRequestStatus": ".types", + "ListCreditBundlesResponse": ".types", + "ListCreditBundlesResponseParamsStatus": ".types", + "ListGrantsForCreditParams": ".types", + "ListGrantsForCreditResponse": ".types", + "SoftDeleteBillingCreditResponse": ".types", + "UpdateBillingCreditRequestBodyBurnStrategy": ".types", + "UpdateBillingCreditRequestBodyDefaultRolloverPolicy": ".types", + "UpdateBillingCreditResponse": ".types", + "UpdateCreditBundleDetailsRequestBodyExpiryType": ".types", + "UpdateCreditBundleDetailsRequestBodyExpiryUnit": ".types", + "UpdateCreditBundleDetailsRequestBodyStatus": ".types", + "UpdateCreditBundleDetailsResponse": ".types", + "ZeroOutGrantRequestBodyReason": ".types", + "ZeroOutGrantResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountBillingCreditsGrantsParams", diff --git a/src/schematic/credits/types/__init__.py b/src/schematic/credits/types/__init__.py index 23525ee..8a66c39 100644 --- a/src/schematic/credits/types/__init__.py +++ b/src/schematic/credits/types/__init__.py @@ -2,76 +2,176 @@ # isort: skip_file -from .count_billing_credits_grants_params import CountBillingCreditsGrantsParams -from .count_billing_credits_grants_response import CountBillingCreditsGrantsResponse -from .count_billing_credits_params import CountBillingCreditsParams -from .count_billing_credits_response import CountBillingCreditsResponse -from .count_billing_plan_credit_grants_params import CountBillingPlanCreditGrantsParams -from .count_billing_plan_credit_grants_response import CountBillingPlanCreditGrantsResponse -from .count_credit_bundles_params import CountCreditBundlesParams -from .count_credit_bundles_request_status import CountCreditBundlesRequestStatus -from .count_credit_bundles_response import CountCreditBundlesResponse -from .count_credit_bundles_response_params_status import CountCreditBundlesResponseParamsStatus -from .count_credit_ledger_params import CountCreditLedgerParams -from .count_credit_ledger_request_period import CountCreditLedgerRequestPeriod -from .count_credit_ledger_response import CountCreditLedgerResponse -from .count_credit_ledger_response_params_period import CountCreditLedgerResponseParamsPeriod -from .create_billing_credit_request_body_burn_strategy import CreateBillingCreditRequestBodyBurnStrategy -from .create_billing_credit_request_body_default_rollover_policy import ( - CreateBillingCreditRequestBodyDefaultRolloverPolicy, -) -from .create_billing_credit_response import CreateBillingCreditResponse -from .create_billing_plan_credit_grant_request_body_expiry_type import CreateBillingPlanCreditGrantRequestBodyExpiryType -from .create_billing_plan_credit_grant_request_body_expiry_unit import CreateBillingPlanCreditGrantRequestBodyExpiryUnit -from .create_billing_plan_credit_grant_request_body_reset_cadence import ( - CreateBillingPlanCreditGrantRequestBodyResetCadence, -) -from .create_billing_plan_credit_grant_request_body_reset_start import CreateBillingPlanCreditGrantRequestBodyResetStart -from .create_billing_plan_credit_grant_request_body_reset_type import CreateBillingPlanCreditGrantRequestBodyResetType -from .create_billing_plan_credit_grant_response import CreateBillingPlanCreditGrantResponse -from .create_company_credit_grant_expiry_type import CreateCompanyCreditGrantExpiryType -from .create_company_credit_grant_expiry_unit import CreateCompanyCreditGrantExpiryUnit -from .create_credit_bundle_request_body_expiry_type import CreateCreditBundleRequestBodyExpiryType -from .create_credit_bundle_request_body_expiry_unit import CreateCreditBundleRequestBodyExpiryUnit -from .create_credit_bundle_request_body_status import CreateCreditBundleRequestBodyStatus -from .create_credit_bundle_response import CreateCreditBundleResponse -from .delete_billing_plan_credit_grant_response import DeleteBillingPlanCreditGrantResponse -from .delete_credit_bundle_response import DeleteCreditBundleResponse -from .get_credit_bundle_response import GetCreditBundleResponse -from .get_enriched_credit_ledger_params import GetEnrichedCreditLedgerParams -from .get_enriched_credit_ledger_request_period import GetEnrichedCreditLedgerRequestPeriod -from .get_enriched_credit_ledger_response import GetEnrichedCreditLedgerResponse -from .get_enriched_credit_ledger_response_params_period import GetEnrichedCreditLedgerResponseParamsPeriod -from .get_single_billing_credit_response import GetSingleBillingCreditResponse -from .grant_billing_credits_to_company_response import GrantBillingCreditsToCompanyResponse -from .list_billing_credits_params import ListBillingCreditsParams -from .list_billing_credits_response import ListBillingCreditsResponse -from .list_billing_plan_credit_grants_params import ListBillingPlanCreditGrantsParams -from .list_billing_plan_credit_grants_response import ListBillingPlanCreditGrantsResponse -from .list_company_grants_params import ListCompanyGrantsParams -from .list_company_grants_request_dir import ListCompanyGrantsRequestDir -from .list_company_grants_request_order import ListCompanyGrantsRequestOrder -from .list_company_grants_response import ListCompanyGrantsResponse -from .list_company_grants_response_params_dir import ListCompanyGrantsResponseParamsDir -from .list_company_grants_response_params_order import ListCompanyGrantsResponseParamsOrder -from .list_credit_bundles_params import ListCreditBundlesParams -from .list_credit_bundles_request_status import ListCreditBundlesRequestStatus -from .list_credit_bundles_response import ListCreditBundlesResponse -from .list_credit_bundles_response_params_status import ListCreditBundlesResponseParamsStatus -from .list_grants_for_credit_params import ListGrantsForCreditParams -from .list_grants_for_credit_response import ListGrantsForCreditResponse -from .soft_delete_billing_credit_response import SoftDeleteBillingCreditResponse -from .update_billing_credit_request_body_burn_strategy import UpdateBillingCreditRequestBodyBurnStrategy -from .update_billing_credit_request_body_default_rollover_policy import ( - UpdateBillingCreditRequestBodyDefaultRolloverPolicy, -) -from .update_billing_credit_response import UpdateBillingCreditResponse -from .update_credit_bundle_details_request_body_expiry_type import UpdateCreditBundleDetailsRequestBodyExpiryType -from .update_credit_bundle_details_request_body_expiry_unit import UpdateCreditBundleDetailsRequestBodyExpiryUnit -from .update_credit_bundle_details_request_body_status import UpdateCreditBundleDetailsRequestBodyStatus -from .update_credit_bundle_details_response import UpdateCreditBundleDetailsResponse -from .zero_out_grant_request_body_reason import ZeroOutGrantRequestBodyReason -from .zero_out_grant_response import ZeroOutGrantResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .count_billing_credits_grants_params import CountBillingCreditsGrantsParams + from .count_billing_credits_grants_response import CountBillingCreditsGrantsResponse + from .count_billing_credits_params import CountBillingCreditsParams + from .count_billing_credits_response import CountBillingCreditsResponse + from .count_billing_plan_credit_grants_params import CountBillingPlanCreditGrantsParams + from .count_billing_plan_credit_grants_response import CountBillingPlanCreditGrantsResponse + from .count_credit_bundles_params import CountCreditBundlesParams + from .count_credit_bundles_request_status import CountCreditBundlesRequestStatus + from .count_credit_bundles_response import CountCreditBundlesResponse + from .count_credit_bundles_response_params_status import CountCreditBundlesResponseParamsStatus + from .count_credit_ledger_params import CountCreditLedgerParams + from .count_credit_ledger_request_period import CountCreditLedgerRequestPeriod + from .count_credit_ledger_response import CountCreditLedgerResponse + from .count_credit_ledger_response_params_period import CountCreditLedgerResponseParamsPeriod + from .create_billing_credit_request_body_burn_strategy import CreateBillingCreditRequestBodyBurnStrategy + from .create_billing_credit_request_body_default_rollover_policy import ( + CreateBillingCreditRequestBodyDefaultRolloverPolicy, + ) + from .create_billing_credit_response import CreateBillingCreditResponse + from .create_billing_plan_credit_grant_request_body_expiry_type import ( + CreateBillingPlanCreditGrantRequestBodyExpiryType, + ) + from .create_billing_plan_credit_grant_request_body_expiry_unit import ( + CreateBillingPlanCreditGrantRequestBodyExpiryUnit, + ) + from .create_billing_plan_credit_grant_request_body_reset_cadence import ( + CreateBillingPlanCreditGrantRequestBodyResetCadence, + ) + from .create_billing_plan_credit_grant_request_body_reset_start import ( + CreateBillingPlanCreditGrantRequestBodyResetStart, + ) + from .create_billing_plan_credit_grant_request_body_reset_type import ( + CreateBillingPlanCreditGrantRequestBodyResetType, + ) + from .create_billing_plan_credit_grant_response import CreateBillingPlanCreditGrantResponse + from .create_company_credit_grant_expiry_type import CreateCompanyCreditGrantExpiryType + from .create_company_credit_grant_expiry_unit import CreateCompanyCreditGrantExpiryUnit + from .create_credit_bundle_request_body_expiry_type import CreateCreditBundleRequestBodyExpiryType + from .create_credit_bundle_request_body_expiry_unit import CreateCreditBundleRequestBodyExpiryUnit + from .create_credit_bundle_request_body_status import CreateCreditBundleRequestBodyStatus + from .create_credit_bundle_response import CreateCreditBundleResponse + from .delete_billing_plan_credit_grant_response import DeleteBillingPlanCreditGrantResponse + from .delete_credit_bundle_response import DeleteCreditBundleResponse + from .get_credit_bundle_response import GetCreditBundleResponse + from .get_enriched_credit_ledger_params import GetEnrichedCreditLedgerParams + from .get_enriched_credit_ledger_request_period import GetEnrichedCreditLedgerRequestPeriod + from .get_enriched_credit_ledger_response import GetEnrichedCreditLedgerResponse + from .get_enriched_credit_ledger_response_params_period import GetEnrichedCreditLedgerResponseParamsPeriod + from .get_single_billing_credit_response import GetSingleBillingCreditResponse + from .grant_billing_credits_to_company_response import GrantBillingCreditsToCompanyResponse + from .list_billing_credits_params import ListBillingCreditsParams + from .list_billing_credits_response import ListBillingCreditsResponse + from .list_billing_plan_credit_grants_params import ListBillingPlanCreditGrantsParams + from .list_billing_plan_credit_grants_response import ListBillingPlanCreditGrantsResponse + from .list_company_grants_params import ListCompanyGrantsParams + from .list_company_grants_request_dir import ListCompanyGrantsRequestDir + from .list_company_grants_request_order import ListCompanyGrantsRequestOrder + from .list_company_grants_response import ListCompanyGrantsResponse + from .list_company_grants_response_params_dir import ListCompanyGrantsResponseParamsDir + from .list_company_grants_response_params_order import ListCompanyGrantsResponseParamsOrder + from .list_credit_bundles_params import ListCreditBundlesParams + from .list_credit_bundles_request_status import ListCreditBundlesRequestStatus + from .list_credit_bundles_response import ListCreditBundlesResponse + from .list_credit_bundles_response_params_status import ListCreditBundlesResponseParamsStatus + from .list_grants_for_credit_params import ListGrantsForCreditParams + from .list_grants_for_credit_response import ListGrantsForCreditResponse + from .soft_delete_billing_credit_response import SoftDeleteBillingCreditResponse + from .update_billing_credit_request_body_burn_strategy import UpdateBillingCreditRequestBodyBurnStrategy + from .update_billing_credit_request_body_default_rollover_policy import ( + UpdateBillingCreditRequestBodyDefaultRolloverPolicy, + ) + from .update_billing_credit_response import UpdateBillingCreditResponse + from .update_credit_bundle_details_request_body_expiry_type import UpdateCreditBundleDetailsRequestBodyExpiryType + from .update_credit_bundle_details_request_body_expiry_unit import UpdateCreditBundleDetailsRequestBodyExpiryUnit + from .update_credit_bundle_details_request_body_status import UpdateCreditBundleDetailsRequestBodyStatus + from .update_credit_bundle_details_response import UpdateCreditBundleDetailsResponse + from .zero_out_grant_request_body_reason import ZeroOutGrantRequestBodyReason + from .zero_out_grant_response import ZeroOutGrantResponse +_dynamic_imports: typing.Dict[str, str] = { + "CountBillingCreditsGrantsParams": ".count_billing_credits_grants_params", + "CountBillingCreditsGrantsResponse": ".count_billing_credits_grants_response", + "CountBillingCreditsParams": ".count_billing_credits_params", + "CountBillingCreditsResponse": ".count_billing_credits_response", + "CountBillingPlanCreditGrantsParams": ".count_billing_plan_credit_grants_params", + "CountBillingPlanCreditGrantsResponse": ".count_billing_plan_credit_grants_response", + "CountCreditBundlesParams": ".count_credit_bundles_params", + "CountCreditBundlesRequestStatus": ".count_credit_bundles_request_status", + "CountCreditBundlesResponse": ".count_credit_bundles_response", + "CountCreditBundlesResponseParamsStatus": ".count_credit_bundles_response_params_status", + "CountCreditLedgerParams": ".count_credit_ledger_params", + "CountCreditLedgerRequestPeriod": ".count_credit_ledger_request_period", + "CountCreditLedgerResponse": ".count_credit_ledger_response", + "CountCreditLedgerResponseParamsPeriod": ".count_credit_ledger_response_params_period", + "CreateBillingCreditRequestBodyBurnStrategy": ".create_billing_credit_request_body_burn_strategy", + "CreateBillingCreditRequestBodyDefaultRolloverPolicy": ".create_billing_credit_request_body_default_rollover_policy", + "CreateBillingCreditResponse": ".create_billing_credit_response", + "CreateBillingPlanCreditGrantRequestBodyExpiryType": ".create_billing_plan_credit_grant_request_body_expiry_type", + "CreateBillingPlanCreditGrantRequestBodyExpiryUnit": ".create_billing_plan_credit_grant_request_body_expiry_unit", + "CreateBillingPlanCreditGrantRequestBodyResetCadence": ".create_billing_plan_credit_grant_request_body_reset_cadence", + "CreateBillingPlanCreditGrantRequestBodyResetStart": ".create_billing_plan_credit_grant_request_body_reset_start", + "CreateBillingPlanCreditGrantRequestBodyResetType": ".create_billing_plan_credit_grant_request_body_reset_type", + "CreateBillingPlanCreditGrantResponse": ".create_billing_plan_credit_grant_response", + "CreateCompanyCreditGrantExpiryType": ".create_company_credit_grant_expiry_type", + "CreateCompanyCreditGrantExpiryUnit": ".create_company_credit_grant_expiry_unit", + "CreateCreditBundleRequestBodyExpiryType": ".create_credit_bundle_request_body_expiry_type", + "CreateCreditBundleRequestBodyExpiryUnit": ".create_credit_bundle_request_body_expiry_unit", + "CreateCreditBundleRequestBodyStatus": ".create_credit_bundle_request_body_status", + "CreateCreditBundleResponse": ".create_credit_bundle_response", + "DeleteBillingPlanCreditGrantResponse": ".delete_billing_plan_credit_grant_response", + "DeleteCreditBundleResponse": ".delete_credit_bundle_response", + "GetCreditBundleResponse": ".get_credit_bundle_response", + "GetEnrichedCreditLedgerParams": ".get_enriched_credit_ledger_params", + "GetEnrichedCreditLedgerRequestPeriod": ".get_enriched_credit_ledger_request_period", + "GetEnrichedCreditLedgerResponse": ".get_enriched_credit_ledger_response", + "GetEnrichedCreditLedgerResponseParamsPeriod": ".get_enriched_credit_ledger_response_params_period", + "GetSingleBillingCreditResponse": ".get_single_billing_credit_response", + "GrantBillingCreditsToCompanyResponse": ".grant_billing_credits_to_company_response", + "ListBillingCreditsParams": ".list_billing_credits_params", + "ListBillingCreditsResponse": ".list_billing_credits_response", + "ListBillingPlanCreditGrantsParams": ".list_billing_plan_credit_grants_params", + "ListBillingPlanCreditGrantsResponse": ".list_billing_plan_credit_grants_response", + "ListCompanyGrantsParams": ".list_company_grants_params", + "ListCompanyGrantsRequestDir": ".list_company_grants_request_dir", + "ListCompanyGrantsRequestOrder": ".list_company_grants_request_order", + "ListCompanyGrantsResponse": ".list_company_grants_response", + "ListCompanyGrantsResponseParamsDir": ".list_company_grants_response_params_dir", + "ListCompanyGrantsResponseParamsOrder": ".list_company_grants_response_params_order", + "ListCreditBundlesParams": ".list_credit_bundles_params", + "ListCreditBundlesRequestStatus": ".list_credit_bundles_request_status", + "ListCreditBundlesResponse": ".list_credit_bundles_response", + "ListCreditBundlesResponseParamsStatus": ".list_credit_bundles_response_params_status", + "ListGrantsForCreditParams": ".list_grants_for_credit_params", + "ListGrantsForCreditResponse": ".list_grants_for_credit_response", + "SoftDeleteBillingCreditResponse": ".soft_delete_billing_credit_response", + "UpdateBillingCreditRequestBodyBurnStrategy": ".update_billing_credit_request_body_burn_strategy", + "UpdateBillingCreditRequestBodyDefaultRolloverPolicy": ".update_billing_credit_request_body_default_rollover_policy", + "UpdateBillingCreditResponse": ".update_billing_credit_response", + "UpdateCreditBundleDetailsRequestBodyExpiryType": ".update_credit_bundle_details_request_body_expiry_type", + "UpdateCreditBundleDetailsRequestBodyExpiryUnit": ".update_credit_bundle_details_request_body_expiry_unit", + "UpdateCreditBundleDetailsRequestBodyStatus": ".update_credit_bundle_details_request_body_status", + "UpdateCreditBundleDetailsResponse": ".update_credit_bundle_details_response", + "ZeroOutGrantRequestBodyReason": ".zero_out_grant_request_body_reason", + "ZeroOutGrantResponse": ".zero_out_grant_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountBillingCreditsGrantsParams", diff --git a/src/schematic/crm/__init__.py b/src/schematic/crm/__init__.py index 23f404d..29b0fc3 100644 --- a/src/schematic/crm/__init__.py +++ b/src/schematic/crm/__init__.py @@ -2,14 +2,48 @@ # isort: skip_file -from .types import ( - ListCrmProductsParams, - ListCrmProductsResponse, - UpsertCrmDealResponse, - UpsertCrmProductResponse, - UpsertDealLineItemAssociationResponse, - UpsertLineItemResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + ListCrmProductsParams, + ListCrmProductsResponse, + UpsertCrmDealResponse, + UpsertCrmProductResponse, + UpsertDealLineItemAssociationResponse, + UpsertLineItemResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "ListCrmProductsParams": ".types", + "ListCrmProductsResponse": ".types", + "UpsertCrmDealResponse": ".types", + "UpsertCrmProductResponse": ".types", + "UpsertDealLineItemAssociationResponse": ".types", + "UpsertLineItemResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ListCrmProductsParams", diff --git a/src/schematic/crm/types/__init__.py b/src/schematic/crm/types/__init__.py index 544bec5..42391f1 100644 --- a/src/schematic/crm/types/__init__.py +++ b/src/schematic/crm/types/__init__.py @@ -2,12 +2,46 @@ # isort: skip_file -from .list_crm_products_params import ListCrmProductsParams -from .list_crm_products_response import ListCrmProductsResponse -from .upsert_crm_deal_response import UpsertCrmDealResponse -from .upsert_crm_product_response import UpsertCrmProductResponse -from .upsert_deal_line_item_association_response import UpsertDealLineItemAssociationResponse -from .upsert_line_item_response import UpsertLineItemResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .list_crm_products_params import ListCrmProductsParams + from .list_crm_products_response import ListCrmProductsResponse + from .upsert_crm_deal_response import UpsertCrmDealResponse + from .upsert_crm_product_response import UpsertCrmProductResponse + from .upsert_deal_line_item_association_response import UpsertDealLineItemAssociationResponse + from .upsert_line_item_response import UpsertLineItemResponse +_dynamic_imports: typing.Dict[str, str] = { + "ListCrmProductsParams": ".list_crm_products_params", + "ListCrmProductsResponse": ".list_crm_products_response", + "UpsertCrmDealResponse": ".upsert_crm_deal_response", + "UpsertCrmProductResponse": ".upsert_crm_product_response", + "UpsertDealLineItemAssociationResponse": ".upsert_deal_line_item_association_response", + "UpsertLineItemResponse": ".upsert_line_item_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ListCrmProductsParams", diff --git a/src/schematic/dataexports/__init__.py b/src/schematic/dataexports/__init__.py index fd084f3..2c0f0da 100644 --- a/src/schematic/dataexports/__init__.py +++ b/src/schematic/dataexports/__init__.py @@ -2,6 +2,33 @@ # isort: skip_file -from .types import CreateDataExportResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import CreateDataExportResponse +_dynamic_imports: typing.Dict[str, str] = {"CreateDataExportResponse": ".types"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["CreateDataExportResponse"] diff --git a/src/schematic/dataexports/types/__init__.py b/src/schematic/dataexports/types/__init__.py index 9ff192c..b7cbb54 100644 --- a/src/schematic/dataexports/types/__init__.py +++ b/src/schematic/dataexports/types/__init__.py @@ -2,6 +2,33 @@ # isort: skip_file -from .create_data_export_response import CreateDataExportResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_data_export_response import CreateDataExportResponse +_dynamic_imports: typing.Dict[str, str] = {"CreateDataExportResponse": ".create_data_export_response"} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["CreateDataExportResponse"] diff --git a/src/schematic/entitlements/__init__.py b/src/schematic/entitlements/__init__.py index 7a013ef..f241e6e 100644 --- a/src/schematic/entitlements/__init__.py +++ b/src/schematic/entitlements/__init__.py @@ -2,52 +2,124 @@ # isort: skip_file -from .types import ( - CountCompanyOverridesParams, - CountCompanyOverridesResponse, - CountFeatureCompaniesParams, - CountFeatureCompaniesResponse, - CountFeatureUsageParams, - CountFeatureUsageResponse, - CountFeatureUsersParams, - CountFeatureUsersResponse, - CountPlanEntitlementsParams, - CountPlanEntitlementsResponse, - CreateCompanyOverrideRequestBodyMetricPeriod, - CreateCompanyOverrideRequestBodyMetricPeriodMonthReset, - CreateCompanyOverrideRequestBodyValueType, - CreateCompanyOverrideResponse, - CreatePlanEntitlementRequestBodyMetricPeriod, - CreatePlanEntitlementRequestBodyMetricPeriodMonthReset, - CreatePlanEntitlementRequestBodyPriceBehavior, - CreatePlanEntitlementRequestBodyValueType, - CreatePlanEntitlementResponse, - DeleteCompanyOverrideResponse, - DeletePlanEntitlementResponse, - GetCompanyOverrideResponse, - GetFeatureUsageByCompanyParams, - GetFeatureUsageByCompanyResponse, - GetPlanEntitlementResponse, - ListCompanyOverridesParams, - ListCompanyOverridesResponse, - ListFeatureCompaniesParams, - ListFeatureCompaniesResponse, - ListFeatureUsageParams, - ListFeatureUsageResponse, - ListFeatureUsersParams, - ListFeatureUsersResponse, - ListPlanEntitlementsParams, - ListPlanEntitlementsResponse, - UpdateCompanyOverrideRequestBodyMetricPeriod, - UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset, - UpdateCompanyOverrideRequestBodyValueType, - UpdateCompanyOverrideResponse, - UpdatePlanEntitlementRequestBodyMetricPeriod, - UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset, - UpdatePlanEntitlementRequestBodyPriceBehavior, - UpdatePlanEntitlementRequestBodyValueType, - UpdatePlanEntitlementResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CountCompanyOverridesParams, + CountCompanyOverridesResponse, + CountFeatureCompaniesParams, + CountFeatureCompaniesResponse, + CountFeatureUsageParams, + CountFeatureUsageResponse, + CountFeatureUsersParams, + CountFeatureUsersResponse, + CountPlanEntitlementsParams, + CountPlanEntitlementsResponse, + CreateCompanyOverrideRequestBodyMetricPeriod, + CreateCompanyOverrideRequestBodyMetricPeriodMonthReset, + CreateCompanyOverrideRequestBodyValueType, + CreateCompanyOverrideResponse, + CreatePlanEntitlementRequestBodyMetricPeriod, + CreatePlanEntitlementRequestBodyMetricPeriodMonthReset, + CreatePlanEntitlementRequestBodyPriceBehavior, + CreatePlanEntitlementRequestBodyValueType, + CreatePlanEntitlementResponse, + DeleteCompanyOverrideResponse, + DeletePlanEntitlementResponse, + GetCompanyOverrideResponse, + GetFeatureUsageByCompanyParams, + GetFeatureUsageByCompanyResponse, + GetPlanEntitlementResponse, + ListCompanyOverridesParams, + ListCompanyOverridesResponse, + ListFeatureCompaniesParams, + ListFeatureCompaniesResponse, + ListFeatureUsageParams, + ListFeatureUsageResponse, + ListFeatureUsersParams, + ListFeatureUsersResponse, + ListPlanEntitlementsParams, + ListPlanEntitlementsResponse, + UpdateCompanyOverrideRequestBodyMetricPeriod, + UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset, + UpdateCompanyOverrideRequestBodyValueType, + UpdateCompanyOverrideResponse, + UpdatePlanEntitlementRequestBodyMetricPeriod, + UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset, + UpdatePlanEntitlementRequestBodyPriceBehavior, + UpdatePlanEntitlementRequestBodyValueType, + UpdatePlanEntitlementResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CountCompanyOverridesParams": ".types", + "CountCompanyOverridesResponse": ".types", + "CountFeatureCompaniesParams": ".types", + "CountFeatureCompaniesResponse": ".types", + "CountFeatureUsageParams": ".types", + "CountFeatureUsageResponse": ".types", + "CountFeatureUsersParams": ".types", + "CountFeatureUsersResponse": ".types", + "CountPlanEntitlementsParams": ".types", + "CountPlanEntitlementsResponse": ".types", + "CreateCompanyOverrideRequestBodyMetricPeriod": ".types", + "CreateCompanyOverrideRequestBodyMetricPeriodMonthReset": ".types", + "CreateCompanyOverrideRequestBodyValueType": ".types", + "CreateCompanyOverrideResponse": ".types", + "CreatePlanEntitlementRequestBodyMetricPeriod": ".types", + "CreatePlanEntitlementRequestBodyMetricPeriodMonthReset": ".types", + "CreatePlanEntitlementRequestBodyPriceBehavior": ".types", + "CreatePlanEntitlementRequestBodyValueType": ".types", + "CreatePlanEntitlementResponse": ".types", + "DeleteCompanyOverrideResponse": ".types", + "DeletePlanEntitlementResponse": ".types", + "GetCompanyOverrideResponse": ".types", + "GetFeatureUsageByCompanyParams": ".types", + "GetFeatureUsageByCompanyResponse": ".types", + "GetPlanEntitlementResponse": ".types", + "ListCompanyOverridesParams": ".types", + "ListCompanyOverridesResponse": ".types", + "ListFeatureCompaniesParams": ".types", + "ListFeatureCompaniesResponse": ".types", + "ListFeatureUsageParams": ".types", + "ListFeatureUsageResponse": ".types", + "ListFeatureUsersParams": ".types", + "ListFeatureUsersResponse": ".types", + "ListPlanEntitlementsParams": ".types", + "ListPlanEntitlementsResponse": ".types", + "UpdateCompanyOverrideRequestBodyMetricPeriod": ".types", + "UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset": ".types", + "UpdateCompanyOverrideRequestBodyValueType": ".types", + "UpdateCompanyOverrideResponse": ".types", + "UpdatePlanEntitlementRequestBodyMetricPeriod": ".types", + "UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset": ".types", + "UpdatePlanEntitlementRequestBodyPriceBehavior": ".types", + "UpdatePlanEntitlementRequestBodyValueType": ".types", + "UpdatePlanEntitlementResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountCompanyOverridesParams", diff --git a/src/schematic/entitlements/types/__init__.py b/src/schematic/entitlements/types/__init__.py index cff03fe..0fe8c39 100644 --- a/src/schematic/entitlements/types/__init__.py +++ b/src/schematic/entitlements/types/__init__.py @@ -2,58 +2,130 @@ # isort: skip_file -from .count_company_overrides_params import CountCompanyOverridesParams -from .count_company_overrides_response import CountCompanyOverridesResponse -from .count_feature_companies_params import CountFeatureCompaniesParams -from .count_feature_companies_response import CountFeatureCompaniesResponse -from .count_feature_usage_params import CountFeatureUsageParams -from .count_feature_usage_response import CountFeatureUsageResponse -from .count_feature_users_params import CountFeatureUsersParams -from .count_feature_users_response import CountFeatureUsersResponse -from .count_plan_entitlements_params import CountPlanEntitlementsParams -from .count_plan_entitlements_response import CountPlanEntitlementsResponse -from .create_company_override_request_body_metric_period import CreateCompanyOverrideRequestBodyMetricPeriod -from .create_company_override_request_body_metric_period_month_reset import ( - CreateCompanyOverrideRequestBodyMetricPeriodMonthReset, -) -from .create_company_override_request_body_value_type import CreateCompanyOverrideRequestBodyValueType -from .create_company_override_response import CreateCompanyOverrideResponse -from .create_plan_entitlement_request_body_metric_period import CreatePlanEntitlementRequestBodyMetricPeriod -from .create_plan_entitlement_request_body_metric_period_month_reset import ( - CreatePlanEntitlementRequestBodyMetricPeriodMonthReset, -) -from .create_plan_entitlement_request_body_price_behavior import CreatePlanEntitlementRequestBodyPriceBehavior -from .create_plan_entitlement_request_body_value_type import CreatePlanEntitlementRequestBodyValueType -from .create_plan_entitlement_response import CreatePlanEntitlementResponse -from .delete_company_override_response import DeleteCompanyOverrideResponse -from .delete_plan_entitlement_response import DeletePlanEntitlementResponse -from .get_company_override_response import GetCompanyOverrideResponse -from .get_feature_usage_by_company_params import GetFeatureUsageByCompanyParams -from .get_feature_usage_by_company_response import GetFeatureUsageByCompanyResponse -from .get_plan_entitlement_response import GetPlanEntitlementResponse -from .list_company_overrides_params import ListCompanyOverridesParams -from .list_company_overrides_response import ListCompanyOverridesResponse -from .list_feature_companies_params import ListFeatureCompaniesParams -from .list_feature_companies_response import ListFeatureCompaniesResponse -from .list_feature_usage_params import ListFeatureUsageParams -from .list_feature_usage_response import ListFeatureUsageResponse -from .list_feature_users_params import ListFeatureUsersParams -from .list_feature_users_response import ListFeatureUsersResponse -from .list_plan_entitlements_params import ListPlanEntitlementsParams -from .list_plan_entitlements_response import ListPlanEntitlementsResponse -from .update_company_override_request_body_metric_period import UpdateCompanyOverrideRequestBodyMetricPeriod -from .update_company_override_request_body_metric_period_month_reset import ( - UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset, -) -from .update_company_override_request_body_value_type import UpdateCompanyOverrideRequestBodyValueType -from .update_company_override_response import UpdateCompanyOverrideResponse -from .update_plan_entitlement_request_body_metric_period import UpdatePlanEntitlementRequestBodyMetricPeriod -from .update_plan_entitlement_request_body_metric_period_month_reset import ( - UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset, -) -from .update_plan_entitlement_request_body_price_behavior import UpdatePlanEntitlementRequestBodyPriceBehavior -from .update_plan_entitlement_request_body_value_type import UpdatePlanEntitlementRequestBodyValueType -from .update_plan_entitlement_response import UpdatePlanEntitlementResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .count_company_overrides_params import CountCompanyOverridesParams + from .count_company_overrides_response import CountCompanyOverridesResponse + from .count_feature_companies_params import CountFeatureCompaniesParams + from .count_feature_companies_response import CountFeatureCompaniesResponse + from .count_feature_usage_params import CountFeatureUsageParams + from .count_feature_usage_response import CountFeatureUsageResponse + from .count_feature_users_params import CountFeatureUsersParams + from .count_feature_users_response import CountFeatureUsersResponse + from .count_plan_entitlements_params import CountPlanEntitlementsParams + from .count_plan_entitlements_response import CountPlanEntitlementsResponse + from .create_company_override_request_body_metric_period import CreateCompanyOverrideRequestBodyMetricPeriod + from .create_company_override_request_body_metric_period_month_reset import ( + CreateCompanyOverrideRequestBodyMetricPeriodMonthReset, + ) + from .create_company_override_request_body_value_type import CreateCompanyOverrideRequestBodyValueType + from .create_company_override_response import CreateCompanyOverrideResponse + from .create_plan_entitlement_request_body_metric_period import CreatePlanEntitlementRequestBodyMetricPeriod + from .create_plan_entitlement_request_body_metric_period_month_reset import ( + CreatePlanEntitlementRequestBodyMetricPeriodMonthReset, + ) + from .create_plan_entitlement_request_body_price_behavior import CreatePlanEntitlementRequestBodyPriceBehavior + from .create_plan_entitlement_request_body_value_type import CreatePlanEntitlementRequestBodyValueType + from .create_plan_entitlement_response import CreatePlanEntitlementResponse + from .delete_company_override_response import DeleteCompanyOverrideResponse + from .delete_plan_entitlement_response import DeletePlanEntitlementResponse + from .get_company_override_response import GetCompanyOverrideResponse + from .get_feature_usage_by_company_params import GetFeatureUsageByCompanyParams + from .get_feature_usage_by_company_response import GetFeatureUsageByCompanyResponse + from .get_plan_entitlement_response import GetPlanEntitlementResponse + from .list_company_overrides_params import ListCompanyOverridesParams + from .list_company_overrides_response import ListCompanyOverridesResponse + from .list_feature_companies_params import ListFeatureCompaniesParams + from .list_feature_companies_response import ListFeatureCompaniesResponse + from .list_feature_usage_params import ListFeatureUsageParams + from .list_feature_usage_response import ListFeatureUsageResponse + from .list_feature_users_params import ListFeatureUsersParams + from .list_feature_users_response import ListFeatureUsersResponse + from .list_plan_entitlements_params import ListPlanEntitlementsParams + from .list_plan_entitlements_response import ListPlanEntitlementsResponse + from .update_company_override_request_body_metric_period import UpdateCompanyOverrideRequestBodyMetricPeriod + from .update_company_override_request_body_metric_period_month_reset import ( + UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset, + ) + from .update_company_override_request_body_value_type import UpdateCompanyOverrideRequestBodyValueType + from .update_company_override_response import UpdateCompanyOverrideResponse + from .update_plan_entitlement_request_body_metric_period import UpdatePlanEntitlementRequestBodyMetricPeriod + from .update_plan_entitlement_request_body_metric_period_month_reset import ( + UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset, + ) + from .update_plan_entitlement_request_body_price_behavior import UpdatePlanEntitlementRequestBodyPriceBehavior + from .update_plan_entitlement_request_body_value_type import UpdatePlanEntitlementRequestBodyValueType + from .update_plan_entitlement_response import UpdatePlanEntitlementResponse +_dynamic_imports: typing.Dict[str, str] = { + "CountCompanyOverridesParams": ".count_company_overrides_params", + "CountCompanyOverridesResponse": ".count_company_overrides_response", + "CountFeatureCompaniesParams": ".count_feature_companies_params", + "CountFeatureCompaniesResponse": ".count_feature_companies_response", + "CountFeatureUsageParams": ".count_feature_usage_params", + "CountFeatureUsageResponse": ".count_feature_usage_response", + "CountFeatureUsersParams": ".count_feature_users_params", + "CountFeatureUsersResponse": ".count_feature_users_response", + "CountPlanEntitlementsParams": ".count_plan_entitlements_params", + "CountPlanEntitlementsResponse": ".count_plan_entitlements_response", + "CreateCompanyOverrideRequestBodyMetricPeriod": ".create_company_override_request_body_metric_period", + "CreateCompanyOverrideRequestBodyMetricPeriodMonthReset": ".create_company_override_request_body_metric_period_month_reset", + "CreateCompanyOverrideRequestBodyValueType": ".create_company_override_request_body_value_type", + "CreateCompanyOverrideResponse": ".create_company_override_response", + "CreatePlanEntitlementRequestBodyMetricPeriod": ".create_plan_entitlement_request_body_metric_period", + "CreatePlanEntitlementRequestBodyMetricPeriodMonthReset": ".create_plan_entitlement_request_body_metric_period_month_reset", + "CreatePlanEntitlementRequestBodyPriceBehavior": ".create_plan_entitlement_request_body_price_behavior", + "CreatePlanEntitlementRequestBodyValueType": ".create_plan_entitlement_request_body_value_type", + "CreatePlanEntitlementResponse": ".create_plan_entitlement_response", + "DeleteCompanyOverrideResponse": ".delete_company_override_response", + "DeletePlanEntitlementResponse": ".delete_plan_entitlement_response", + "GetCompanyOverrideResponse": ".get_company_override_response", + "GetFeatureUsageByCompanyParams": ".get_feature_usage_by_company_params", + "GetFeatureUsageByCompanyResponse": ".get_feature_usage_by_company_response", + "GetPlanEntitlementResponse": ".get_plan_entitlement_response", + "ListCompanyOverridesParams": ".list_company_overrides_params", + "ListCompanyOverridesResponse": ".list_company_overrides_response", + "ListFeatureCompaniesParams": ".list_feature_companies_params", + "ListFeatureCompaniesResponse": ".list_feature_companies_response", + "ListFeatureUsageParams": ".list_feature_usage_params", + "ListFeatureUsageResponse": ".list_feature_usage_response", + "ListFeatureUsersParams": ".list_feature_users_params", + "ListFeatureUsersResponse": ".list_feature_users_response", + "ListPlanEntitlementsParams": ".list_plan_entitlements_params", + "ListPlanEntitlementsResponse": ".list_plan_entitlements_response", + "UpdateCompanyOverrideRequestBodyMetricPeriod": ".update_company_override_request_body_metric_period", + "UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset": ".update_company_override_request_body_metric_period_month_reset", + "UpdateCompanyOverrideRequestBodyValueType": ".update_company_override_request_body_value_type", + "UpdateCompanyOverrideResponse": ".update_company_override_response", + "UpdatePlanEntitlementRequestBodyMetricPeriod": ".update_plan_entitlement_request_body_metric_period", + "UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset": ".update_plan_entitlement_request_body_metric_period_month_reset", + "UpdatePlanEntitlementRequestBodyPriceBehavior": ".update_plan_entitlement_request_body_price_behavior", + "UpdatePlanEntitlementRequestBodyValueType": ".update_plan_entitlement_request_body_value_type", + "UpdatePlanEntitlementResponse": ".update_plan_entitlement_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountCompanyOverridesParams", diff --git a/src/schematic/errors/__init__.py b/src/schematic/errors/__init__.py index af48fac..306a114 100644 --- a/src/schematic/errors/__init__.py +++ b/src/schematic/errors/__init__.py @@ -2,10 +2,43 @@ # isort: skip_file -from .bad_request_error import BadRequestError -from .forbidden_error import ForbiddenError -from .internal_server_error import InternalServerError -from .not_found_error import NotFoundError -from .unauthorized_error import UnauthorizedError +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .bad_request_error import BadRequestError + from .forbidden_error import ForbiddenError + from .internal_server_error import InternalServerError + from .not_found_error import NotFoundError + from .unauthorized_error import UnauthorizedError +_dynamic_imports: typing.Dict[str, str] = { + "BadRequestError": ".bad_request_error", + "ForbiddenError": ".forbidden_error", + "InternalServerError": ".internal_server_error", + "NotFoundError": ".not_found_error", + "UnauthorizedError": ".unauthorized_error", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["BadRequestError", "ForbiddenError", "InternalServerError", "NotFoundError", "UnauthorizedError"] diff --git a/src/schematic/events/__init__.py b/src/schematic/events/__init__.py index 7ec28c8..6e27f49 100644 --- a/src/schematic/events/__init__.py +++ b/src/schematic/events/__init__.py @@ -2,18 +2,56 @@ # isort: skip_file -from .types import ( - CreateEventBatchResponse, - CreateEventResponse, - GetEventResponse, - GetEventSummariesParams, - GetEventSummariesResponse, - GetSegmentIntegrationStatusResponse, - ListEventsParams, - ListEventsRequestEventTypesItem, - ListEventsResponse, - ListEventsResponseParamsEventTypesItem, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CreateEventBatchResponse, + CreateEventResponse, + GetEventResponse, + GetEventSummariesParams, + GetEventSummariesResponse, + GetSegmentIntegrationStatusResponse, + ListEventsParams, + ListEventsRequestEventTypesItem, + ListEventsResponse, + ListEventsResponseParamsEventTypesItem, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CreateEventBatchResponse": ".types", + "CreateEventResponse": ".types", + "GetEventResponse": ".types", + "GetEventSummariesParams": ".types", + "GetEventSummariesResponse": ".types", + "GetSegmentIntegrationStatusResponse": ".types", + "ListEventsParams": ".types", + "ListEventsRequestEventTypesItem": ".types", + "ListEventsResponse": ".types", + "ListEventsResponseParamsEventTypesItem": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CreateEventBatchResponse", diff --git a/src/schematic/events/types/__init__.py b/src/schematic/events/types/__init__.py index 6d21f25..3fe2c44 100644 --- a/src/schematic/events/types/__init__.py +++ b/src/schematic/events/types/__init__.py @@ -2,16 +2,54 @@ # isort: skip_file -from .create_event_batch_response import CreateEventBatchResponse -from .create_event_response import CreateEventResponse -from .get_event_response import GetEventResponse -from .get_event_summaries_params import GetEventSummariesParams -from .get_event_summaries_response import GetEventSummariesResponse -from .get_segment_integration_status_response import GetSegmentIntegrationStatusResponse -from .list_events_params import ListEventsParams -from .list_events_request_event_types_item import ListEventsRequestEventTypesItem -from .list_events_response import ListEventsResponse -from .list_events_response_params_event_types_item import ListEventsResponseParamsEventTypesItem +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_event_batch_response import CreateEventBatchResponse + from .create_event_response import CreateEventResponse + from .get_event_response import GetEventResponse + from .get_event_summaries_params import GetEventSummariesParams + from .get_event_summaries_response import GetEventSummariesResponse + from .get_segment_integration_status_response import GetSegmentIntegrationStatusResponse + from .list_events_params import ListEventsParams + from .list_events_request_event_types_item import ListEventsRequestEventTypesItem + from .list_events_response import ListEventsResponse + from .list_events_response_params_event_types_item import ListEventsResponseParamsEventTypesItem +_dynamic_imports: typing.Dict[str, str] = { + "CreateEventBatchResponse": ".create_event_batch_response", + "CreateEventResponse": ".create_event_response", + "GetEventResponse": ".get_event_response", + "GetEventSummariesParams": ".get_event_summaries_params", + "GetEventSummariesResponse": ".get_event_summaries_response", + "GetSegmentIntegrationStatusResponse": ".get_segment_integration_status_response", + "ListEventsParams": ".list_events_params", + "ListEventsRequestEventTypesItem": ".list_events_request_event_types_item", + "ListEventsResponse": ".list_events_response", + "ListEventsResponseParamsEventTypesItem": ".list_events_response_params_event_types_item", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CreateEventBatchResponse", diff --git a/src/schematic/features/__init__.py b/src/schematic/features/__init__.py index dd943f2..ac53e49 100644 --- a/src/schematic/features/__init__.py +++ b/src/schematic/features/__init__.py @@ -2,31 +2,82 @@ # isort: skip_file -from .types import ( - CheckFlagResponse, - CheckFlagsResponse, - CountFeaturesParams, - CountFeaturesResponse, - CountFlagsParams, - CountFlagsResponse, - CreateFeatureRequestBodyFeatureType, - CreateFeatureRequestBodyLifecyclePhase, - CreateFeatureResponse, - CreateFlagResponse, - DeleteFeatureResponse, - DeleteFlagResponse, - GetFeatureResponse, - GetFlagResponse, - ListFeaturesParams, - ListFeaturesResponse, - ListFlagsParams, - ListFlagsResponse, - UpdateFeatureRequestBodyFeatureType, - UpdateFeatureRequestBodyLifecyclePhase, - UpdateFeatureResponse, - UpdateFlagResponse, - UpdateFlagRulesResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CheckFlagResponse, + CheckFlagsResponse, + CountFeaturesParams, + CountFeaturesResponse, + CountFlagsParams, + CountFlagsResponse, + CreateFeatureRequestBodyFeatureType, + CreateFeatureRequestBodyLifecyclePhase, + CreateFeatureResponse, + CreateFlagResponse, + DeleteFeatureResponse, + DeleteFlagResponse, + GetFeatureResponse, + GetFlagResponse, + ListFeaturesParams, + ListFeaturesResponse, + ListFlagsParams, + ListFlagsResponse, + UpdateFeatureRequestBodyFeatureType, + UpdateFeatureRequestBodyLifecyclePhase, + UpdateFeatureResponse, + UpdateFlagResponse, + UpdateFlagRulesResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CheckFlagResponse": ".types", + "CheckFlagsResponse": ".types", + "CountFeaturesParams": ".types", + "CountFeaturesResponse": ".types", + "CountFlagsParams": ".types", + "CountFlagsResponse": ".types", + "CreateFeatureRequestBodyFeatureType": ".types", + "CreateFeatureRequestBodyLifecyclePhase": ".types", + "CreateFeatureResponse": ".types", + "CreateFlagResponse": ".types", + "DeleteFeatureResponse": ".types", + "DeleteFlagResponse": ".types", + "GetFeatureResponse": ".types", + "GetFlagResponse": ".types", + "ListFeaturesParams": ".types", + "ListFeaturesResponse": ".types", + "ListFlagsParams": ".types", + "ListFlagsResponse": ".types", + "UpdateFeatureRequestBodyFeatureType": ".types", + "UpdateFeatureRequestBodyLifecyclePhase": ".types", + "UpdateFeatureResponse": ".types", + "UpdateFlagResponse": ".types", + "UpdateFlagRulesResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CheckFlagResponse", diff --git a/src/schematic/features/types/__init__.py b/src/schematic/features/types/__init__.py index 9dd4294..d39a1e9 100644 --- a/src/schematic/features/types/__init__.py +++ b/src/schematic/features/types/__init__.py @@ -2,29 +2,80 @@ # isort: skip_file -from .check_flag_response import CheckFlagResponse -from .check_flags_response import CheckFlagsResponse -from .count_features_params import CountFeaturesParams -from .count_features_response import CountFeaturesResponse -from .count_flags_params import CountFlagsParams -from .count_flags_response import CountFlagsResponse -from .create_feature_request_body_feature_type import CreateFeatureRequestBodyFeatureType -from .create_feature_request_body_lifecycle_phase import CreateFeatureRequestBodyLifecyclePhase -from .create_feature_response import CreateFeatureResponse -from .create_flag_response import CreateFlagResponse -from .delete_feature_response import DeleteFeatureResponse -from .delete_flag_response import DeleteFlagResponse -from .get_feature_response import GetFeatureResponse -from .get_flag_response import GetFlagResponse -from .list_features_params import ListFeaturesParams -from .list_features_response import ListFeaturesResponse -from .list_flags_params import ListFlagsParams -from .list_flags_response import ListFlagsResponse -from .update_feature_request_body_feature_type import UpdateFeatureRequestBodyFeatureType -from .update_feature_request_body_lifecycle_phase import UpdateFeatureRequestBodyLifecyclePhase -from .update_feature_response import UpdateFeatureResponse -from .update_flag_response import UpdateFlagResponse -from .update_flag_rules_response import UpdateFlagRulesResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .check_flag_response import CheckFlagResponse + from .check_flags_response import CheckFlagsResponse + from .count_features_params import CountFeaturesParams + from .count_features_response import CountFeaturesResponse + from .count_flags_params import CountFlagsParams + from .count_flags_response import CountFlagsResponse + from .create_feature_request_body_feature_type import CreateFeatureRequestBodyFeatureType + from .create_feature_request_body_lifecycle_phase import CreateFeatureRequestBodyLifecyclePhase + from .create_feature_response import CreateFeatureResponse + from .create_flag_response import CreateFlagResponse + from .delete_feature_response import DeleteFeatureResponse + from .delete_flag_response import DeleteFlagResponse + from .get_feature_response import GetFeatureResponse + from .get_flag_response import GetFlagResponse + from .list_features_params import ListFeaturesParams + from .list_features_response import ListFeaturesResponse + from .list_flags_params import ListFlagsParams + from .list_flags_response import ListFlagsResponse + from .update_feature_request_body_feature_type import UpdateFeatureRequestBodyFeatureType + from .update_feature_request_body_lifecycle_phase import UpdateFeatureRequestBodyLifecyclePhase + from .update_feature_response import UpdateFeatureResponse + from .update_flag_response import UpdateFlagResponse + from .update_flag_rules_response import UpdateFlagRulesResponse +_dynamic_imports: typing.Dict[str, str] = { + "CheckFlagResponse": ".check_flag_response", + "CheckFlagsResponse": ".check_flags_response", + "CountFeaturesParams": ".count_features_params", + "CountFeaturesResponse": ".count_features_response", + "CountFlagsParams": ".count_flags_params", + "CountFlagsResponse": ".count_flags_response", + "CreateFeatureRequestBodyFeatureType": ".create_feature_request_body_feature_type", + "CreateFeatureRequestBodyLifecyclePhase": ".create_feature_request_body_lifecycle_phase", + "CreateFeatureResponse": ".create_feature_response", + "CreateFlagResponse": ".create_flag_response", + "DeleteFeatureResponse": ".delete_feature_response", + "DeleteFlagResponse": ".delete_flag_response", + "GetFeatureResponse": ".get_feature_response", + "GetFlagResponse": ".get_flag_response", + "ListFeaturesParams": ".list_features_params", + "ListFeaturesResponse": ".list_features_response", + "ListFlagsParams": ".list_flags_params", + "ListFlagsResponse": ".list_flags_response", + "UpdateFeatureRequestBodyFeatureType": ".update_feature_request_body_feature_type", + "UpdateFeatureRequestBodyLifecyclePhase": ".update_feature_request_body_lifecycle_phase", + "UpdateFeatureResponse": ".update_feature_response", + "UpdateFlagResponse": ".update_flag_response", + "UpdateFlagRulesResponse": ".update_flag_rules_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CheckFlagResponse", diff --git a/src/schematic/plangroups/__init__.py b/src/schematic/plangroups/__init__.py index 88815c8..e80605f 100644 --- a/src/schematic/plangroups/__init__.py +++ b/src/schematic/plangroups/__init__.py @@ -2,6 +2,37 @@ # isort: skip_file -from .types import CreatePlanGroupResponse, GetPlanGroupResponse, UpdatePlanGroupResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import CreatePlanGroupResponse, GetPlanGroupResponse, UpdatePlanGroupResponse +_dynamic_imports: typing.Dict[str, str] = { + "CreatePlanGroupResponse": ".types", + "GetPlanGroupResponse": ".types", + "UpdatePlanGroupResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["CreatePlanGroupResponse", "GetPlanGroupResponse", "UpdatePlanGroupResponse"] diff --git a/src/schematic/plangroups/types/__init__.py b/src/schematic/plangroups/types/__init__.py index 1019948..458fd49 100644 --- a/src/schematic/plangroups/types/__init__.py +++ b/src/schematic/plangroups/types/__init__.py @@ -2,8 +2,39 @@ # isort: skip_file -from .create_plan_group_response import CreatePlanGroupResponse -from .get_plan_group_response import GetPlanGroupResponse -from .update_plan_group_response import UpdatePlanGroupResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .create_plan_group_response import CreatePlanGroupResponse + from .get_plan_group_response import GetPlanGroupResponse + from .update_plan_group_response import UpdatePlanGroupResponse +_dynamic_imports: typing.Dict[str, str] = { + "CreatePlanGroupResponse": ".create_plan_group_response", + "GetPlanGroupResponse": ".get_plan_group_response", + "UpdatePlanGroupResponse": ".update_plan_group_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = ["CreatePlanGroupResponse", "GetPlanGroupResponse", "UpdatePlanGroupResponse"] diff --git a/src/schematic/plans/__init__.py b/src/schematic/plans/__init__.py index c57f2e7..fb9f17d 100644 --- a/src/schematic/plans/__init__.py +++ b/src/schematic/plans/__init__.py @@ -2,26 +2,72 @@ # isort: skip_file -from .types import ( - CountPlansParams, - CountPlansRequestPlanType, - CountPlansResponse, - CountPlansResponseParamsPlanType, - CreatePlanRequestBodyPlanType, - CreatePlanResponse, - DeletePlanResponse, - GetPlanResponse, - ListPlanIssuesParams, - ListPlanIssuesResponse, - ListPlansParams, - ListPlansRequestPlanType, - ListPlansResponse, - ListPlansResponseParamsPlanType, - UpdateCompanyPlansResponse, - UpdatePlanResponse, - UpsertBillingProductPlanResponse, - UpsertBillingProductRequestBodyChargeType, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CountPlansParams, + CountPlansRequestPlanType, + CountPlansResponse, + CountPlansResponseParamsPlanType, + CreatePlanRequestBodyPlanType, + CreatePlanResponse, + DeletePlanResponse, + GetPlanResponse, + ListPlanIssuesParams, + ListPlanIssuesResponse, + ListPlansParams, + ListPlansRequestPlanType, + ListPlansResponse, + ListPlansResponseParamsPlanType, + UpdateCompanyPlansResponse, + UpdatePlanResponse, + UpsertBillingProductPlanResponse, + UpsertBillingProductRequestBodyChargeType, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CountPlansParams": ".types", + "CountPlansRequestPlanType": ".types", + "CountPlansResponse": ".types", + "CountPlansResponseParamsPlanType": ".types", + "CreatePlanRequestBodyPlanType": ".types", + "CreatePlanResponse": ".types", + "DeletePlanResponse": ".types", + "GetPlanResponse": ".types", + "ListPlanIssuesParams": ".types", + "ListPlanIssuesResponse": ".types", + "ListPlansParams": ".types", + "ListPlansRequestPlanType": ".types", + "ListPlansResponse": ".types", + "ListPlansResponseParamsPlanType": ".types", + "UpdateCompanyPlansResponse": ".types", + "UpdatePlanResponse": ".types", + "UpsertBillingProductPlanResponse": ".types", + "UpsertBillingProductRequestBodyChargeType": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountPlansParams", diff --git a/src/schematic/plans/types/__init__.py b/src/schematic/plans/types/__init__.py index 6dcd77b..da619d2 100644 --- a/src/schematic/plans/types/__init__.py +++ b/src/schematic/plans/types/__init__.py @@ -2,24 +2,70 @@ # isort: skip_file -from .count_plans_params import CountPlansParams -from .count_plans_request_plan_type import CountPlansRequestPlanType -from .count_plans_response import CountPlansResponse -from .count_plans_response_params_plan_type import CountPlansResponseParamsPlanType -from .create_plan_request_body_plan_type import CreatePlanRequestBodyPlanType -from .create_plan_response import CreatePlanResponse -from .delete_plan_response import DeletePlanResponse -from .get_plan_response import GetPlanResponse -from .list_plan_issues_params import ListPlanIssuesParams -from .list_plan_issues_response import ListPlanIssuesResponse -from .list_plans_params import ListPlansParams -from .list_plans_request_plan_type import ListPlansRequestPlanType -from .list_plans_response import ListPlansResponse -from .list_plans_response_params_plan_type import ListPlansResponseParamsPlanType -from .update_company_plans_response import UpdateCompanyPlansResponse -from .update_plan_response import UpdatePlanResponse -from .upsert_billing_product_plan_response import UpsertBillingProductPlanResponse -from .upsert_billing_product_request_body_charge_type import UpsertBillingProductRequestBodyChargeType +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .count_plans_params import CountPlansParams + from .count_plans_request_plan_type import CountPlansRequestPlanType + from .count_plans_response import CountPlansResponse + from .count_plans_response_params_plan_type import CountPlansResponseParamsPlanType + from .create_plan_request_body_plan_type import CreatePlanRequestBodyPlanType + from .create_plan_response import CreatePlanResponse + from .delete_plan_response import DeletePlanResponse + from .get_plan_response import GetPlanResponse + from .list_plan_issues_params import ListPlanIssuesParams + from .list_plan_issues_response import ListPlanIssuesResponse + from .list_plans_params import ListPlansParams + from .list_plans_request_plan_type import ListPlansRequestPlanType + from .list_plans_response import ListPlansResponse + from .list_plans_response_params_plan_type import ListPlansResponseParamsPlanType + from .update_company_plans_response import UpdateCompanyPlansResponse + from .update_plan_response import UpdatePlanResponse + from .upsert_billing_product_plan_response import UpsertBillingProductPlanResponse + from .upsert_billing_product_request_body_charge_type import UpsertBillingProductRequestBodyChargeType +_dynamic_imports: typing.Dict[str, str] = { + "CountPlansParams": ".count_plans_params", + "CountPlansRequestPlanType": ".count_plans_request_plan_type", + "CountPlansResponse": ".count_plans_response", + "CountPlansResponseParamsPlanType": ".count_plans_response_params_plan_type", + "CreatePlanRequestBodyPlanType": ".create_plan_request_body_plan_type", + "CreatePlanResponse": ".create_plan_response", + "DeletePlanResponse": ".delete_plan_response", + "GetPlanResponse": ".get_plan_response", + "ListPlanIssuesParams": ".list_plan_issues_params", + "ListPlanIssuesResponse": ".list_plan_issues_response", + "ListPlansParams": ".list_plans_params", + "ListPlansRequestPlanType": ".list_plans_request_plan_type", + "ListPlansResponse": ".list_plans_response", + "ListPlansResponseParamsPlanType": ".list_plans_response_params_plan_type", + "UpdateCompanyPlansResponse": ".update_company_plans_response", + "UpdatePlanResponse": ".update_plan_response", + "UpsertBillingProductPlanResponse": ".upsert_billing_product_plan_response", + "UpsertBillingProductRequestBodyChargeType": ".upsert_billing_product_request_body_charge_type", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountPlansParams", diff --git a/src/schematic/types/__init__.py b/src/schematic/types/__init__.py index 86d8efa..a0b6df6 100644 --- a/src/schematic/types/__init__.py +++ b/src/schematic/types/__init__.py @@ -2,212 +2,448 @@ # isort: skip_file -from .api_error import ApiError -from .api_key_create_response_data import ApiKeyCreateResponseData -from .api_key_request_list_response_data import ApiKeyRequestListResponseData -from .api_key_request_response_data import ApiKeyRequestResponseData -from .api_key_response_data import ApiKeyResponseData -from .billing_coupon_response_data import BillingCouponResponseData -from .billing_credit_bundle_response_data import BillingCreditBundleResponseData -from .billing_credit_bundle_view import BillingCreditBundleView -from .billing_credit_grant_response_data import BillingCreditGrantResponseData -from .billing_credit_ledger_response_data import BillingCreditLedgerResponseData -from .billing_credit_response_data import BillingCreditResponseData -from .billing_customer_response_data import BillingCustomerResponseData -from .billing_customer_subscription import BillingCustomerSubscription -from .billing_customer_with_subscriptions_response_data import BillingCustomerWithSubscriptionsResponseData -from .billing_meter_response_data import BillingMeterResponseData -from .billing_plan_credit_grant_response_data import BillingPlanCreditGrantResponseData -from .billing_price_response_data import BillingPriceResponseData -from .billing_price_view import BillingPriceView -from .billing_product_detail_response_data import BillingProductDetailResponseData -from .billing_product_for_subscription_response_data import BillingProductForSubscriptionResponseData -from .billing_product_plan_response_data import BillingProductPlanResponseData -from .billing_product_price_response_data import BillingProductPriceResponseData -from .billing_product_price_tier_response_data import BillingProductPriceTierResponseData -from .billing_product_pricing import BillingProductPricing -from .billing_product_pricing_usage_type import BillingProductPricingUsageType -from .billing_product_response_data import BillingProductResponseData -from .billing_subscription_discount import BillingSubscriptionDiscount -from .billing_subscription_discount_view import BillingSubscriptionDiscountView -from .billing_subscription_response_data import BillingSubscriptionResponseData -from .billing_subscription_view import BillingSubscriptionView -from .change_subscription_internal_request_body import ChangeSubscriptionInternalRequestBody -from .change_subscription_request_body import ChangeSubscriptionRequestBody -from .check_flag_request_body import CheckFlagRequestBody -from .check_flag_response_data import CheckFlagResponseData -from .check_flags_response_data import CheckFlagsResponseData -from .checkout_data_response_data import CheckoutDataResponseData -from .checkout_settings_response_data import CheckoutSettingsResponseData -from .checkout_subscription import CheckoutSubscription -from .company_crm_deals_response_data import CompanyCrmDealsResponseData -from .company_detail_response_data import CompanyDetailResponseData -from .company_event_period_metrics_response_data import CompanyEventPeriodMetricsResponseData -from .company_ledger_response_data import CompanyLedgerResponseData -from .company_membership_detail_response_data import CompanyMembershipDetailResponseData -from .company_membership_response_data import CompanyMembershipResponseData -from .company_override_note_response_data import CompanyOverrideNoteResponseData -from .company_override_response_data import CompanyOverrideResponseData -from .company_plan_detail_response_data import CompanyPlanDetailResponseData -from .company_plan_with_billing_sub_view import CompanyPlanWithBillingSubView -from .company_response_data import CompanyResponseData -from .company_subscription_response_data import CompanySubscriptionResponseData -from .company_view_with_feature_usage_response_data import CompanyViewWithFeatureUsageResponseData -from .compatible_plans import CompatiblePlans -from .compatible_plans_response_data import CompatiblePlansResponseData -from .component_capabilities import ComponentCapabilities -from .component_checkout_settings import ComponentCheckoutSettings -from .component_hydrate_response_data import ComponentHydrateResponseData -from .component_preview_response_data import ComponentPreviewResponseData -from .component_response_data import ComponentResponseData -from .condition import Condition -from .condition_group import ConditionGroup -from .count_response import CountResponse -from .coupon_request_body import CouponRequestBody -from .create_billing_price_tier_request_body import CreateBillingPriceTierRequestBody -from .create_entitlement_req_common import CreateEntitlementReqCommon -from .create_entitlement_req_common_metric_period import CreateEntitlementReqCommonMetricPeriod -from .create_entitlement_req_common_metric_period_month_reset import CreateEntitlementReqCommonMetricPeriodMonthReset -from .create_entitlement_req_common_value_type import CreateEntitlementReqCommonValueType -from .create_event_request_body import CreateEventRequestBody -from .create_event_request_body_event_type import CreateEventRequestBodyEventType -from .create_flag_request_body import CreateFlagRequestBody -from .create_or_update_condition_group_request_body import CreateOrUpdateConditionGroupRequestBody -from .create_or_update_condition_request_body import CreateOrUpdateConditionRequestBody -from .create_or_update_condition_request_body_condition_type import CreateOrUpdateConditionRequestBodyConditionType -from .create_or_update_condition_request_body_metric_period import CreateOrUpdateConditionRequestBodyMetricPeriod -from .create_or_update_condition_request_body_metric_period_month_reset import ( - CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset, -) -from .create_or_update_condition_request_body_operator import CreateOrUpdateConditionRequestBodyOperator -from .create_or_update_flag_request_body import CreateOrUpdateFlagRequestBody -from .create_or_update_rule_request_body import CreateOrUpdateRuleRequestBody -from .create_or_update_rule_request_body_rule_type import CreateOrUpdateRuleRequestBodyRuleType -from .create_price_tier_request_body import CreatePriceTierRequestBody -from .credit_bundle_purchase_response_data import CreditBundlePurchaseResponseData -from .credit_company_grant_view import CreditCompanyGrantView -from .credit_grant_detail import CreditGrantDetail -from .credit_grant_detail_grant_reason import CreditGrantDetailGrantReason -from .credit_ledger_enriched_entry_response_data import CreditLedgerEnrichedEntryResponseData -from .credit_trigger_config import CreditTriggerConfig -from .credit_usage import CreditUsage -from .credit_usage_response_data import CreditUsageResponseData -from .crm_deal_line_item import CrmDealLineItem -from .crm_deal_response_data import CrmDealResponseData -from .crm_line_item_response_data import CrmLineItemResponseData -from .crm_product_response_data import CrmProductResponseData -from .custom_plan_config import CustomPlanConfig -from .custom_plan_view_config_response_data import CustomPlanViewConfigResponseData -from .data_export_response_data import DataExportResponseData -from .decimal import Decimal -from .delete_response import DeleteResponse -from .entitlement_trigger_config import EntitlementTriggerConfig -from .entitlements_in_plan import EntitlementsInPlan -from .entity_key_definition_response_data import EntityKeyDefinitionResponseData -from .entity_key_detail_response_data import EntityKeyDetailResponseData -from .entity_key_response_data import EntityKeyResponseData -from .entity_trait_definition_response_data import EntityTraitDefinitionResponseData -from .entity_trait_detail_response_data import EntityTraitDetailResponseData -from .entity_trait_response_data import EntityTraitResponseData -from .entity_trait_value import EntityTraitValue -from .environment_detail_response_data import EnvironmentDetailResponseData -from .environment_response_data import EnvironmentResponseData -from .event_body import EventBody -from .event_body_flag_check import EventBodyFlagCheck -from .event_body_identify import EventBodyIdentify -from .event_body_identify_company import EventBodyIdentifyCompany -from .event_body_track import EventBodyTrack -from .event_detail_response_data import EventDetailResponseData -from .event_response_data import EventResponseData -from .event_summary_response_data import EventSummaryResponseData -from .feature_company_response_data import FeatureCompanyResponseData -from .feature_company_response_data_allocation_type import FeatureCompanyResponseDataAllocationType -from .feature_company_response_data_credit_grant_reason import FeatureCompanyResponseDataCreditGrantReason -from .feature_company_user_response_data import FeatureCompanyUserResponseData -from .feature_company_user_response_data_allocation_type import FeatureCompanyUserResponseDataAllocationType -from .feature_detail_response_data import FeatureDetailResponseData -from .feature_ledger_response_data import FeatureLedgerResponseData -from .feature_response_data import FeatureResponseData -from .feature_usage_data_response_data import FeatureUsageDataResponseData -from .feature_usage_detail_response_data import FeatureUsageDetailResponseData -from .feature_usage_response_data import FeatureUsageResponseData -from .feature_usage_response_data_allocation_type import FeatureUsageResponseDataAllocationType -from .feature_usage_response_data_credit_grant_reason import FeatureUsageResponseDataCreditGrantReason -from .flag_detail_response_data import FlagDetailResponseData -from .flag_response_data import FlagResponseData -from .generic_preview_object import GenericPreviewObject -from .invoice_request_body import InvoiceRequestBody -from .invoice_response_data import InvoiceResponseData -from .issue_temporary_access_token_response_data import IssueTemporaryAccessTokenResponseData -from .keys_request_body import KeysRequestBody -from .manage_plan_preview_response_response_data import ManagePlanPreviewResponseResponseData -from .manage_plan_request import ManagePlanRequest -from .manage_plan_response_response_data import ManagePlanResponseResponseData -from .meter_request_body import MeterRequestBody -from .ordered_plans_in_group import OrderedPlansInGroup -from .payment_method_request_body import PaymentMethodRequestBody -from .payment_method_response_data import PaymentMethodResponseData -from .plan_change_response_data import PlanChangeResponseData -from .plan_change_response_data_action import PlanChangeResponseDataAction -from .plan_change_response_data_actor_type import PlanChangeResponseDataActorType -from .plan_change_response_data_base_plan_action import PlanChangeResponseDataBasePlanAction -from .plan_change_response_data_subscription_change_action import PlanChangeResponseDataSubscriptionChangeAction -from .plan_credit_grant_view import PlanCreditGrantView -from .plan_detail_response_data import PlanDetailResponseData -from .plan_entitlement_response_data import PlanEntitlementResponseData -from .plan_entitlements_order import PlanEntitlementsOrder -from .plan_group_bundle_order import PlanGroupBundleOrder -from .plan_group_detail_response_data import PlanGroupDetailResponseData -from .plan_group_plan_detail_response_data import PlanGroupPlanDetailResponseData -from .plan_group_plan_entitlements_order import PlanGroupPlanEntitlementsOrder -from .plan_group_response_data import PlanGroupResponseData -from .plan_issue_response_data import PlanIssueResponseData -from .plan_response_data import PlanResponseData -from .plan_selection import PlanSelection -from .plan_snapshot_view import PlanSnapshotView -from .plan_trait_response_data import PlanTraitResponseData -from .preview_object import PreviewObject -from .preview_object_response_data import PreviewObjectResponseData -from .preview_subscription_change_response_data import PreviewSubscriptionChangeResponseData -from .preview_subscription_finance_response_data import PreviewSubscriptionFinanceResponseData -from .preview_subscription_upcoming_invoice_line_items import PreviewSubscriptionUpcomingInvoiceLineItems -from .quickstart_resp import QuickstartResp -from .raw_event_batch_response_data import RawEventBatchResponseData -from .raw_event_response_data import RawEventResponseData -from .rule import Rule -from .rule_condition_detail_response_data import RuleConditionDetailResponseData -from .rule_condition_group_detail_response_data import RuleConditionGroupDetailResponseData -from .rule_condition_group_response_data import RuleConditionGroupResponseData -from .rule_condition_response_data import RuleConditionResponseData -from .rule_detail_response_data import RuleDetailResponseData -from .rule_response_data import RuleResponseData -from .rules_detail_response_data import RulesDetailResponseData -from .segment_status_resp import SegmentStatusResp -from .stripe_embed_info import StripeEmbedInfo -from .subscription_trait_update import SubscriptionTraitUpdate -from .temporary_access_token_response_data import TemporaryAccessTokenResponseData -from .trait_definition import TraitDefinition -from .update_add_on_request_body import UpdateAddOnRequestBody -from .update_credit_bundle_request_body import UpdateCreditBundleRequestBody -from .update_entitlement_req_common import UpdateEntitlementReqCommon -from .update_entitlement_req_common_metric_period import UpdateEntitlementReqCommonMetricPeriod -from .update_entitlement_req_common_metric_period_month_reset import UpdateEntitlementReqCommonMetricPeriodMonthReset -from .update_entitlement_req_common_value_type import UpdateEntitlementReqCommonValueType -from .update_pay_in_advance_request_body import UpdatePayInAdvanceRequestBody -from .update_plan_trait_trait_request_body import UpdatePlanTraitTraitRequestBody -from .update_rule_request_body import UpdateRuleRequestBody -from .upsert_company_request_body import UpsertCompanyRequestBody -from .upsert_trait_request_body import UpsertTraitRequestBody -from .upsert_user_request_body import UpsertUserRequestBody -from .upsert_user_sub_request_body import UpsertUserSubRequestBody -from .usage_based_entitlement_request_body import UsageBasedEntitlementRequestBody -from .usage_based_entitlement_request_body_price_behavior import UsageBasedEntitlementRequestBodyPriceBehavior -from .usage_based_entitlement_response_data import UsageBasedEntitlementResponseData -from .user_detail_response_data import UserDetailResponseData -from .user_response_data import UserResponseData -from .webhook_event_detail_response_data import WebhookEventDetailResponseData -from .webhook_event_response_data import WebhookEventResponseData -from .webhook_response_data import WebhookResponseData +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .api_error import ApiError + from .api_key_create_response_data import ApiKeyCreateResponseData + from .api_key_request_list_response_data import ApiKeyRequestListResponseData + from .api_key_request_response_data import ApiKeyRequestResponseData + from .api_key_response_data import ApiKeyResponseData + from .billing_coupon_response_data import BillingCouponResponseData + from .billing_credit_bundle_response_data import BillingCreditBundleResponseData + from .billing_credit_bundle_view import BillingCreditBundleView + from .billing_credit_grant_response_data import BillingCreditGrantResponseData + from .billing_credit_ledger_response_data import BillingCreditLedgerResponseData + from .billing_credit_response_data import BillingCreditResponseData + from .billing_customer_response_data import BillingCustomerResponseData + from .billing_customer_subscription import BillingCustomerSubscription + from .billing_customer_with_subscriptions_response_data import BillingCustomerWithSubscriptionsResponseData + from .billing_meter_response_data import BillingMeterResponseData + from .billing_plan_credit_grant_response_data import BillingPlanCreditGrantResponseData + from .billing_price_response_data import BillingPriceResponseData + from .billing_price_view import BillingPriceView + from .billing_product_detail_response_data import BillingProductDetailResponseData + from .billing_product_for_subscription_response_data import BillingProductForSubscriptionResponseData + from .billing_product_plan_response_data import BillingProductPlanResponseData + from .billing_product_price_response_data import BillingProductPriceResponseData + from .billing_product_price_tier_response_data import BillingProductPriceTierResponseData + from .billing_product_pricing import BillingProductPricing + from .billing_product_pricing_usage_type import BillingProductPricingUsageType + from .billing_product_response_data import BillingProductResponseData + from .billing_subscription_discount import BillingSubscriptionDiscount + from .billing_subscription_discount_view import BillingSubscriptionDiscountView + from .billing_subscription_response_data import BillingSubscriptionResponseData + from .billing_subscription_view import BillingSubscriptionView + from .change_subscription_internal_request_body import ChangeSubscriptionInternalRequestBody + from .change_subscription_request_body import ChangeSubscriptionRequestBody + from .check_flag_request_body import CheckFlagRequestBody + from .check_flag_response_data import CheckFlagResponseData + from .check_flags_response_data import CheckFlagsResponseData + from .checkout_data_response_data import CheckoutDataResponseData + from .checkout_settings_response_data import CheckoutSettingsResponseData + from .checkout_subscription import CheckoutSubscription + from .company_crm_deals_response_data import CompanyCrmDealsResponseData + from .company_detail_response_data import CompanyDetailResponseData + from .company_event_period_metrics_response_data import CompanyEventPeriodMetricsResponseData + from .company_ledger_response_data import CompanyLedgerResponseData + from .company_membership_detail_response_data import CompanyMembershipDetailResponseData + from .company_membership_response_data import CompanyMembershipResponseData + from .company_override_note_response_data import CompanyOverrideNoteResponseData + from .company_override_response_data import CompanyOverrideResponseData + from .company_plan_detail_response_data import CompanyPlanDetailResponseData + from .company_plan_with_billing_sub_view import CompanyPlanWithBillingSubView + from .company_response_data import CompanyResponseData + from .company_subscription_response_data import CompanySubscriptionResponseData + from .company_view_with_feature_usage_response_data import CompanyViewWithFeatureUsageResponseData + from .compatible_plans import CompatiblePlans + from .compatible_plans_response_data import CompatiblePlansResponseData + from .component_capabilities import ComponentCapabilities + from .component_checkout_settings import ComponentCheckoutSettings + from .component_hydrate_response_data import ComponentHydrateResponseData + from .component_preview_response_data import ComponentPreviewResponseData + from .component_response_data import ComponentResponseData + from .condition import Condition + from .condition_group import ConditionGroup + from .count_response import CountResponse + from .coupon_request_body import CouponRequestBody + from .create_billing_price_tier_request_body import CreateBillingPriceTierRequestBody + from .create_entitlement_req_common import CreateEntitlementReqCommon + from .create_entitlement_req_common_metric_period import CreateEntitlementReqCommonMetricPeriod + from .create_entitlement_req_common_metric_period_month_reset import ( + CreateEntitlementReqCommonMetricPeriodMonthReset, + ) + from .create_entitlement_req_common_value_type import CreateEntitlementReqCommonValueType + from .create_event_request_body import CreateEventRequestBody + from .create_event_request_body_event_type import CreateEventRequestBodyEventType + from .create_flag_request_body import CreateFlagRequestBody + from .create_or_update_condition_group_request_body import CreateOrUpdateConditionGroupRequestBody + from .create_or_update_condition_request_body import CreateOrUpdateConditionRequestBody + from .create_or_update_condition_request_body_condition_type import CreateOrUpdateConditionRequestBodyConditionType + from .create_or_update_condition_request_body_metric_period import CreateOrUpdateConditionRequestBodyMetricPeriod + from .create_or_update_condition_request_body_metric_period_month_reset import ( + CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset, + ) + from .create_or_update_condition_request_body_operator import CreateOrUpdateConditionRequestBodyOperator + from .create_or_update_flag_request_body import CreateOrUpdateFlagRequestBody + from .create_or_update_rule_request_body import CreateOrUpdateRuleRequestBody + from .create_or_update_rule_request_body_rule_type import CreateOrUpdateRuleRequestBodyRuleType + from .create_price_tier_request_body import CreatePriceTierRequestBody + from .credit_bundle_purchase_response_data import CreditBundlePurchaseResponseData + from .credit_company_grant_view import CreditCompanyGrantView + from .credit_grant_detail import CreditGrantDetail + from .credit_grant_detail_grant_reason import CreditGrantDetailGrantReason + from .credit_ledger_enriched_entry_response_data import CreditLedgerEnrichedEntryResponseData + from .credit_trigger_config import CreditTriggerConfig + from .credit_usage import CreditUsage + from .credit_usage_response_data import CreditUsageResponseData + from .crm_deal_line_item import CrmDealLineItem + from .crm_deal_response_data import CrmDealResponseData + from .crm_line_item_response_data import CrmLineItemResponseData + from .crm_product_response_data import CrmProductResponseData + from .custom_plan_config import CustomPlanConfig + from .custom_plan_view_config_response_data import CustomPlanViewConfigResponseData + from .data_export_response_data import DataExportResponseData + from .decimal import Decimal + from .delete_response import DeleteResponse + from .entitlement_trigger_config import EntitlementTriggerConfig + from .entitlements_in_plan import EntitlementsInPlan + from .entity_key_definition_response_data import EntityKeyDefinitionResponseData + from .entity_key_detail_response_data import EntityKeyDetailResponseData + from .entity_key_response_data import EntityKeyResponseData + from .entity_trait_definition_response_data import EntityTraitDefinitionResponseData + from .entity_trait_detail_response_data import EntityTraitDetailResponseData + from .entity_trait_response_data import EntityTraitResponseData + from .entity_trait_value import EntityTraitValue + from .environment_detail_response_data import EnvironmentDetailResponseData + from .environment_response_data import EnvironmentResponseData + from .event_body import EventBody + from .event_body_flag_check import EventBodyFlagCheck + from .event_body_identify import EventBodyIdentify + from .event_body_identify_company import EventBodyIdentifyCompany + from .event_body_track import EventBodyTrack + from .event_detail_response_data import EventDetailResponseData + from .event_response_data import EventResponseData + from .event_summary_response_data import EventSummaryResponseData + from .feature_company_response_data import FeatureCompanyResponseData + from .feature_company_response_data_allocation_type import FeatureCompanyResponseDataAllocationType + from .feature_company_response_data_credit_grant_reason import FeatureCompanyResponseDataCreditGrantReason + from .feature_company_user_response_data import FeatureCompanyUserResponseData + from .feature_company_user_response_data_allocation_type import FeatureCompanyUserResponseDataAllocationType + from .feature_detail_response_data import FeatureDetailResponseData + from .feature_ledger_response_data import FeatureLedgerResponseData + from .feature_response_data import FeatureResponseData + from .feature_usage_data_response_data import FeatureUsageDataResponseData + from .feature_usage_detail_response_data import FeatureUsageDetailResponseData + from .feature_usage_response_data import FeatureUsageResponseData + from .feature_usage_response_data_allocation_type import FeatureUsageResponseDataAllocationType + from .feature_usage_response_data_credit_grant_reason import FeatureUsageResponseDataCreditGrantReason + from .flag_detail_response_data import FlagDetailResponseData + from .flag_response_data import FlagResponseData + from .generic_preview_object import GenericPreviewObject + from .invoice_request_body import InvoiceRequestBody + from .invoice_response_data import InvoiceResponseData + from .issue_temporary_access_token_response_data import IssueTemporaryAccessTokenResponseData + from .keys_request_body import KeysRequestBody + from .manage_plan_preview_response_response_data import ManagePlanPreviewResponseResponseData + from .manage_plan_request import ManagePlanRequest + from .manage_plan_response_response_data import ManagePlanResponseResponseData + from .meter_request_body import MeterRequestBody + from .ordered_plans_in_group import OrderedPlansInGroup + from .payment_method_request_body import PaymentMethodRequestBody + from .payment_method_response_data import PaymentMethodResponseData + from .plan_change_response_data import PlanChangeResponseData + from .plan_change_response_data_action import PlanChangeResponseDataAction + from .plan_change_response_data_actor_type import PlanChangeResponseDataActorType + from .plan_change_response_data_base_plan_action import PlanChangeResponseDataBasePlanAction + from .plan_change_response_data_subscription_change_action import PlanChangeResponseDataSubscriptionChangeAction + from .plan_credit_grant_view import PlanCreditGrantView + from .plan_detail_response_data import PlanDetailResponseData + from .plan_entitlement_response_data import PlanEntitlementResponseData + from .plan_entitlements_order import PlanEntitlementsOrder + from .plan_group_bundle_order import PlanGroupBundleOrder + from .plan_group_detail_response_data import PlanGroupDetailResponseData + from .plan_group_plan_detail_response_data import PlanGroupPlanDetailResponseData + from .plan_group_plan_entitlements_order import PlanGroupPlanEntitlementsOrder + from .plan_group_response_data import PlanGroupResponseData + from .plan_issue_response_data import PlanIssueResponseData + from .plan_response_data import PlanResponseData + from .plan_selection import PlanSelection + from .plan_snapshot_view import PlanSnapshotView + from .plan_trait_response_data import PlanTraitResponseData + from .preview_object import PreviewObject + from .preview_object_response_data import PreviewObjectResponseData + from .preview_subscription_change_response_data import PreviewSubscriptionChangeResponseData + from .preview_subscription_finance_response_data import PreviewSubscriptionFinanceResponseData + from .preview_subscription_upcoming_invoice_line_items import PreviewSubscriptionUpcomingInvoiceLineItems + from .quickstart_resp import QuickstartResp + from .raw_event_batch_response_data import RawEventBatchResponseData + from .raw_event_response_data import RawEventResponseData + from .rule import Rule + from .rule_condition_detail_response_data import RuleConditionDetailResponseData + from .rule_condition_group_detail_response_data import RuleConditionGroupDetailResponseData + from .rule_condition_group_response_data import RuleConditionGroupResponseData + from .rule_condition_response_data import RuleConditionResponseData + from .rule_detail_response_data import RuleDetailResponseData + from .rule_response_data import RuleResponseData + from .rules_detail_response_data import RulesDetailResponseData + from .segment_status_resp import SegmentStatusResp + from .stripe_embed_info import StripeEmbedInfo + from .subscription_trait_update import SubscriptionTraitUpdate + from .temporary_access_token_response_data import TemporaryAccessTokenResponseData + from .trait_definition import TraitDefinition + from .update_add_on_request_body import UpdateAddOnRequestBody + from .update_credit_bundle_request_body import UpdateCreditBundleRequestBody + from .update_entitlement_req_common import UpdateEntitlementReqCommon + from .update_entitlement_req_common_metric_period import UpdateEntitlementReqCommonMetricPeriod + from .update_entitlement_req_common_metric_period_month_reset import ( + UpdateEntitlementReqCommonMetricPeriodMonthReset, + ) + from .update_entitlement_req_common_value_type import UpdateEntitlementReqCommonValueType + from .update_pay_in_advance_request_body import UpdatePayInAdvanceRequestBody + from .update_plan_trait_trait_request_body import UpdatePlanTraitTraitRequestBody + from .update_rule_request_body import UpdateRuleRequestBody + from .upsert_company_request_body import UpsertCompanyRequestBody + from .upsert_trait_request_body import UpsertTraitRequestBody + from .upsert_user_request_body import UpsertUserRequestBody + from .upsert_user_sub_request_body import UpsertUserSubRequestBody + from .usage_based_entitlement_request_body import UsageBasedEntitlementRequestBody + from .usage_based_entitlement_request_body_price_behavior import UsageBasedEntitlementRequestBodyPriceBehavior + from .usage_based_entitlement_response_data import UsageBasedEntitlementResponseData + from .user_detail_response_data import UserDetailResponseData + from .user_response_data import UserResponseData + from .webhook_event_detail_response_data import WebhookEventDetailResponseData + from .webhook_event_response_data import WebhookEventResponseData + from .webhook_response_data import WebhookResponseData +_dynamic_imports: typing.Dict[str, str] = { + "ApiError": ".api_error", + "ApiKeyCreateResponseData": ".api_key_create_response_data", + "ApiKeyRequestListResponseData": ".api_key_request_list_response_data", + "ApiKeyRequestResponseData": ".api_key_request_response_data", + "ApiKeyResponseData": ".api_key_response_data", + "BillingCouponResponseData": ".billing_coupon_response_data", + "BillingCreditBundleResponseData": ".billing_credit_bundle_response_data", + "BillingCreditBundleView": ".billing_credit_bundle_view", + "BillingCreditGrantResponseData": ".billing_credit_grant_response_data", + "BillingCreditLedgerResponseData": ".billing_credit_ledger_response_data", + "BillingCreditResponseData": ".billing_credit_response_data", + "BillingCustomerResponseData": ".billing_customer_response_data", + "BillingCustomerSubscription": ".billing_customer_subscription", + "BillingCustomerWithSubscriptionsResponseData": ".billing_customer_with_subscriptions_response_data", + "BillingMeterResponseData": ".billing_meter_response_data", + "BillingPlanCreditGrantResponseData": ".billing_plan_credit_grant_response_data", + "BillingPriceResponseData": ".billing_price_response_data", + "BillingPriceView": ".billing_price_view", + "BillingProductDetailResponseData": ".billing_product_detail_response_data", + "BillingProductForSubscriptionResponseData": ".billing_product_for_subscription_response_data", + "BillingProductPlanResponseData": ".billing_product_plan_response_data", + "BillingProductPriceResponseData": ".billing_product_price_response_data", + "BillingProductPriceTierResponseData": ".billing_product_price_tier_response_data", + "BillingProductPricing": ".billing_product_pricing", + "BillingProductPricingUsageType": ".billing_product_pricing_usage_type", + "BillingProductResponseData": ".billing_product_response_data", + "BillingSubscriptionDiscount": ".billing_subscription_discount", + "BillingSubscriptionDiscountView": ".billing_subscription_discount_view", + "BillingSubscriptionResponseData": ".billing_subscription_response_data", + "BillingSubscriptionView": ".billing_subscription_view", + "ChangeSubscriptionInternalRequestBody": ".change_subscription_internal_request_body", + "ChangeSubscriptionRequestBody": ".change_subscription_request_body", + "CheckFlagRequestBody": ".check_flag_request_body", + "CheckFlagResponseData": ".check_flag_response_data", + "CheckFlagsResponseData": ".check_flags_response_data", + "CheckoutDataResponseData": ".checkout_data_response_data", + "CheckoutSettingsResponseData": ".checkout_settings_response_data", + "CheckoutSubscription": ".checkout_subscription", + "CompanyCrmDealsResponseData": ".company_crm_deals_response_data", + "CompanyDetailResponseData": ".company_detail_response_data", + "CompanyEventPeriodMetricsResponseData": ".company_event_period_metrics_response_data", + "CompanyLedgerResponseData": ".company_ledger_response_data", + "CompanyMembershipDetailResponseData": ".company_membership_detail_response_data", + "CompanyMembershipResponseData": ".company_membership_response_data", + "CompanyOverrideNoteResponseData": ".company_override_note_response_data", + "CompanyOverrideResponseData": ".company_override_response_data", + "CompanyPlanDetailResponseData": ".company_plan_detail_response_data", + "CompanyPlanWithBillingSubView": ".company_plan_with_billing_sub_view", + "CompanyResponseData": ".company_response_data", + "CompanySubscriptionResponseData": ".company_subscription_response_data", + "CompanyViewWithFeatureUsageResponseData": ".company_view_with_feature_usage_response_data", + "CompatiblePlans": ".compatible_plans", + "CompatiblePlansResponseData": ".compatible_plans_response_data", + "ComponentCapabilities": ".component_capabilities", + "ComponentCheckoutSettings": ".component_checkout_settings", + "ComponentHydrateResponseData": ".component_hydrate_response_data", + "ComponentPreviewResponseData": ".component_preview_response_data", + "ComponentResponseData": ".component_response_data", + "Condition": ".condition", + "ConditionGroup": ".condition_group", + "CountResponse": ".count_response", + "CouponRequestBody": ".coupon_request_body", + "CreateBillingPriceTierRequestBody": ".create_billing_price_tier_request_body", + "CreateEntitlementReqCommon": ".create_entitlement_req_common", + "CreateEntitlementReqCommonMetricPeriod": ".create_entitlement_req_common_metric_period", + "CreateEntitlementReqCommonMetricPeriodMonthReset": ".create_entitlement_req_common_metric_period_month_reset", + "CreateEntitlementReqCommonValueType": ".create_entitlement_req_common_value_type", + "CreateEventRequestBody": ".create_event_request_body", + "CreateEventRequestBodyEventType": ".create_event_request_body_event_type", + "CreateFlagRequestBody": ".create_flag_request_body", + "CreateOrUpdateConditionGroupRequestBody": ".create_or_update_condition_group_request_body", + "CreateOrUpdateConditionRequestBody": ".create_or_update_condition_request_body", + "CreateOrUpdateConditionRequestBodyConditionType": ".create_or_update_condition_request_body_condition_type", + "CreateOrUpdateConditionRequestBodyMetricPeriod": ".create_or_update_condition_request_body_metric_period", + "CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset": ".create_or_update_condition_request_body_metric_period_month_reset", + "CreateOrUpdateConditionRequestBodyOperator": ".create_or_update_condition_request_body_operator", + "CreateOrUpdateFlagRequestBody": ".create_or_update_flag_request_body", + "CreateOrUpdateRuleRequestBody": ".create_or_update_rule_request_body", + "CreateOrUpdateRuleRequestBodyRuleType": ".create_or_update_rule_request_body_rule_type", + "CreatePriceTierRequestBody": ".create_price_tier_request_body", + "CreditBundlePurchaseResponseData": ".credit_bundle_purchase_response_data", + "CreditCompanyGrantView": ".credit_company_grant_view", + "CreditGrantDetail": ".credit_grant_detail", + "CreditGrantDetailGrantReason": ".credit_grant_detail_grant_reason", + "CreditLedgerEnrichedEntryResponseData": ".credit_ledger_enriched_entry_response_data", + "CreditTriggerConfig": ".credit_trigger_config", + "CreditUsage": ".credit_usage", + "CreditUsageResponseData": ".credit_usage_response_data", + "CrmDealLineItem": ".crm_deal_line_item", + "CrmDealResponseData": ".crm_deal_response_data", + "CrmLineItemResponseData": ".crm_line_item_response_data", + "CrmProductResponseData": ".crm_product_response_data", + "CustomPlanConfig": ".custom_plan_config", + "CustomPlanViewConfigResponseData": ".custom_plan_view_config_response_data", + "DataExportResponseData": ".data_export_response_data", + "Decimal": ".decimal", + "DeleteResponse": ".delete_response", + "EntitlementTriggerConfig": ".entitlement_trigger_config", + "EntitlementsInPlan": ".entitlements_in_plan", + "EntityKeyDefinitionResponseData": ".entity_key_definition_response_data", + "EntityKeyDetailResponseData": ".entity_key_detail_response_data", + "EntityKeyResponseData": ".entity_key_response_data", + "EntityTraitDefinitionResponseData": ".entity_trait_definition_response_data", + "EntityTraitDetailResponseData": ".entity_trait_detail_response_data", + "EntityTraitResponseData": ".entity_trait_response_data", + "EntityTraitValue": ".entity_trait_value", + "EnvironmentDetailResponseData": ".environment_detail_response_data", + "EnvironmentResponseData": ".environment_response_data", + "EventBody": ".event_body", + "EventBodyFlagCheck": ".event_body_flag_check", + "EventBodyIdentify": ".event_body_identify", + "EventBodyIdentifyCompany": ".event_body_identify_company", + "EventBodyTrack": ".event_body_track", + "EventDetailResponseData": ".event_detail_response_data", + "EventResponseData": ".event_response_data", + "EventSummaryResponseData": ".event_summary_response_data", + "FeatureCompanyResponseData": ".feature_company_response_data", + "FeatureCompanyResponseDataAllocationType": ".feature_company_response_data_allocation_type", + "FeatureCompanyResponseDataCreditGrantReason": ".feature_company_response_data_credit_grant_reason", + "FeatureCompanyUserResponseData": ".feature_company_user_response_data", + "FeatureCompanyUserResponseDataAllocationType": ".feature_company_user_response_data_allocation_type", + "FeatureDetailResponseData": ".feature_detail_response_data", + "FeatureLedgerResponseData": ".feature_ledger_response_data", + "FeatureResponseData": ".feature_response_data", + "FeatureUsageDataResponseData": ".feature_usage_data_response_data", + "FeatureUsageDetailResponseData": ".feature_usage_detail_response_data", + "FeatureUsageResponseData": ".feature_usage_response_data", + "FeatureUsageResponseDataAllocationType": ".feature_usage_response_data_allocation_type", + "FeatureUsageResponseDataCreditGrantReason": ".feature_usage_response_data_credit_grant_reason", + "FlagDetailResponseData": ".flag_detail_response_data", + "FlagResponseData": ".flag_response_data", + "GenericPreviewObject": ".generic_preview_object", + "InvoiceRequestBody": ".invoice_request_body", + "InvoiceResponseData": ".invoice_response_data", + "IssueTemporaryAccessTokenResponseData": ".issue_temporary_access_token_response_data", + "KeysRequestBody": ".keys_request_body", + "ManagePlanPreviewResponseResponseData": ".manage_plan_preview_response_response_data", + "ManagePlanRequest": ".manage_plan_request", + "ManagePlanResponseResponseData": ".manage_plan_response_response_data", + "MeterRequestBody": ".meter_request_body", + "OrderedPlansInGroup": ".ordered_plans_in_group", + "PaymentMethodRequestBody": ".payment_method_request_body", + "PaymentMethodResponseData": ".payment_method_response_data", + "PlanChangeResponseData": ".plan_change_response_data", + "PlanChangeResponseDataAction": ".plan_change_response_data_action", + "PlanChangeResponseDataActorType": ".plan_change_response_data_actor_type", + "PlanChangeResponseDataBasePlanAction": ".plan_change_response_data_base_plan_action", + "PlanChangeResponseDataSubscriptionChangeAction": ".plan_change_response_data_subscription_change_action", + "PlanCreditGrantView": ".plan_credit_grant_view", + "PlanDetailResponseData": ".plan_detail_response_data", + "PlanEntitlementResponseData": ".plan_entitlement_response_data", + "PlanEntitlementsOrder": ".plan_entitlements_order", + "PlanGroupBundleOrder": ".plan_group_bundle_order", + "PlanGroupDetailResponseData": ".plan_group_detail_response_data", + "PlanGroupPlanDetailResponseData": ".plan_group_plan_detail_response_data", + "PlanGroupPlanEntitlementsOrder": ".plan_group_plan_entitlements_order", + "PlanGroupResponseData": ".plan_group_response_data", + "PlanIssueResponseData": ".plan_issue_response_data", + "PlanResponseData": ".plan_response_data", + "PlanSelection": ".plan_selection", + "PlanSnapshotView": ".plan_snapshot_view", + "PlanTraitResponseData": ".plan_trait_response_data", + "PreviewObject": ".preview_object", + "PreviewObjectResponseData": ".preview_object_response_data", + "PreviewSubscriptionChangeResponseData": ".preview_subscription_change_response_data", + "PreviewSubscriptionFinanceResponseData": ".preview_subscription_finance_response_data", + "PreviewSubscriptionUpcomingInvoiceLineItems": ".preview_subscription_upcoming_invoice_line_items", + "QuickstartResp": ".quickstart_resp", + "RawEventBatchResponseData": ".raw_event_batch_response_data", + "RawEventResponseData": ".raw_event_response_data", + "Rule": ".rule", + "RuleConditionDetailResponseData": ".rule_condition_detail_response_data", + "RuleConditionGroupDetailResponseData": ".rule_condition_group_detail_response_data", + "RuleConditionGroupResponseData": ".rule_condition_group_response_data", + "RuleConditionResponseData": ".rule_condition_response_data", + "RuleDetailResponseData": ".rule_detail_response_data", + "RuleResponseData": ".rule_response_data", + "RulesDetailResponseData": ".rules_detail_response_data", + "SegmentStatusResp": ".segment_status_resp", + "StripeEmbedInfo": ".stripe_embed_info", + "SubscriptionTraitUpdate": ".subscription_trait_update", + "TemporaryAccessTokenResponseData": ".temporary_access_token_response_data", + "TraitDefinition": ".trait_definition", + "UpdateAddOnRequestBody": ".update_add_on_request_body", + "UpdateCreditBundleRequestBody": ".update_credit_bundle_request_body", + "UpdateEntitlementReqCommon": ".update_entitlement_req_common", + "UpdateEntitlementReqCommonMetricPeriod": ".update_entitlement_req_common_metric_period", + "UpdateEntitlementReqCommonMetricPeriodMonthReset": ".update_entitlement_req_common_metric_period_month_reset", + "UpdateEntitlementReqCommonValueType": ".update_entitlement_req_common_value_type", + "UpdatePayInAdvanceRequestBody": ".update_pay_in_advance_request_body", + "UpdatePlanTraitTraitRequestBody": ".update_plan_trait_trait_request_body", + "UpdateRuleRequestBody": ".update_rule_request_body", + "UpsertCompanyRequestBody": ".upsert_company_request_body", + "UpsertTraitRequestBody": ".upsert_trait_request_body", + "UpsertUserRequestBody": ".upsert_user_request_body", + "UpsertUserSubRequestBody": ".upsert_user_sub_request_body", + "UsageBasedEntitlementRequestBody": ".usage_based_entitlement_request_body", + "UsageBasedEntitlementRequestBodyPriceBehavior": ".usage_based_entitlement_request_body_price_behavior", + "UsageBasedEntitlementResponseData": ".usage_based_entitlement_response_data", + "UserDetailResponseData": ".user_detail_response_data", + "UserResponseData": ".user_response_data", + "WebhookEventDetailResponseData": ".webhook_event_detail_response_data", + "WebhookEventResponseData": ".webhook_event_response_data", + "WebhookResponseData": ".webhook_response_data", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "ApiError", diff --git a/src/schematic/webhooks/__init__.py b/src/schematic/webhooks/__init__.py index a4680dc..ed83105 100644 --- a/src/schematic/webhooks/__init__.py +++ b/src/schematic/webhooks/__init__.py @@ -2,24 +2,68 @@ # isort: skip_file -from .types import ( - CountWebhookEventsParams, - CountWebhookEventsResponse, - CountWebhooksParams, - CountWebhooksResponse, - CreateWebhookRequestBodyRequestTypesItem, - CreateWebhookResponse, - DeleteWebhookResponse, - GetWebhookEventResponse, - GetWebhookResponse, - ListWebhookEventsParams, - ListWebhookEventsResponse, - ListWebhooksParams, - ListWebhooksResponse, - UpdateWebhookRequestBodyRequestTypesItem, - UpdateWebhookRequestBodyStatus, - UpdateWebhookResponse, -) +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .types import ( + CountWebhookEventsParams, + CountWebhookEventsResponse, + CountWebhooksParams, + CountWebhooksResponse, + CreateWebhookRequestBodyRequestTypesItem, + CreateWebhookResponse, + DeleteWebhookResponse, + GetWebhookEventResponse, + GetWebhookResponse, + ListWebhookEventsParams, + ListWebhookEventsResponse, + ListWebhooksParams, + ListWebhooksResponse, + UpdateWebhookRequestBodyRequestTypesItem, + UpdateWebhookRequestBodyStatus, + UpdateWebhookResponse, + ) +_dynamic_imports: typing.Dict[str, str] = { + "CountWebhookEventsParams": ".types", + "CountWebhookEventsResponse": ".types", + "CountWebhooksParams": ".types", + "CountWebhooksResponse": ".types", + "CreateWebhookRequestBodyRequestTypesItem": ".types", + "CreateWebhookResponse": ".types", + "DeleteWebhookResponse": ".types", + "GetWebhookEventResponse": ".types", + "GetWebhookResponse": ".types", + "ListWebhookEventsParams": ".types", + "ListWebhookEventsResponse": ".types", + "ListWebhooksParams": ".types", + "ListWebhooksResponse": ".types", + "UpdateWebhookRequestBodyRequestTypesItem": ".types", + "UpdateWebhookRequestBodyStatus": ".types", + "UpdateWebhookResponse": ".types", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountWebhookEventsParams", diff --git a/src/schematic/webhooks/types/__init__.py b/src/schematic/webhooks/types/__init__.py index 5b328dd..7a24a65 100644 --- a/src/schematic/webhooks/types/__init__.py +++ b/src/schematic/webhooks/types/__init__.py @@ -2,22 +2,66 @@ # isort: skip_file -from .count_webhook_events_params import CountWebhookEventsParams -from .count_webhook_events_response import CountWebhookEventsResponse -from .count_webhooks_params import CountWebhooksParams -from .count_webhooks_response import CountWebhooksResponse -from .create_webhook_request_body_request_types_item import CreateWebhookRequestBodyRequestTypesItem -from .create_webhook_response import CreateWebhookResponse -from .delete_webhook_response import DeleteWebhookResponse -from .get_webhook_event_response import GetWebhookEventResponse -from .get_webhook_response import GetWebhookResponse -from .list_webhook_events_params import ListWebhookEventsParams -from .list_webhook_events_response import ListWebhookEventsResponse -from .list_webhooks_params import ListWebhooksParams -from .list_webhooks_response import ListWebhooksResponse -from .update_webhook_request_body_request_types_item import UpdateWebhookRequestBodyRequestTypesItem -from .update_webhook_request_body_status import UpdateWebhookRequestBodyStatus -from .update_webhook_response import UpdateWebhookResponse +import typing +from importlib import import_module + +if typing.TYPE_CHECKING: + from .count_webhook_events_params import CountWebhookEventsParams + from .count_webhook_events_response import CountWebhookEventsResponse + from .count_webhooks_params import CountWebhooksParams + from .count_webhooks_response import CountWebhooksResponse + from .create_webhook_request_body_request_types_item import CreateWebhookRequestBodyRequestTypesItem + from .create_webhook_response import CreateWebhookResponse + from .delete_webhook_response import DeleteWebhookResponse + from .get_webhook_event_response import GetWebhookEventResponse + from .get_webhook_response import GetWebhookResponse + from .list_webhook_events_params import ListWebhookEventsParams + from .list_webhook_events_response import ListWebhookEventsResponse + from .list_webhooks_params import ListWebhooksParams + from .list_webhooks_response import ListWebhooksResponse + from .update_webhook_request_body_request_types_item import UpdateWebhookRequestBodyRequestTypesItem + from .update_webhook_request_body_status import UpdateWebhookRequestBodyStatus + from .update_webhook_response import UpdateWebhookResponse +_dynamic_imports: typing.Dict[str, str] = { + "CountWebhookEventsParams": ".count_webhook_events_params", + "CountWebhookEventsResponse": ".count_webhook_events_response", + "CountWebhooksParams": ".count_webhooks_params", + "CountWebhooksResponse": ".count_webhooks_response", + "CreateWebhookRequestBodyRequestTypesItem": ".create_webhook_request_body_request_types_item", + "CreateWebhookResponse": ".create_webhook_response", + "DeleteWebhookResponse": ".delete_webhook_response", + "GetWebhookEventResponse": ".get_webhook_event_response", + "GetWebhookResponse": ".get_webhook_response", + "ListWebhookEventsParams": ".list_webhook_events_params", + "ListWebhookEventsResponse": ".list_webhook_events_response", + "ListWebhooksParams": ".list_webhooks_params", + "ListWebhooksResponse": ".list_webhooks_response", + "UpdateWebhookRequestBodyRequestTypesItem": ".update_webhook_request_body_request_types_item", + "UpdateWebhookRequestBodyStatus": ".update_webhook_request_body_status", + "UpdateWebhookResponse": ".update_webhook_response", +} + + +def __getattr__(attr_name: str) -> typing.Any: + module_name = _dynamic_imports.get(attr_name) + if module_name is None: + raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") + try: + module = import_module(module_name, __package__) + if module_name == f".{attr_name}": + return module + else: + return getattr(module, attr_name) + except ImportError as e: + raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e + except AttributeError as e: + raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e + + +def __dir__(): + lazy_attrs = list(_dynamic_imports.keys()) + return sorted(lazy_attrs) + __all__ = [ "CountWebhookEventsParams", diff --git a/tests/utils/test_query_encoding.py b/tests/utils/test_query_encoding.py index 1839455..830c2bb 100644 --- a/tests/utils/test_query_encoding.py +++ b/tests/utils/test_query_encoding.py @@ -1,6 +1,5 @@ # This file was auto-generated by Fern from our API Definition. - from schematic.core.query_encoder import encode_query