diff --git a/poetry.lock b/poetry.lock
index f43ded4..e7d6e6a 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand.
[[package]]
name = "annotated-types"
@@ -16,13 +16,13 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""}
[[package]]
name = "anyio"
-version = "4.5.0"
+version = "4.5.2"
description = "High level compatibility layer for multiple asynchronous event loop implementations"
optional = false
python-versions = ">=3.8"
files = [
- {file = "anyio-4.5.0-py3-none-any.whl", hash = "sha256:fdeb095b7cc5a5563175eedd926ec4ae55413bb4be5770c424af0ba46ccb4a78"},
- {file = "anyio-4.5.0.tar.gz", hash = "sha256:c5a275fe5ca0afd788001f58fca1e69e29ce706d746e317d660e21f70c530ef9"},
+ {file = "anyio-4.5.2-py3-none-any.whl", hash = "sha256:c011ee36bc1e8ba40e5a81cb9df91925c218fe9b778554e0b56a21e1b5d4716f"},
+ {file = "anyio-4.5.2.tar.gz", hash = "sha256:23009af4ed04ce05991845451e11ef02fc7c5ed29179ac9a420e5ad0ac7ddc5b"},
]
[package.dependencies]
@@ -33,7 +33,7 @@ typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""}
[package.extras]
doc = ["Sphinx (>=7.4,<8.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"]
-test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.21.0b1)"]
+test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21.0b1)"]
trio = ["trio (>=0.26.1)"]
[[package]]
@@ -85,13 +85,13 @@ files = [
[[package]]
name = "httpcore"
-version = "1.0.5"
+version = "1.0.7"
description = "A minimal low-level HTTP client."
optional = false
python-versions = ">=3.8"
files = [
- {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"},
- {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"},
+ {file = "httpcore-1.0.7-py3-none-any.whl", hash = "sha256:a3fff8f43dc260d5bd363d9f9cf1830fa3a458b332856f34282de498ed420edd"},
+ {file = "httpcore-1.0.7.tar.gz", hash = "sha256:8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"},
]
[package.dependencies]
@@ -102,7 +102,7 @@ h11 = ">=0.13,<0.15"
asyncio = ["anyio (>=4.0,<5.0)"]
http2 = ["h2 (>=3,<5)"]
socks = ["socksio (==1.*)"]
-trio = ["trio (>=0.22.0,<0.26.0)"]
+trio = ["trio (>=0.22.0,<1.0)"]
[[package]]
name = "httpx"
@@ -213,13 +213,13 @@ files = [
[[package]]
name = "packaging"
-version = "24.1"
+version = "24.2"
description = "Core utilities for Python packages"
optional = false
python-versions = ">=3.8"
files = [
- {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"},
- {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"},
+ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"},
+ {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"},
]
[[package]]
@@ -239,22 +239,19 @@ testing = ["pytest", "pytest-benchmark"]
[[package]]
name = "pydantic"
-version = "2.9.2"
+version = "2.10.2"
description = "Data validation using Python type hints"
optional = false
python-versions = ">=3.8"
files = [
- {file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"},
- {file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"},
+ {file = "pydantic-2.10.2-py3-none-any.whl", hash = "sha256:cfb96e45951117c3024e6b67b25cdc33a3cb7b2fa62e239f7af1378358a1d99e"},
+ {file = "pydantic-2.10.2.tar.gz", hash = "sha256:2bc2d7f17232e0841cbba4641e65ba1eb6fafb3a08de3a091ff3ce14a197c4fa"},
]
[package.dependencies]
annotated-types = ">=0.6.0"
-pydantic-core = "2.23.4"
-typing-extensions = [
- {version = ">=4.12.2", markers = "python_version >= \"3.13\""},
- {version = ">=4.6.1", markers = "python_version < \"3.13\""},
-]
+pydantic-core = "2.27.1"
+typing-extensions = ">=4.12.2"
[package.extras]
email = ["email-validator (>=2.0.0)"]
@@ -262,100 +259,111 @@ timezone = ["tzdata"]
[[package]]
name = "pydantic-core"
-version = "2.23.4"
+version = "2.27.1"
description = "Core functionality for Pydantic validation and serialization"
optional = false
python-versions = ">=3.8"
files = [
- {file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"},
- {file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"},
- {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"},
- {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"},
- {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"},
- {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"},
- {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"},
- {file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"},
- {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"},
- {file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"},
- {file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"},
- {file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"},
- {file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"},
- {file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"},
- {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"},
- {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"},
- {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"},
- {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"},
- {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"},
- {file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"},
- {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"},
- {file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"},
- {file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"},
- {file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"},
- {file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"},
- {file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"},
- {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"},
- {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"},
- {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"},
- {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"},
- {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"},
- {file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"},
- {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"},
- {file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"},
- {file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"},
- {file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"},
- {file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"},
- {file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"},
- {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"},
- {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"},
- {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"},
- {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"},
- {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"},
- {file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"},
- {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"},
- {file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"},
- {file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"},
- {file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"},
- {file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"},
- {file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"},
- {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"},
- {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"},
- {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"},
- {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"},
- {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"},
- {file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"},
- {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"},
- {file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"},
- {file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"},
- {file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"},
- {file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"},
- {file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"},
- {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"},
- {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"},
- {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"},
- {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"},
- {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"},
- {file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"},
- {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"},
- {file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"},
- {file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"},
- {file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"},
- {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"},
- {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"},
- {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"},
- {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"},
- {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"},
- {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"},
- {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"},
- {file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"},
- {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"},
- {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"},
- {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"},
- {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"},
- {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"},
- {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"},
- {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"},
- {file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"},
- {file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:71a5e35c75c021aaf400ac048dacc855f000bdfed91614b4a726f7432f1f3d6a"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f82d068a2d6ecfc6e054726080af69a6764a10015467d7d7b9f66d6ed5afa23b"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:121ceb0e822f79163dd4699e4c54f5ad38b157084d97b34de8b232bcaad70278"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4603137322c18eaf2e06a4495f426aa8d8388940f3c457e7548145011bb68e05"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a33cd6ad9017bbeaa9ed78a2e0752c5e250eafb9534f308e7a5f7849b0b1bfb4"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:15cc53a3179ba0fcefe1e3ae50beb2784dede4003ad2dfd24f81bba4b23a454f"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45d9c5eb9273aa50999ad6adc6be5e0ecea7e09dbd0d31bd0c65a55a2592ca08"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8bf7b66ce12a2ac52d16f776b31d16d91033150266eb796967a7e4621707e4f6"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:655d7dd86f26cb15ce8a431036f66ce0318648f8853d709b4167786ec2fa4807"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:5556470f1a2157031e676f776c2bc20acd34c1990ca5f7e56f1ebf938b9ab57c"},
+ {file = "pydantic_core-2.27.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:f69ed81ab24d5a3bd93861c8c4436f54afdf8e8cc421562b0c7504cf3be58206"},
+ {file = "pydantic_core-2.27.1-cp310-none-win32.whl", hash = "sha256:f5a823165e6d04ccea61a9f0576f345f8ce40ed533013580e087bd4d7442b52c"},
+ {file = "pydantic_core-2.27.1-cp310-none-win_amd64.whl", hash = "sha256:57866a76e0b3823e0b56692d1a0bf722bffb324839bb5b7226a7dbd6c9a40b17"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:ac3b20653bdbe160febbea8aa6c079d3df19310d50ac314911ed8cc4eb7f8cb8"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a5a8e19d7c707c4cadb8c18f5f60c843052ae83c20fa7d44f41594c644a1d330"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f7059ca8d64fea7f238994c97d91f75965216bcbe5f695bb44f354893f11d52"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bed0f8a0eeea9fb72937ba118f9db0cb7e90773462af7962d382445f3005e5a4"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a3cb37038123447cf0f3ea4c74751f6a9d7afef0eb71aa07bf5f652b5e6a132c"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:84286494f6c5d05243456e04223d5a9417d7f443c3b76065e75001beb26f88de"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acc07b2cfc5b835444b44a9956846b578d27beeacd4b52e45489e93276241025"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4fefee876e07a6e9aad7a8c8c9f85b0cdbe7df52b8a9552307b09050f7512c7e"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:258c57abf1188926c774a4c94dd29237e77eda19462e5bb901d88adcab6af919"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:35c14ac45fcfdf7167ca76cc80b2001205a8d5d16d80524e13508371fb8cdd9c"},
+ {file = "pydantic_core-2.27.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d1b26e1dff225c31897696cab7d4f0a315d4c0d9e8666dbffdb28216f3b17fdc"},
+ {file = "pydantic_core-2.27.1-cp311-none-win32.whl", hash = "sha256:2cdf7d86886bc6982354862204ae3b2f7f96f21a3eb0ba5ca0ac42c7b38598b9"},
+ {file = "pydantic_core-2.27.1-cp311-none-win_amd64.whl", hash = "sha256:3af385b0cee8df3746c3f406f38bcbfdc9041b5c2d5ce3e5fc6637256e60bbc5"},
+ {file = "pydantic_core-2.27.1-cp311-none-win_arm64.whl", hash = "sha256:81f2ec23ddc1b476ff96563f2e8d723830b06dceae348ce02914a37cb4e74b89"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:9cbd94fc661d2bab2bc702cddd2d3370bbdcc4cd0f8f57488a81bcce90c7a54f"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5f8c4718cd44ec1580e180cb739713ecda2bdee1341084c1467802a417fe0f02"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15aae984e46de8d376df515f00450d1522077254ef6b7ce189b38ecee7c9677c"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:1ba5e3963344ff25fc8c40da90f44b0afca8cfd89d12964feb79ac1411a260ac"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:992cea5f4f3b29d6b4f7f1726ed8ee46c8331c6b4eed6db5b40134c6fe1768bb"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0325336f348dbee6550d129b1627cb8f5351a9dc91aad141ffb96d4937bd9529"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7597c07fbd11515f654d6ece3d0e4e5093edc30a436c63142d9a4b8e22f19c35"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3bbd5d8cc692616d5ef6fbbbd50dbec142c7e6ad9beb66b78a96e9c16729b089"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:dc61505e73298a84a2f317255fcc72b710b72980f3a1f670447a21efc88f8381"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:e1f735dc43da318cad19b4173dd1ffce1d84aafd6c9b782b3abc04a0d5a6f5bb"},
+ {file = "pydantic_core-2.27.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f4e5658dbffe8843a0f12366a4c2d1c316dbe09bb4dfbdc9d2d9cd6031de8aae"},
+ {file = "pydantic_core-2.27.1-cp312-none-win32.whl", hash = "sha256:672ebbe820bb37988c4d136eca2652ee114992d5d41c7e4858cdd90ea94ffe5c"},
+ {file = "pydantic_core-2.27.1-cp312-none-win_amd64.whl", hash = "sha256:66ff044fd0bb1768688aecbe28b6190f6e799349221fb0de0e6f4048eca14c16"},
+ {file = "pydantic_core-2.27.1-cp312-none-win_arm64.whl", hash = "sha256:9a3b0793b1bbfd4146304e23d90045f2a9b5fd5823aa682665fbdaf2a6c28f3e"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:f216dbce0e60e4d03e0c4353c7023b202d95cbaeff12e5fd2e82ea0a66905073"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a2e02889071850bbfd36b56fd6bc98945e23670773bc7a76657e90e6b6603c08"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42b0e23f119b2b456d07ca91b307ae167cc3f6c846a7b169fca5326e32fdc6cf"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:764be71193f87d460a03f1f7385a82e226639732214b402f9aa61f0d025f0737"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c00666a3bd2f84920a4e94434f5974d7bbc57e461318d6bb34ce9cdbbc1f6b2"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3ccaa88b24eebc0f849ce0a4d09e8a408ec5a94afff395eb69baf868f5183107"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c65af9088ac534313e1963443d0ec360bb2b9cba6c2909478d22c2e363d98a51"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:206b5cf6f0c513baffaeae7bd817717140770c74528f3e4c3e1cec7871ddd61a"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:062f60e512fc7fff8b8a9d680ff0ddaaef0193dba9fa83e679c0c5f5fbd018bc"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:a0697803ed7d4af5e4c1adf1670af078f8fcab7a86350e969f454daf598c4960"},
+ {file = "pydantic_core-2.27.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:58ca98a950171f3151c603aeea9303ef6c235f692fe555e883591103da709b23"},
+ {file = "pydantic_core-2.27.1-cp313-none-win32.whl", hash = "sha256:8065914ff79f7eab1599bd80406681f0ad08f8e47c880f17b416c9f8f7a26d05"},
+ {file = "pydantic_core-2.27.1-cp313-none-win_amd64.whl", hash = "sha256:ba630d5e3db74c79300d9a5bdaaf6200172b107f263c98a0539eeecb857b2337"},
+ {file = "pydantic_core-2.27.1-cp313-none-win_arm64.whl", hash = "sha256:45cf8588c066860b623cd11c4ba687f8d7175d5f7ef65f7129df8a394c502de5"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:5897bec80a09b4084aee23f9b73a9477a46c3304ad1d2d07acca19723fb1de62"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:d0165ab2914379bd56908c02294ed8405c252250668ebcb438a55494c69f44ab"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b9af86e1d8e4cfc82c2022bfaa6f459381a50b94a29e95dcdda8442d6d83864"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f6c8a66741c5f5447e047ab0ba7a1c61d1e95580d64bce852e3df1f895c4067"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9a42d6a8156ff78981f8aa56eb6394114e0dedb217cf8b729f438f643608cbcd"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:64c65f40b4cd8b0e049a8edde07e38b476da7e3aaebe63287c899d2cff253fa5"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdcf339322a3fae5cbd504edcefddd5a50d9ee00d968696846f089b4432cf78"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bf99c8404f008750c846cb4ac4667b798a9f7de673ff719d705d9b2d6de49c5f"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8f1edcea27918d748c7e5e4d917297b2a0ab80cad10f86631e488b7cddf76a36"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_armv7l.whl", hash = "sha256:159cac0a3d096f79ab6a44d77a961917219707e2a130739c64d4dd46281f5c2a"},
+ {file = "pydantic_core-2.27.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:029d9757eb621cc6e1848fa0b0310310de7301057f623985698ed7ebb014391b"},
+ {file = "pydantic_core-2.27.1-cp38-none-win32.whl", hash = "sha256:a28af0695a45f7060e6f9b7092558a928a28553366519f64083c63a44f70e618"},
+ {file = "pydantic_core-2.27.1-cp38-none-win_amd64.whl", hash = "sha256:2d4567c850905d5eaaed2f7a404e61012a51caf288292e016360aa2b96ff38d4"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:e9386266798d64eeb19dd3677051f5705bf873e98e15897ddb7d76f477131967"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4228b5b646caa73f119b1ae756216b59cc6e2267201c27d3912b592c5e323b60"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0b3dfe500de26c52abe0477dde16192ac39c98f05bf2d80e76102d394bd13854"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:aee66be87825cdf72ac64cb03ad4c15ffef4143dbf5c113f64a5ff4f81477bf9"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b748c44bb9f53031c8cbc99a8a061bc181c1000c60a30f55393b6e9c45cc5bd"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5ca038c7f6a0afd0b2448941b6ef9d5e1949e999f9e5517692eb6da58e9d44be"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e0bd57539da59a3e4671b90a502da9a28c72322a4f17866ba3ac63a82c4498e"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ac6c2c45c847bbf8f91930d88716a0fb924b51e0c6dad329b793d670ec5db792"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b94d4ba43739bbe8b0ce4262bcc3b7b9f31459ad120fb595627eaeb7f9b9ca01"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:00e6424f4b26fe82d44577b4c842d7df97c20be6439e8e685d0d715feceb9fb9"},
+ {file = "pydantic_core-2.27.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:38de0a70160dd97540335b7ad3a74571b24f1dc3ed33f815f0880682e6880131"},
+ {file = "pydantic_core-2.27.1-cp39-none-win32.whl", hash = "sha256:7ccebf51efc61634f6c2344da73e366c75e735960b5654b63d7e6f69a5885fa3"},
+ {file = "pydantic_core-2.27.1-cp39-none-win_amd64.whl", hash = "sha256:a57847b090d7892f123726202b7daa20df6694cbd583b67a592e856bff603d6c"},
+ {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3fa80ac2bd5856580e242dbc202db873c60a01b20309c8319b5c5986fbe53ce6"},
+ {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:d950caa237bb1954f1b8c9227b5065ba6875ac9771bb8ec790d956a699b78676"},
+ {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0e4216e64d203e39c62df627aa882f02a2438d18a5f21d7f721621f7a5d3611d"},
+ {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:02a3d637bd387c41d46b002f0e49c52642281edacd2740e5a42f7017feea3f2c"},
+ {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:161c27ccce13b6b0c8689418da3885d3220ed2eae2ea5e9b2f7f3d48f1d52c27"},
+ {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:19910754e4cc9c63bc1c7f6d73aa1cfee82f42007e407c0f413695c2f7ed777f"},
+ {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:e173486019cc283dc9778315fa29a363579372fe67045e971e89b6365cc035ed"},
+ {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:af52d26579b308921b73b956153066481f064875140ccd1dfd4e77db89dbb12f"},
+ {file = "pydantic_core-2.27.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:981fb88516bd1ae8b0cbbd2034678a39dedc98752f264ac9bc5839d3923fa04c"},
+ {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5fde892e6c697ce3e30c61b239330fc5d569a71fefd4eb6512fc6caec9dd9e2f"},
+ {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:816f5aa087094099fff7edabb5e01cc370eb21aa1a1d44fe2d2aefdfb5599b31"},
+ {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9c10c309e18e443ddb108f0ef64e8729363adbfd92d6d57beec680f6261556f3"},
+ {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:98476c98b02c8e9b2eec76ac4156fd006628b1b2d0ef27e548ffa978393fd154"},
+ {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c3027001c28434e7ca5a6e1e527487051136aa81803ac812be51802150d880dd"},
+ {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7699b1df36a48169cdebda7ab5a2bac265204003f153b4bd17276153d997670a"},
+ {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:1c39b07d90be6b48968ddc8c19e7585052088fd7ec8d568bb31ff64c70ae3c97"},
+ {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:46ccfe3032b3915586e469d4972973f893c0a2bb65669194a5bdea9bacc088c2"},
+ {file = "pydantic_core-2.27.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:62ba45e21cf6571d7f716d903b5b7b6d2617e2d5d67c0923dc47b9d41369f840"},
+ {file = "pydantic_core-2.27.1.tar.gz", hash = "sha256:62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"},
]
[package.dependencies]
@@ -466,24 +474,24 @@ files = [
[[package]]
name = "tomli"
-version = "2.0.1"
+version = "2.1.0"
description = "A lil' TOML parser"
optional = false
-python-versions = ">=3.7"
+python-versions = ">=3.8"
files = [
- {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
- {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
+ {file = "tomli-2.1.0-py3-none-any.whl", hash = "sha256:a5c57c3d1c56f5ccdf89f6523458f60ef716e210fc47c4cfb188c5ba473e0391"},
+ {file = "tomli-2.1.0.tar.gz", hash = "sha256:3f646cae2aec94e17d04973e4249548320197cfabdf130015d023de4b74d8ab8"},
]
[[package]]
name = "types-python-dateutil"
-version = "2.9.0.20240906"
+version = "2.9.0.20241003"
description = "Typing stubs for python-dateutil"
optional = false
python-versions = ">=3.8"
files = [
- {file = "types-python-dateutil-2.9.0.20240906.tar.gz", hash = "sha256:9706c3b68284c25adffc47319ecc7947e5bb86b3773f843c73906fd598bc176e"},
- {file = "types_python_dateutil-2.9.0.20240906-py3-none-any.whl", hash = "sha256:27c8cc2d058ccb14946eebcaaa503088f4f6dbc4fb6093d3d456a49aef2753f6"},
+ {file = "types-python-dateutil-2.9.0.20241003.tar.gz", hash = "sha256:58cb85449b2a56d6684e41aeefb4c4280631246a0da1a719bdbe6f3fb0317446"},
+ {file = "types_python_dateutil-2.9.0.20241003-py3-none-any.whl", hash = "sha256:250e1d8e80e7bbc3a6c99b907762711d1a1cdd00e978ad39cb5940f6f0a87f3d"},
]
[[package]]
diff --git a/reference.md b/reference.md
index 6fc5c00..a27fa71 100644
--- a/reference.md
+++ b/reference.md
@@ -3119,7 +3119,6 @@ client.billing.upsert_invoice(
collection_method="collection_method",
currency="currency",
customer_external_id="customer_external_id",
- external_id="external_id",
subtotal=1,
)
@@ -3185,7 +3184,7 @@ client.billing.upsert_invoice(
-
-**external_id:** `str`
+**subtotal:** `int`
@@ -3193,7 +3192,7 @@ client.billing.upsert_invoice(
-
-**subtotal:** `int`
+**due_date:** `typing.Optional[dt.datetime]`
@@ -3201,7 +3200,7 @@ client.billing.upsert_invoice(
-
-**due_date:** `typing.Optional[dt.datetime]`
+**external_id:** `typing.Optional[str]`
@@ -3225,6 +3224,167 @@ client.billing.upsert_invoice(
-
+**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()
+
+```
+
+
+
+
+
+#### ⚙️ 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.
@@ -3387,6 +3547,46 @@ client.billing.upsert_payment_method(
-
+**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]`
@@ -3435,6 +3635,100 @@ client.billing.upsert_payment_method(
+
+
+
+
+client.billing.search_billing_prices(...)
+
+-
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```python
+from schematic import Schematic
+
+client = Schematic(
+ api_key="YOUR_API_KEY",
+)
+client.billing.search_billing_prices()
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+
+
+
+
+
+-
+
+**interval:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**usage_type:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**price:** `typing.Optional[int]`
+
+
+
+
+
+-
+
+**limit:** `typing.Optional[int]` — Page limit (default 100)
+
+
+
+
+
+-
+
+**offset:** `typing.Optional[int]` — Page offset (default 0)
+
+
+
+
+
+-
+
+**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
+
+
+
+
+
+
+
@@ -3458,10 +3752,12 @@ client = Schematic(
api_key="YOUR_API_KEY",
)
client.billing.upsert_billing_price(
+ currency="currency",
interval="interval",
price=1,
price_external_id="price_external_id",
product_external_id="product_external_id",
+ usage_type="usage_type",
)
```
@@ -3478,6 +3774,14 @@ client.billing.upsert_billing_price(
-
+**currency:** `str`
+
+
+
+
+
+-
+
**interval:** `str`
@@ -3510,6 +3814,22 @@ client.billing.upsert_billing_price(
-
+**usage_type:** `str`
+
+
+
+
+
+-
+
+**meter_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -3580,6 +3900,38 @@ client.billing.list_product_prices()
-
+**price_usage_type:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**without_linked_to_plan:** `typing.Optional[bool]` — Filter products that are not linked to any plan
+
+
+
+
+
+-
+
+**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
+
+
+
+
+
+-
+
**limit:** `typing.Optional[int]` — Page limit (default 100)
@@ -3604,6 +3956,62 @@ client.billing.list_product_prices()
+
+
+
+
+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.
+
+
+
+
+
+
+
@@ -3712,29 +4120,61 @@ client.billing.upsert_billing_product(
-
-```python
-from schematic import Schematic
-
-client = Schematic(
- api_key="YOUR_API_KEY",
-)
-client.billing.list_billing_products()
-
-```
-
-
+```python
+from schematic import Schematic
+
+client = Schematic(
+ api_key="YOUR_API_KEY",
+)
+client.billing.list_billing_products()
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+
+
+
+
+
+-
+
+**name:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**q:** `typing.Optional[str]`
+
-#### ⚙️ Parameters
-
-
+**price_usage_type:** `typing.Optional[str]`
+
+
+
+
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**without_linked_to_plan:** `typing.Optional[bool]` — Filter products that are not linked to any plan
@@ -3742,7 +4182,7 @@ client.billing.list_billing_products()
-
-**name:** `typing.Optional[str]`
+**with_zero_price:** `typing.Optional[bool]` — Filter products that have zero price for free subscription type
@@ -3750,7 +4190,7 @@ client.billing.list_billing_products()
-
-**q:** `typing.Optional[str]`
+**with_prices_only:** `typing.Optional[bool]` — Filter products that have prices
@@ -3844,6 +4284,38 @@ client.billing.count_billing_products()
-
+**price_usage_type:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**without_linked_to_plan:** `typing.Optional[bool]` — Filter products that are not linked to any plan
+
+
+
+
+
+-
+
+**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
+
+
+
+
+
+-
+
**limit:** `typing.Optional[int]` — Page limit (default 100)
@@ -3893,14 +4365,20 @@ client = Schematic(
api_key="YOUR_API_KEY",
)
client.billing.upsert_billing_subscription(
+ currency="currency",
customer_external_id="customer_external_id",
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="usage_type",
)
],
subscription_external_id="subscription_external_id",
@@ -3921,6 +4399,14 @@ client.billing.upsert_billing_subscription(
-
+**currency:** `str`
+
+
+
+
+
+-
+
**customer_external_id:** `str`
@@ -3977,6 +4463,22 @@ client.billing.upsert_billing_subscription(
-
+**period_end:** `typing.Optional[int]`
+
+
+
+
+
+-
+
+**period_start:** `typing.Optional[int]`
+
+
+
+
+
+-
+
**status:** `typing.Optional[str]`
@@ -3985,6 +4487,14 @@ client.billing.upsert_billing_subscription(
-
+**trial_end:** `typing.Optional[int]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -4032,7 +4542,7 @@ client.companies.list_companies()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by multiple company IDs (starts with comp\_)
@@ -4040,7 +4550,7 @@ client.companies.list_companies()
-
-**plan_id:** `typing.Optional[str]`
+**plan_id:** `typing.Optional[str]` — Filter companies by plan ID (starts with plan\_)
@@ -4048,7 +4558,7 @@ client.companies.list_companies()
-
-**q:** `typing.Optional[str]` — Search filter
+**q:** `typing.Optional[str]` — Search for companies by name, keys or string traits
@@ -4342,7 +4852,7 @@ client.companies.count_companies()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter companies by multiple company IDs (starts with comp\_)
@@ -4350,7 +4860,7 @@ client.companies.count_companies()
-
-**plan_id:** `typing.Optional[str]`
+**plan_id:** `typing.Optional[str]` — Filter companies by plan ID (starts with plan\_)
@@ -4358,7 +4868,7 @@ client.companies.count_companies()
-
-**q:** `typing.Optional[str]` — Search filter
+**q:** `typing.Optional[str]` — Search for companies by name, keys or string traits
@@ -4581,7 +5091,7 @@ client = Schematic(
api_key="YOUR_API_KEY",
)
client.companies.lookup_company(
- keys={"string": {"key": "value"}},
+ keys={"keys": {"key": "value"}},
)
```
@@ -4916,9 +5426,7 @@ from schematic import Schematic
client = Schematic(
api_key="YOUR_API_KEY",
)
-client.companies.get_active_company_subscription(
- company_id="company_id",
-)
+client.companies.get_active_company_subscription()
```
@@ -4934,7 +5442,15 @@ client.companies.get_active_company_subscription(
-
-**company_id:** `str`
+**company_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
@@ -5281,7 +5797,7 @@ client.companies.list_entity_trait_definitions()
-
-**trait_type:** `typing.Optional[ListEntityTraitDefinitionsRequestTraitType]`
+**q:** `typing.Optional[str]`
@@ -5289,7 +5805,7 @@ client.companies.list_entity_trait_definitions()
-
-**q:** `typing.Optional[str]`
+**trait_type:** `typing.Optional[ListEntityTraitDefinitionsRequestTraitType]`
@@ -5586,7 +6102,7 @@ client.companies.count_entity_trait_definitions()
-
-**trait_type:** `typing.Optional[CountEntityTraitDefinitionsRequestTraitType]`
+**q:** `typing.Optional[str]`
@@ -5594,7 +6110,7 @@ client.companies.count_entity_trait_definitions()
-
-**q:** `typing.Optional[str]`
+**trait_type:** `typing.Optional[CountEntityTraitDefinitionsRequestTraitType]`
@@ -5833,7 +6349,7 @@ client.companies.list_users()
-
-**company_id:** `typing.Optional[str]`
+**company_id:** `typing.Optional[str]` — Filter users by company ID (starts with comp\_)
@@ -5841,7 +6357,7 @@ client.companies.list_users()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter users by multiple user IDs (starts with user\_)
@@ -5849,7 +6365,7 @@ client.companies.list_users()
-
-**plan_id:** `typing.Optional[str]`
+**plan_id:** `typing.Optional[str]` — Filter users by plan ID (starts with plan\_)
@@ -5857,7 +6373,7 @@ client.companies.list_users()
-
-**q:** `typing.Optional[str]` — Search filter
+**q:** `typing.Optional[str]` — Search for users by name, keys or string traits
@@ -6152,7 +6668,7 @@ client.companies.count_users()
-
-**company_id:** `typing.Optional[str]`
+**company_id:** `typing.Optional[str]` — Filter users by company ID (starts with comp\_)
@@ -6160,7 +6676,7 @@ client.companies.count_users()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter users by multiple user IDs (starts with user\_)
@@ -6168,7 +6684,7 @@ client.companies.count_users()
-
-**plan_id:** `typing.Optional[str]`
+**plan_id:** `typing.Optional[str]` — Filter users by plan ID (starts with plan\_)
@@ -6176,7 +6692,7 @@ client.companies.count_users()
-
-**q:** `typing.Optional[str]` — Search filter
+**q:** `typing.Optional[str]` — Search for users by name, keys or string traits
@@ -6400,7 +6916,7 @@ client = Schematic(
api_key="YOUR_API_KEY",
)
client.companies.lookup_user(
- keys={"string": {"key": "value"}},
+ keys={"keys": {"key": "value"}},
)
```
@@ -6472,7 +6988,7 @@ client.entitlements.list_company_overrides()
-
-**company_id:** `typing.Optional[str]`
+**company_id:** `typing.Optional[str]` — Filter company overrides by a single company ID (starting with comp\_)
@@ -6480,7 +6996,7 @@ client.entitlements.list_company_overrides()
-
-**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple company IDs (starting with comp\_)
@@ -6488,7 +7004,7 @@ client.entitlements.list_company_overrides()
-
-**feature_id:** `typing.Optional[str]`
+**feature_id:** `typing.Optional[str]` — Filter company overrides by a single feature ID (starting with feat\_)
@@ -6496,7 +7012,7 @@ client.entitlements.list_company_overrides()
-
-**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple feature IDs (starting with feat\_)
@@ -6504,7 +7020,7 @@ client.entitlements.list_company_overrides()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple company override IDs (starting with cmov\_)
@@ -6512,7 +7028,7 @@ client.entitlements.list_company_overrides()
-
-**q:** `typing.Optional[str]`
+**q:** `typing.Optional[str]` — Search for company overrides by feature or company name
@@ -6610,6 +7126,30 @@ client.entitlements.create_company_override(
-
+**expiration_date:** `typing.Optional[dt.datetime]`
+
+
+
+
+
+-
+
+**metered_monthly_price_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**metered_yearly_price_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**metric_period:** `typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriod]`
@@ -6618,6 +7158,14 @@ client.entitlements.create_company_override(
-
+**metric_period_month_reset:** `typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriodMonthReset]`
+
+
+
+
+
+-
+
**value_bool:** `typing.Optional[bool]`
@@ -6763,6 +7311,30 @@ client.entitlements.update_company_override(
-
+**expiration_date:** `typing.Optional[dt.datetime]`
+
+
+
+
+
+-
+
+**metered_monthly_price_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**metered_yearly_price_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**metric_period:** `typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriod]`
@@ -6771,6 +7343,14 @@ client.entitlements.update_company_override(
-
+**metric_period_month_reset:** `typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset]`
+
+
+
+
+
+-
+
**value_bool:** `typing.Optional[bool]`
@@ -6897,7 +7477,7 @@ client.entitlements.count_company_overrides()
-
-**company_id:** `typing.Optional[str]`
+**company_id:** `typing.Optional[str]` — Filter company overrides by a single company ID (starting with comp\_)
@@ -6905,7 +7485,7 @@ client.entitlements.count_company_overrides()
-
-**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple company IDs (starting with comp\_)
@@ -6913,7 +7493,7 @@ client.entitlements.count_company_overrides()
-
-**feature_id:** `typing.Optional[str]`
+**feature_id:** `typing.Optional[str]` — Filter company overrides by a single feature ID (starting with feat\_)
@@ -6921,7 +7501,7 @@ client.entitlements.count_company_overrides()
-
-**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple feature IDs (starting with feat\_)
@@ -6929,7 +7509,7 @@ client.entitlements.count_company_overrides()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter company overrides by multiple company override IDs (starting with cmov\_)
@@ -6937,7 +7517,7 @@ client.entitlements.count_company_overrides()
-
-**q:** `typing.Optional[str]`
+**q:** `typing.Optional[str]` — Search for company overrides by feature or company name
@@ -7199,6 +7779,14 @@ client.entitlements.list_feature_usage()
-
+**without_negative_entitlements:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
**limit:** `typing.Optional[int]` — Page limit (default 100)
@@ -7293,6 +7881,14 @@ client.entitlements.count_feature_usage()
-
+**without_negative_entitlements:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
**limit:** `typing.Optional[int]` — Page limit (default 100)
@@ -7515,7 +8111,7 @@ client.entitlements.list_plan_entitlements()
-
-**feature_id:** `typing.Optional[str]`
+**feature_id:** `typing.Optional[str]` — Filter plan entitlements by a single feature ID (starting with feat\_)
@@ -7523,7 +8119,7 @@ client.entitlements.list_plan_entitlements()
-
-**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple feature IDs (starting with feat\_)
@@ -7531,7 +8127,7 @@ client.entitlements.list_plan_entitlements()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple plan entitlement IDs (starting with pltl\_)
@@ -7539,7 +8135,7 @@ client.entitlements.list_plan_entitlements()
-
-**plan_id:** `typing.Optional[str]`
+**plan_id:** `typing.Optional[str]` — Filter plan entitlements by a single plan ID (starting with plan\_)
@@ -7547,7 +8143,7 @@ client.entitlements.list_plan_entitlements()
-
-**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple plan IDs (starting with plan\_)
@@ -7555,7 +8151,15 @@ client.entitlements.list_plan_entitlements()
-
-**q:** `typing.Optional[str]`
+**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
@@ -7653,6 +8257,22 @@ client.entitlements.create_plan_entitlement(
-
+**metered_monthly_price_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**metered_yearly_price_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**metric_period:** `typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriod]`
@@ -7661,6 +8281,30 @@ client.entitlements.create_plan_entitlement(
-
+**metric_period_month_reset:** `typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriodMonthReset]`
+
+
+
+
+
+-
+
+**monthly_metered_price_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
+**price_behavior:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**value_bool:** `typing.Optional[bool]`
@@ -7685,6 +8329,14 @@ client.entitlements.create_plan_entitlement(
-
+**yearly_metered_price_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -7776,21 +8428,45 @@ client.entitlements.update_plan_entitlement(
value_type="boolean",
)
-```
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**plan_entitlement_id:** `str` — plan_entitlement_id
+
+
+
+-
+
+**value_type:** `UpdatePlanEntitlementRequestBodyValueType`
+
-#### ⚙️ Parameters
-
-
+**metered_monthly_price_id:** `typing.Optional[str]`
+
+
+
+
-
-**plan_entitlement_id:** `str` — plan_entitlement_id
+**metered_yearly_price_id:** `typing.Optional[str]`
@@ -7798,7 +8474,7 @@ client.entitlements.update_plan_entitlement(
-
-**value_type:** `UpdatePlanEntitlementRequestBodyValueType`
+**metric_period:** `typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriod]`
@@ -7806,7 +8482,7 @@ client.entitlements.update_plan_entitlement(
-
-**metric_period:** `typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriod]`
+**metric_period_month_reset:** `typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset]`
@@ -7940,7 +8616,7 @@ client.entitlements.count_plan_entitlements()
-
-**feature_id:** `typing.Optional[str]`
+**feature_id:** `typing.Optional[str]` — Filter plan entitlements by a single feature ID (starting with feat\_)
@@ -7948,7 +8624,7 @@ client.entitlements.count_plan_entitlements()
-
-**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**feature_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple feature IDs (starting with feat\_)
@@ -7956,7 +8632,7 @@ client.entitlements.count_plan_entitlements()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple plan entitlement IDs (starting with pltl\_)
@@ -7964,7 +8640,7 @@ client.entitlements.count_plan_entitlements()
-
-**plan_id:** `typing.Optional[str]`
+**plan_id:** `typing.Optional[str]` — Filter plan entitlements by a single plan ID (starting with plan\_)
@@ -7972,7 +8648,7 @@ client.entitlements.count_plan_entitlements()
-
-**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**plan_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter plan entitlements by multiple plan IDs (starting with plan\_)
@@ -7980,7 +8656,15 @@ client.entitlements.count_plan_entitlements()
-
-**q:** `typing.Optional[str]`
+**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
@@ -8035,7 +8719,7 @@ client = Schematic(
api_key="YOUR_API_KEY",
)
client.entitlements.get_feature_usage_by_company(
- keys={"string": {"key": "value"}},
+ keys={"keys": {"key": "value"}},
)
```
@@ -8694,7 +9378,7 @@ client.crm.upsert_line_item(
-
-**term_month:** `typing.Optional[int]`
+**discount_percentage:** `typing.Optional[str]`
@@ -8702,7 +9386,7 @@ client.crm.upsert_line_item(
-
-**discount_percentage:** `typing.Optional[str]`
+**term_month:** `typing.Optional[int]`
@@ -9470,132 +10154,6 @@ client.events.get_event(
-
-
-
-
-client.events.list_metric_counts(...)
-
--
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```python
-from schematic import Schematic
-
-client = Schematic(
- api_key="YOUR_API_KEY",
-)
-client.events.list_metric_counts()
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**start_time:** `typing.Optional[dt.datetime]`
-
-
-
-
-
--
-
-**end_time:** `typing.Optional[dt.datetime]`
-
-
-
-
-
--
-
-**event_subtype:** `typing.Optional[str]`
-
-
-
-
-
--
-
-**event_subtypes:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
-
-
-
-
-
--
-
-**company_id:** `typing.Optional[str]`
-
-
-
-
-
--
-
-**company_ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
-
-
-
-
-
--
-
-**user_id:** `typing.Optional[str]`
-
-
-
-
-
--
-
-**limit:** `typing.Optional[int]` — Page limit (default 100)
-
-
-
-
-
--
-
-**offset:** `typing.Optional[int]` — Page offset (default 0)
-
-
-
-
-
--
-
-**grouping:** `typing.Optional[str]`
-
-
-
-
-
--
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
-
-
-
-
-
-
@@ -9895,7 +10453,7 @@ client.plans.list_plans()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**has_product_id:** `typing.Optional[bool]` — Filter out plans that do not have a billing product ID
@@ -9903,7 +10461,7 @@ client.plans.list_plans()
-
-**q:** `typing.Optional[str]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
@@ -9919,7 +10477,7 @@ client.plans.list_plans()
-
-**has_product_id:** `typing.Optional[bool]` — Filter out plans that do not have a billing product ID
+**q:** `typing.Optional[str]`
@@ -9935,6 +10493,14 @@ client.plans.list_plans()
-
+**without_product_id:** `typing.Optional[bool]` — Filter out plans that have a billing product ID
+
+
+
+
+
+-
+
**limit:** `typing.Optional[int]` — Page limit (default 100)
@@ -10258,7 +10824,8 @@ client = Schematic(
)
client.plans.upsert_billing_product_plan(
plan_id="plan_id",
- billing_product_id="billing_product_id",
+ is_free_plan=True,
+ is_trialable=True,
)
```
@@ -10283,7 +10850,23 @@ client.plans.upsert_billing_product_plan(
-
-**billing_product_id:** `str`
+**is_free_plan:** `bool`
+
+
+
+
+
+-
+
+**is_trialable:** `bool`
+
+
+
+
+
+-
+
+**billing_product_id:** `typing.Optional[str]`
@@ -10299,6 +10882,14 @@ client.plans.upsert_billing_product_plan(
-
+**trial_days:** `typing.Optional[int]`
+
+
+
+
+
+-
+
**yearly_price_id:** `typing.Optional[str]`
@@ -10361,7 +10952,7 @@ client.plans.count_plans()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**has_product_id:** `typing.Optional[bool]` — Filter out plans that do not have a billing product ID
@@ -10369,7 +10960,7 @@ client.plans.count_plans()
-
-**q:** `typing.Optional[str]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
@@ -10385,7 +10976,7 @@ client.plans.count_plans()
-
-**has_product_id:** `typing.Optional[bool]` — Filter out plans that do not have a billing product ID
+**q:** `typing.Optional[str]`
@@ -10401,6 +10992,14 @@ client.plans.count_plans()
-
+**without_product_id:** `typing.Optional[bool]` — Filter out plans that have a billing product ID
+
+
+
+
+
+-
+
**limit:** `typing.Optional[int]` — Page limit (default 100)
@@ -10495,6 +11094,7 @@ client = Schematic(
api_key="YOUR_API_KEY",
)
client.plangroups.create_plan_group(
+ add_on_ids=["add_on_ids"],
plan_ids=["plan_ids"],
)
@@ -10512,6 +11112,14 @@ client.plangroups.create_plan_group(
-
+**add_on_ids:** `typing.Sequence[str]`
+
+
+
+
+
+-
+
**plan_ids:** `typing.Sequence[str]`
@@ -10528,6 +11136,22 @@ client.plangroups.create_plan_group(
-
+**trial_days:** `typing.Optional[int]`
+
+
+
+
+
+-
+
+**trial_payment_method_required:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -10560,6 +11184,7 @@ client = Schematic(
)
client.plangroups.update_plan_group(
plan_group_id="plan_group_id",
+ add_on_ids=["add_on_ids"],
plan_ids=["plan_ids"],
)
@@ -10585,6 +11210,14 @@ client.plangroups.update_plan_group(
-
+**add_on_ids:** `typing.Sequence[str]`
+
+
+
+
+
+-
+
**plan_ids:** `typing.Sequence[str]`
@@ -10601,6 +11234,22 @@ client.plangroups.update_plan_group(
-
+**trial_days:** `typing.Optional[int]`
+
+
+
+
+
+-
+
+**trial_payment_method_required:** `typing.Optional[bool]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -10714,7 +11363,7 @@ client.webhooks.list_webhook_events()
-
-**webhook_id:** `typing.Optional[str]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
@@ -10722,7 +11371,7 @@ client.webhooks.list_webhook_events()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**q:** `typing.Optional[str]`
@@ -10730,7 +11379,7 @@ client.webhooks.list_webhook_events()
-
-**q:** `typing.Optional[str]`
+**webhook_id:** `typing.Optional[str]`
@@ -10856,7 +11505,7 @@ client.webhooks.count_webhook_events()
-
-**webhook_id:** `typing.Optional[str]`
+**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
@@ -10864,7 +11513,7 @@ client.webhooks.count_webhook_events()
-
-**ids:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]`
+**q:** `typing.Optional[str]`
@@ -10872,7 +11521,7 @@ client.webhooks.count_webhook_events()
-
-**q:** `typing.Optional[str]`
+**webhook_id:** `typing.Optional[str]`
diff --git a/src/schematic/__init__.py b/src/schematic/__init__.py
index 96184a6..12f119a 100644
--- a/src/schematic/__init__.py
+++ b/src/schematic/__init__.py
@@ -10,14 +10,17 @@
BillingCustomerResponseData,
BillingCustomerSubscription,
BillingCustomerWithSubscriptionsResponseData,
- BillingPlan,
+ BillingMeterResponseData,
BillingPriceResponseData,
+ BillingPriceView,
BillingProductDetailResponseData,
BillingProductForSubscriptionResponseData,
BillingProductPlanResponseData,
+ BillingProductPriceResponseData,
BillingProductPricing,
BillingProductResponseData,
BillingSubscriptionResponseData,
+ BillingSubscriptionView,
CheckFlagOutputWithFlagKey,
CheckFlagRequestBody,
CheckFlagResponseData,
@@ -28,11 +31,18 @@
CompanyMembershipResponseData,
CompanyOverrideResponseData,
CompanyPlanDetailResponseData,
+ CompanyPlanWithBillingSubView,
CompanyResponseData,
CompanySubscriptionResponseData,
+ ComponentCapabilities,
ComponentHydrateResponseData,
+ ComponentPreviewResponseData,
ComponentResponseData,
CountResponse,
+ CreateEntitlementReqCommon,
+ CreateEntitlementReqCommonMetricPeriod,
+ CreateEntitlementReqCommonMetricPeriodMonthReset,
+ CreateEntitlementReqCommonValueType,
CreateEventRequestBody,
CreateEventRequestBodyEventType,
CreateFlagRequestBody,
@@ -40,13 +50,11 @@
CreateOrUpdateConditionRequestBody,
CreateOrUpdateConditionRequestBodyConditionType,
CreateOrUpdateConditionRequestBodyMetricPeriod,
+ CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset,
CreateOrUpdateConditionRequestBodyOperator,
CreateOrUpdateFlagRequestBody,
CreateOrUpdateRuleRequestBody,
CreateOrUpdateRuleRequestBodyRuleType,
- CreateReqCommon,
- CreateReqCommonMetricPeriod,
- CreateReqCommonValueType,
CrmDealLineItem,
CrmDealResponseData,
CrmLineItemResponseData,
@@ -81,11 +89,12 @@
FeatureUsageResponseDataAllocationType,
FlagDetailResponseData,
FlagResponseData,
+ GenericPreviewObject,
InvoiceRequestBody,
InvoiceResponseData,
IssueTemporaryAccessTokenResponseData,
KeysRequestBody,
- MetricCountsHourlyResponseData,
+ MeterRequestBody,
PaginationFilter,
PaymentMethodRequestBody,
PaymentMethodResponseData,
@@ -98,12 +107,12 @@
PlanGroupResponseData,
PlanResponseData,
PreviewObject,
+ PreviewObjectResponseData,
RawEventBatchResponseData,
RawEventResponseData,
RuleConditionDetailResponseData,
RuleConditionGroupDetailResponseData,
RuleConditionGroupResponseData,
- RuleConditionResourceResponseData,
RuleConditionResponseData,
RuleDetailResponseData,
RuleResponseData,
@@ -111,14 +120,16 @@
SegmentStatusResp,
StripeEmbedInfo,
TemporaryAccessTokenResponseData,
- UpdateReqCommon,
- UpdateReqCommonMetricPeriod,
- UpdateReqCommonValueType,
+ UpdateEntitlementReqCommon,
+ UpdateEntitlementReqCommonMetricPeriod,
+ UpdateEntitlementReqCommonMetricPeriodMonthReset,
+ UpdateEntitlementReqCommonValueType,
UpdateRuleRequestBody,
UpsertCompanyRequestBody,
UpsertTraitRequestBody,
UpsertUserRequestBody,
UpsertUserSubRequestBody,
+ UsageBasedEntitlementResponseData,
UserDetailResponseData,
UserResponseData,
WebhookEventDetailResponseData,
@@ -169,17 +180,23 @@
CountBillingProductsResponse,
CountCustomersParams,
CountCustomersResponse,
+ DeleteProductPriceResponse,
ListBillingProductsParams,
ListBillingProductsResponse,
ListCustomersParams,
ListCustomersResponse,
ListInvoicesParams,
ListInvoicesResponse,
+ ListMetersParams,
+ ListMetersResponse,
ListPaymentMethodsParams,
ListPaymentMethodsResponse,
ListProductPricesParams,
ListProductPricesResponse,
+ SearchBillingPricesParams,
+ SearchBillingPricesResponse,
UpsertBillingCustomerResponse,
+ UpsertBillingMeterResponse,
UpsertBillingPriceResponse,
UpsertBillingProductResponse,
UpsertBillingSubscriptionResponse,
@@ -284,9 +301,11 @@
CountPlanEntitlementsParams,
CountPlanEntitlementsResponse,
CreateCompanyOverrideRequestBodyMetricPeriod,
+ CreateCompanyOverrideRequestBodyMetricPeriodMonthReset,
CreateCompanyOverrideRequestBodyValueType,
CreateCompanyOverrideResponse,
CreatePlanEntitlementRequestBodyMetricPeriod,
+ CreatePlanEntitlementRequestBodyMetricPeriodMonthReset,
CreatePlanEntitlementRequestBodyValueType,
CreatePlanEntitlementResponse,
DeleteCompanyOverrideResponse,
@@ -306,9 +325,11 @@
ListPlanEntitlementsParams,
ListPlanEntitlementsResponse,
UpdateCompanyOverrideRequestBodyMetricPeriod,
+ UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset,
UpdateCompanyOverrideRequestBodyValueType,
UpdateCompanyOverrideResponse,
UpdatePlanEntitlementRequestBodyMetricPeriod,
+ UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset,
UpdatePlanEntitlementRequestBodyValueType,
UpdatePlanEntitlementResponse,
)
@@ -323,8 +344,6 @@
GetSegmentIntegrationStatusResponse,
ListEventsParams,
ListEventsResponse,
- ListMetricCountsParams,
- ListMetricCountsResponse,
)
from .features import (
CheckFlagResponse,
@@ -406,14 +425,17 @@
"BillingCustomerResponseData",
"BillingCustomerSubscription",
"BillingCustomerWithSubscriptionsResponseData",
- "BillingPlan",
+ "BillingMeterResponseData",
"BillingPriceResponseData",
+ "BillingPriceView",
"BillingProductDetailResponseData",
"BillingProductForSubscriptionResponseData",
"BillingProductPlanResponseData",
+ "BillingProductPriceResponseData",
"BillingProductPricing",
"BillingProductResponseData",
"BillingSubscriptionResponseData",
+ "BillingSubscriptionView",
"CheckFlagOutputWithFlagKey",
"CheckFlagRequestBody",
"CheckFlagResponse",
@@ -426,9 +448,12 @@
"CompanyMembershipResponseData",
"CompanyOverrideResponseData",
"CompanyPlanDetailResponseData",
+ "CompanyPlanWithBillingSubView",
"CompanyResponseData",
"CompanySubscriptionResponseData",
+ "ComponentCapabilities",
"ComponentHydrateResponseData",
+ "ComponentPreviewResponseData",
"ComponentResponseData",
"CountApiKeysParams",
"CountApiKeysResponse",
@@ -481,11 +506,16 @@
"CountWebhooksResponse",
"CreateApiKeyResponse",
"CreateCompanyOverrideRequestBodyMetricPeriod",
+ "CreateCompanyOverrideRequestBodyMetricPeriodMonthReset",
"CreateCompanyOverrideRequestBodyValueType",
"CreateCompanyOverrideResponse",
"CreateCompanyResponse",
"CreateComponentRequestBodyEntityType",
"CreateComponentResponse",
+ "CreateEntitlementReqCommon",
+ "CreateEntitlementReqCommonMetricPeriod",
+ "CreateEntitlementReqCommonMetricPeriodMonthReset",
+ "CreateEntitlementReqCommonValueType",
"CreateEntityTraitDefinitionRequestBodyEntityType",
"CreateEntityTraitDefinitionRequestBodyTraitType",
"CreateEnvironmentRequestBodyEnvironmentType",
@@ -502,19 +532,18 @@
"CreateOrUpdateConditionRequestBody",
"CreateOrUpdateConditionRequestBodyConditionType",
"CreateOrUpdateConditionRequestBodyMetricPeriod",
+ "CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset",
"CreateOrUpdateConditionRequestBodyOperator",
"CreateOrUpdateFlagRequestBody",
"CreateOrUpdateRuleRequestBody",
"CreateOrUpdateRuleRequestBodyRuleType",
"CreatePlanEntitlementRequestBodyMetricPeriod",
+ "CreatePlanEntitlementRequestBodyMetricPeriodMonthReset",
"CreatePlanEntitlementRequestBodyValueType",
"CreatePlanEntitlementResponse",
"CreatePlanGroupResponse",
"CreatePlanRequestBodyPlanType",
"CreatePlanResponse",
- "CreateReqCommon",
- "CreateReqCommonMetricPeriod",
- "CreateReqCommonValueType",
"CreateUserResponse",
"CreateWebhookRequestBodyRequestTypesItem",
"CreateWebhookResponse",
@@ -535,6 +564,7 @@
"DeleteFlagResponse",
"DeletePlanEntitlementResponse",
"DeletePlanResponse",
+ "DeleteProductPriceResponse",
"DeleteResponse",
"DeleteUserByKeysResponse",
"DeleteUserResponse",
@@ -568,6 +598,7 @@
"FlagDetailResponseData",
"FlagResponseData",
"ForbiddenError",
+ "GenericPreviewObject",
"GetActiveCompanySubscriptionParams",
"GetActiveCompanySubscriptionResponse",
"GetActiveDealsParams",
@@ -651,8 +682,8 @@
"ListFlagsResponse",
"ListInvoicesParams",
"ListInvoicesResponse",
- "ListMetricCountsParams",
- "ListMetricCountsResponse",
+ "ListMetersParams",
+ "ListMetersResponse",
"ListPaymentMethodsParams",
"ListPaymentMethodsResponse",
"ListPlanEntitlementsParams",
@@ -674,7 +705,7 @@
"LookupCompanyResponse",
"LookupUserParams",
"LookupUserResponse",
- "MetricCountsHourlyResponseData",
+ "MeterRequestBody",
"NotFoundError",
"PaginationFilter",
"PaymentMethodRequestBody",
@@ -690,12 +721,12 @@
"PreviewComponentDataParams",
"PreviewComponentDataResponse",
"PreviewObject",
+ "PreviewObjectResponseData",
"RawEventBatchResponseData",
"RawEventResponseData",
"RuleConditionDetailResponseData",
"RuleConditionGroupDetailResponseData",
"RuleConditionGroupResponseData",
- "RuleConditionResourceResponseData",
"RuleConditionResponseData",
"RuleDetailResponseData",
"RuleResponseData",
@@ -703,6 +734,8 @@
"Schematic",
"SchematicConfig",
"SchematicEnvironment",
+ "SearchBillingPricesParams",
+ "SearchBillingPricesResponse",
"SegmentStatusResp",
"StripeEmbedInfo",
"TemporaryAccessTokenResponseData",
@@ -710,11 +743,16 @@
"UpdateApiKeyResponse",
"UpdateAudienceResponse",
"UpdateCompanyOverrideRequestBodyMetricPeriod",
+ "UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset",
"UpdateCompanyOverrideRequestBodyValueType",
"UpdateCompanyOverrideResponse",
"UpdateComponentRequestBodyEntityType",
"UpdateComponentRequestBodyState",
"UpdateComponentResponse",
+ "UpdateEntitlementReqCommon",
+ "UpdateEntitlementReqCommonMetricPeriod",
+ "UpdateEntitlementReqCommonMetricPeriodMonthReset",
+ "UpdateEntitlementReqCommonValueType",
"UpdateEntityTraitDefinitionRequestBodyTraitType",
"UpdateEntityTraitDefinitionResponse",
"UpdateEnvironmentRequestBodyEnvironmentType",
@@ -724,18 +762,17 @@
"UpdateFlagResponse",
"UpdateFlagRulesResponse",
"UpdatePlanEntitlementRequestBodyMetricPeriod",
+ "UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset",
"UpdatePlanEntitlementRequestBodyValueType",
"UpdatePlanEntitlementResponse",
"UpdatePlanGroupResponse",
"UpdatePlanResponse",
- "UpdateReqCommon",
- "UpdateReqCommonMetricPeriod",
- "UpdateReqCommonValueType",
"UpdateRuleRequestBody",
"UpdateWebhookRequestBodyRequestTypesItem",
"UpdateWebhookRequestBodyStatus",
"UpdateWebhookResponse",
"UpsertBillingCustomerResponse",
+ "UpsertBillingMeterResponse",
"UpsertBillingPriceResponse",
"UpsertBillingProductPlanResponse",
"UpsertBillingProductResponse",
@@ -754,6 +791,7 @@
"UpsertUserResponse",
"UpsertUserSubRequestBody",
"UpsertUserTraitResponse",
+ "UsageBasedEntitlementResponseData",
"UserDetailResponseData",
"UserResponseData",
"WebhookEventDetailResponseData",
diff --git a/src/schematic/accesstokens/client.py b/src/schematic/accesstokens/client.py
index a1ced65..add07bf 100644
--- a/src/schematic/accesstokens/client.py
+++ b/src/schematic/accesstokens/client.py
@@ -63,6 +63,9 @@ def issue_temporary_access_token(
"lookup": lookup,
"resource_type": resource_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -174,6 +177,9 @@ async def main() -> None:
"lookup": lookup,
"resource_type": resource_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
diff --git a/src/schematic/accounts/client.py b/src/schematic/accounts/client.py
index af4bfff..742f105 100644
--- a/src/schematic/accounts/client.py
+++ b/src/schematic/accounts/client.py
@@ -189,6 +189,9 @@ def create_api_key(
"environment_id": environment_id,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -377,6 +380,9 @@ def update_api_key(
"description": description,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1081,6 +1087,9 @@ def create_environment(
"environment_type": environment_type,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1269,6 +1278,9 @@ def update_environment(
"environment_type": environment_type,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1594,6 +1606,9 @@ async def main() -> None:
"environment_id": environment_id,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1798,6 +1813,9 @@ async def main() -> None:
"description": description,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2558,6 +2576,9 @@ async def main() -> None:
"environment_type": environment_type,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2762,6 +2783,9 @@ async def main() -> None:
"environment_type": environment_type,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
diff --git a/src/schematic/billing/__init__.py b/src/schematic/billing/__init__.py
index 356f147..377c2c6 100644
--- a/src/schematic/billing/__init__.py
+++ b/src/schematic/billing/__init__.py
@@ -5,17 +5,23 @@
CountBillingProductsResponse,
CountCustomersParams,
CountCustomersResponse,
+ DeleteProductPriceResponse,
ListBillingProductsParams,
ListBillingProductsResponse,
ListCustomersParams,
ListCustomersResponse,
ListInvoicesParams,
ListInvoicesResponse,
+ ListMetersParams,
+ ListMetersResponse,
ListPaymentMethodsParams,
ListPaymentMethodsResponse,
ListProductPricesParams,
ListProductPricesResponse,
+ SearchBillingPricesParams,
+ SearchBillingPricesResponse,
UpsertBillingCustomerResponse,
+ UpsertBillingMeterResponse,
UpsertBillingPriceResponse,
UpsertBillingProductResponse,
UpsertBillingSubscriptionResponse,
@@ -28,17 +34,23 @@
"CountBillingProductsResponse",
"CountCustomersParams",
"CountCustomersResponse",
+ "DeleteProductPriceResponse",
"ListBillingProductsParams",
"ListBillingProductsResponse",
"ListCustomersParams",
"ListCustomersResponse",
"ListInvoicesParams",
"ListInvoicesResponse",
+ "ListMetersParams",
+ "ListMetersResponse",
"ListPaymentMethodsParams",
"ListPaymentMethodsResponse",
"ListProductPricesParams",
"ListProductPricesResponse",
+ "SearchBillingPricesParams",
+ "SearchBillingPricesResponse",
"UpsertBillingCustomerResponse",
+ "UpsertBillingMeterResponse",
"UpsertBillingPriceResponse",
"UpsertBillingProductResponse",
"UpsertBillingSubscriptionResponse",
diff --git a/src/schematic/billing/client.py b/src/schematic/billing/client.py
index 4eb8a2a..202dc63 100644
--- a/src/schematic/billing/client.py
+++ b/src/schematic/billing/client.py
@@ -17,10 +17,15 @@
from .types.list_invoices_response import ListInvoicesResponse
import datetime as dt
from .types.upsert_invoice_response import UpsertInvoiceResponse
+from .types.list_meters_response import ListMetersResponse
+from .types.upsert_billing_meter_response import UpsertBillingMeterResponse
from .types.list_payment_methods_response import ListPaymentMethodsResponse
from .types.upsert_payment_method_response import UpsertPaymentMethodResponse
+from .types.search_billing_prices_response import SearchBillingPricesResponse
from .types.upsert_billing_price_response import UpsertBillingPriceResponse
from .types.list_product_prices_response import ListProductPricesResponse
+from .types.delete_product_price_response import DeleteProductPriceResponse
+from ..core.jsonable_encoder import jsonable_encoder
from .types.upsert_billing_product_response import UpsertBillingProductResponse
from .types.list_billing_products_response import ListBillingProductsResponse
from .types.count_billing_products_response import CountBillingProductsResponse
@@ -97,6 +102,9 @@ def upsert_billing_customer(
"meta": meta,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -489,11 +497,12 @@ def upsert_invoice(
collection_method: str,
currency: str,
customer_external_id: str,
- external_id: str,
subtotal: int,
due_date: typing.Optional[dt.datetime] = OMIT,
+ external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
subscription_external_id: typing.Optional[str] = OMIT,
+ url: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertInvoiceResponse:
"""
@@ -511,16 +520,18 @@ def upsert_invoice(
customer_external_id : str
- 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.
@@ -543,7 +554,6 @@ def upsert_invoice(
collection_method="collection_method",
currency="currency",
customer_external_id="customer_external_id",
- external_id="external_id",
subtotal=1,
)
"""
@@ -562,6 +572,10 @@ def upsert_invoice(
"payment_method_external_id": payment_method_external_id,
"subscription_external_id": subscription_external_id,
"subtotal": subtotal,
+ "url": url,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -620,6 +634,217 @@ def upsert_invoice(
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+ def list_meters(
+ self,
+ *,
+ display_name: typing.Optional[str] = None,
+ limit: typing.Optional[int] = None,
+ offset: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> ListMetersResponse:
+ """
+ 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.
+
+ Returns
+ -------
+ ListMetersResponse
+ OK
+
+ Examples
+ --------
+ from schematic import Schematic
+
+ client = Schematic(
+ api_key="YOUR_API_KEY",
+ )
+ client.billing.list_meters()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "billing/meter",
+ method="GET",
+ params={
+ "display_name": display_name,
+ "limit": limit,
+ "offset": offset,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ListMetersResponse,
+ parse_obj_as(
+ type_=ListMetersResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+
+ def upsert_billing_meter(
+ self,
+ *,
+ display_name: str,
+ event_name: str,
+ event_payload_key: str,
+ external_id: str,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> UpsertBillingMeterResponse:
+ """
+ Parameters
+ ----------
+ display_name : str
+
+ event_name : str
+
+ event_payload_key : str
+
+ external_id : str
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ UpsertBillingMeterResponse
+ Created
+
+ Examples
+ --------
+ 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",
+ )
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "billing/meter/upsert",
+ method="POST",
+ json={
+ "display_name": display_name,
+ "event_name": event_name,
+ "event_payload_key": event_payload_key,
+ "external_id": external_id,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ UpsertBillingMeterResponse,
+ parse_obj_as(
+ type_=UpsertBillingMeterResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+
def list_payment_methods(
self,
*,
@@ -736,6 +961,11 @@ def upsert_payment_method(
customer_external_id: str,
external_id: str,
payment_method_type: str,
+ account_last_4: typing.Optional[str] = OMIT,
+ account_name: typing.Optional[str] = OMIT,
+ bank_name: typing.Optional[str] = OMIT,
+ billing_email: typing.Optional[str] = OMIT,
+ billing_name: typing.Optional[str] = OMIT,
card_brand: typing.Optional[str] = OMIT,
card_exp_month: typing.Optional[int] = OMIT,
card_exp_year: typing.Optional[int] = OMIT,
@@ -752,6 +982,16 @@ def upsert_payment_method(
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]
@@ -787,6 +1027,11 @@ def upsert_payment_method(
"billing/payment-methods",
method="POST",
json={
+ "account_last4": account_last_4,
+ "account_name": account_name,
+ "bank_name": bank_name,
+ "billing_email": billing_email,
+ "billing_name": billing_name,
"card_brand": card_brand,
"card_exp_month": card_exp_month,
"card_exp_year": card_exp_year,
@@ -796,6 +1041,9 @@ def upsert_payment_method(
"payment_method_type": payment_method_type,
"subscription_external_id": subscription_external_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -853,18 +1101,135 @@ def upsert_payment_method(
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+ def search_billing_prices(
+ self,
+ *,
+ ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
+ interval: typing.Optional[str] = None,
+ usage_type: typing.Optional[str] = None,
+ price: typing.Optional[int] = None,
+ limit: typing.Optional[int] = None,
+ offset: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> SearchBillingPricesResponse:
+ """
+ Parameters
+ ----------
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+
+ interval : typing.Optional[str]
+
+ usage_type : typing.Optional[str]
+
+ price : typing.Optional[int]
+
+ limit : typing.Optional[int]
+ Page limit (default 100)
+
+ offset : typing.Optional[int]
+ Page offset (default 0)
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ SearchBillingPricesResponse
+ OK
+
+ Examples
+ --------
+ from schematic import Schematic
+
+ client = Schematic(
+ api_key="YOUR_API_KEY",
+ )
+ client.billing.search_billing_prices()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "billing/price",
+ method="GET",
+ params={
+ "ids": ids,
+ "interval": interval,
+ "usage_type": usage_type,
+ "price": price,
+ "limit": limit,
+ "offset": offset,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ SearchBillingPricesResponse,
+ parse_obj_as(
+ type_=SearchBillingPricesResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+
def upsert_billing_price(
self,
*,
+ currency: str,
interval: str,
price: int,
price_external_id: str,
product_external_id: str,
+ usage_type: str,
+ meter_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertBillingPriceResponse:
"""
Parameters
----------
+ currency : str
+
interval : str
price : int
@@ -873,6 +1238,10 @@ def upsert_billing_price(
product_external_id : str
+ usage_type : str
+
+ meter_id : typing.Optional[str]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -889,20 +1258,28 @@ def upsert_billing_price(
api_key="YOUR_API_KEY",
)
client.billing.upsert_billing_price(
+ currency="currency",
interval="interval",
price=1,
price_external_id="price_external_id",
product_external_id="product_external_id",
+ usage_type="usage_type",
)
"""
_response = self._client_wrapper.httpx_client.request(
"billing/price/upsert",
method="POST",
json={
+ "currency": currency,
"interval": interval,
+ "meter_id": meter_id,
"price": price,
"price_external_id": price_external_id,
"product_external_id": product_external_id,
+ "usage_type": usage_type,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -967,6 +1344,10 @@ def list_product_prices(
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
name: typing.Optional[str] = None,
q: typing.Optional[str] = None,
+ price_usage_type: typing.Optional[str] = None,
+ without_linked_to_plan: typing.Optional[bool] = None,
+ with_zero_price: typing.Optional[bool] = None,
+ with_prices_only: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -980,6 +1361,17 @@ def list_product_prices(
q : typing.Optional[str]
+ price_usage_type : typing.Optional[str]
+
+ without_linked_to_plan : typing.Optional[bool]
+ Filter products that are not linked to any plan
+
+ 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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -991,7 +1383,103 @@ def list_product_prices(
Returns
-------
- ListProductPricesResponse
+ ListProductPricesResponse
+ OK
+
+ Examples
+ --------
+ from schematic import Schematic
+
+ client = Schematic(
+ api_key="YOUR_API_KEY",
+ )
+ client.billing.list_product_prices()
+ """
+ _response = self._client_wrapper.httpx_client.request(
+ "billing/product/prices",
+ method="GET",
+ params={
+ "ids": ids,
+ "name": name,
+ "q": q,
+ "price_usage_type": price_usage_type,
+ "without_linked_to_plan": without_linked_to_plan,
+ "with_zero_price": with_zero_price,
+ "with_prices_only": with_prices_only,
+ "limit": limit,
+ "offset": offset,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ListProductPricesResponse,
+ parse_obj_as(
+ type_=ListProductPricesResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+
+ def delete_product_price(
+ self, billing_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> DeleteProductPriceResponse:
+ """
+ Parameters
+ ----------
+ billing_id : str
+ billing_id
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ DeleteProductPriceResponse
OK
Examples
@@ -1001,26 +1489,21 @@ def list_product_prices(
client = Schematic(
api_key="YOUR_API_KEY",
)
- client.billing.list_product_prices()
+ client.billing.delete_product_price(
+ billing_id="billing_id",
+ )
"""
_response = self._client_wrapper.httpx_client.request(
- "billing/product/prices",
- method="GET",
- params={
- "ids": ids,
- "name": name,
- "q": q,
- "limit": limit,
- "offset": offset,
- },
+ f"billing/product/prices/{jsonable_encoder(billing_id)}",
+ method="DELETE",
request_options=request_options,
)
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- ListProductPricesResponse,
+ DeleteProductPriceResponse,
parse_obj_as(
- type_=ListProductPricesResponse, # type: ignore
+ type_=DeleteProductPriceResponse, # type: ignore
object_=_response.json(),
),
)
@@ -1125,6 +1608,9 @@ def upsert_billing_product(
"price": price,
"quantity": quantity,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1188,6 +1674,10 @@ def list_billing_products(
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
name: typing.Optional[str] = None,
q: typing.Optional[str] = None,
+ price_usage_type: typing.Optional[str] = None,
+ without_linked_to_plan: typing.Optional[bool] = None,
+ with_zero_price: typing.Optional[bool] = None,
+ with_prices_only: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1201,6 +1691,17 @@ def list_billing_products(
q : typing.Optional[str]
+ price_usage_type : typing.Optional[str]
+
+ without_linked_to_plan : typing.Optional[bool]
+ Filter products that are not linked to any plan
+
+ 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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -1231,6 +1732,10 @@ def list_billing_products(
"ids": ids,
"name": name,
"q": q,
+ "price_usage_type": price_usage_type,
+ "without_linked_to_plan": without_linked_to_plan,
+ "with_zero_price": with_zero_price,
+ "with_prices_only": with_prices_only,
"limit": limit,
"offset": offset,
},
@@ -1296,6 +1801,10 @@ def count_billing_products(
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
name: typing.Optional[str] = None,
q: typing.Optional[str] = None,
+ price_usage_type: typing.Optional[str] = None,
+ without_linked_to_plan: typing.Optional[bool] = None,
+ with_zero_price: typing.Optional[bool] = None,
+ with_prices_only: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1309,6 +1818,17 @@ def count_billing_products(
q : typing.Optional[str]
+ price_usage_type : typing.Optional[str]
+
+ without_linked_to_plan : typing.Optional[bool]
+ Filter products that are not linked to any plan
+
+ 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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -1339,6 +1859,10 @@ def count_billing_products(
"ids": ids,
"name": name,
"q": q,
+ "price_usage_type": price_usage_type,
+ "without_linked_to_plan": without_linked_to_plan,
+ "with_zero_price": with_zero_price,
+ "with_prices_only": with_prices_only,
"limit": limit,
"offset": offset,
},
@@ -1401,6 +1925,7 @@ def count_billing_products(
def upsert_billing_subscription(
self,
*,
+ currency: str,
customer_external_id: str,
expired_at: dt.datetime,
product_external_ids: typing.Sequence[BillingProductPricing],
@@ -1408,12 +1933,17 @@ def upsert_billing_subscription(
total_price: int,
interval: typing.Optional[str] = OMIT,
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ period_end: typing.Optional[int] = OMIT,
+ period_start: typing.Optional[int] = OMIT,
status: typing.Optional[str] = OMIT,
+ trial_end: typing.Optional[int] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertBillingSubscriptionResponse:
"""
Parameters
----------
+ currency : str
+
customer_external_id : str
expired_at : dt.datetime
@@ -1428,8 +1958,14 @@ def upsert_billing_subscription(
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]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -1448,14 +1984,20 @@ def upsert_billing_subscription(
api_key="YOUR_API_KEY",
)
client.billing.upsert_billing_subscription(
+ currency="currency",
customer_external_id="customer_external_id",
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="usage_type",
)
],
subscription_external_id="subscription_external_id",
@@ -1466,16 +2008,23 @@ def upsert_billing_subscription(
"billing/subscription/upsert",
method="POST",
json={
+ "currency": currency,
"customer_external_id": customer_external_id,
"expired_at": expired_at,
"interval": interval,
"metadata": metadata,
+ "period_end": period_end,
+ "period_start": period_start,
"product_external_ids": convert_and_respect_annotation_metadata(
object_=product_external_ids, annotation=typing.Sequence[BillingProductPricing], direction="write"
),
"status": status,
"subscription_external_id": subscription_external_id,
"total_price": total_price,
+ "trial_end": trial_end,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -1607,6 +2156,9 @@ async def main() -> None:
"meta": meta,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2023,11 +2575,12 @@ async def upsert_invoice(
collection_method: str,
currency: str,
customer_external_id: str,
- external_id: str,
subtotal: int,
due_date: typing.Optional[dt.datetime] = OMIT,
+ external_id: typing.Optional[str] = OMIT,
payment_method_external_id: typing.Optional[str] = OMIT,
subscription_external_id: typing.Optional[str] = OMIT,
+ url: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertInvoiceResponse:
"""
@@ -2045,22 +2598,262 @@ async def upsert_invoice(
customer_external_id : str
- external_id : str
-
subtotal : int
- due_date : typing.Optional[dt.datetime]
+ 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.
+
+ Returns
+ -------
+ UpsertInvoiceResponse
+ Created
+
+ Examples
+ --------
+ import asyncio
+
+ from schematic import AsyncSchematic
+
+ client = AsyncSchematic(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await 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,
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "billing/invoices",
+ method="POST",
+ json={
+ "amount_due": amount_due,
+ "amount_paid": amount_paid,
+ "amount_remaining": amount_remaining,
+ "collection_method": collection_method,
+ "currency": currency,
+ "customer_external_id": customer_external_id,
+ "due_date": due_date,
+ "external_id": external_id,
+ "payment_method_external_id": payment_method_external_id,
+ "subscription_external_id": subscription_external_id,
+ "subtotal": subtotal,
+ "url": url,
+ },
+ headers={
+ "content-type": "application/json",
+ },
+ request_options=request_options,
+ omit=OMIT,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ UpsertInvoiceResponse,
+ parse_obj_as(
+ type_=UpsertInvoiceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def list_meters(
+ self,
+ *,
+ display_name: typing.Optional[str] = None,
+ limit: typing.Optional[int] = None,
+ offset: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> ListMetersResponse:
+ """
+ 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.
+
+ Returns
+ -------
+ ListMetersResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from schematic import AsyncSchematic
+
+ client = AsyncSchematic(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.billing.list_meters()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "billing/meter",
+ method="GET",
+ params={
+ "display_name": display_name,
+ "limit": limit,
+ "offset": offset,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ ListMetersResponse,
+ parse_obj_as(
+ type_=ListMetersResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+
+ async def upsert_billing_meter(
+ self,
+ *,
+ display_name: str,
+ event_name: str,
+ event_payload_key: str,
+ external_id: str,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> UpsertBillingMeterResponse:
+ """
+ Parameters
+ ----------
+ display_name : str
+
+ event_name : str
- payment_method_external_id : typing.Optional[str]
+ event_payload_key : str
- subscription_external_id : typing.Optional[str]
+ external_id : str
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
Returns
-------
- UpsertInvoiceResponse
+ UpsertBillingMeterResponse
Created
Examples
@@ -2075,35 +2868,27 @@ async def upsert_invoice(
async def main() -> None:
- await 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",
+ await client.billing.upsert_billing_meter(
+ display_name="display_name",
+ event_name="event_name",
+ event_payload_key="event_payload_key",
external_id="external_id",
- subtotal=1,
)
asyncio.run(main())
"""
_response = await self._client_wrapper.httpx_client.request(
- "billing/invoices",
+ "billing/meter/upsert",
method="POST",
json={
- "amount_due": amount_due,
- "amount_paid": amount_paid,
- "amount_remaining": amount_remaining,
- "collection_method": collection_method,
- "currency": currency,
- "customer_external_id": customer_external_id,
- "due_date": due_date,
+ "display_name": display_name,
+ "event_name": event_name,
+ "event_payload_key": event_payload_key,
"external_id": external_id,
- "payment_method_external_id": payment_method_external_id,
- "subscription_external_id": subscription_external_id,
- "subtotal": subtotal,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -2111,9 +2896,9 @@ async def main() -> None:
try:
if 200 <= _response.status_code < 300:
return typing.cast(
- UpsertInvoiceResponse,
+ UpsertBillingMeterResponse,
parse_obj_as(
- type_=UpsertInvoiceResponse, # type: ignore
+ type_=UpsertBillingMeterResponse, # type: ignore
object_=_response.json(),
),
)
@@ -2286,6 +3071,11 @@ async def upsert_payment_method(
customer_external_id: str,
external_id: str,
payment_method_type: str,
+ account_last_4: typing.Optional[str] = OMIT,
+ account_name: typing.Optional[str] = OMIT,
+ bank_name: typing.Optional[str] = OMIT,
+ billing_email: typing.Optional[str] = OMIT,
+ billing_name: typing.Optional[str] = OMIT,
card_brand: typing.Optional[str] = OMIT,
card_exp_month: typing.Optional[int] = OMIT,
card_exp_year: typing.Optional[int] = OMIT,
@@ -2302,6 +3092,16 @@ async def upsert_payment_method(
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]
@@ -2345,6 +3145,11 @@ async def main() -> None:
"billing/payment-methods",
method="POST",
json={
+ "account_last4": account_last_4,
+ "account_name": account_name,
+ "bank_name": bank_name,
+ "billing_email": billing_email,
+ "billing_name": billing_name,
"card_brand": card_brand,
"card_exp_month": card_exp_month,
"card_exp_year": card_exp_year,
@@ -2354,6 +3159,9 @@ async def main() -> None:
"payment_method_type": payment_method_type,
"subscription_external_id": subscription_external_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2411,18 +3219,143 @@ async def main() -> None:
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+ async def search_billing_prices(
+ self,
+ *,
+ ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
+ interval: typing.Optional[str] = None,
+ usage_type: typing.Optional[str] = None,
+ price: typing.Optional[int] = None,
+ limit: typing.Optional[int] = None,
+ offset: typing.Optional[int] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> SearchBillingPricesResponse:
+ """
+ Parameters
+ ----------
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+
+ interval : typing.Optional[str]
+
+ usage_type : typing.Optional[str]
+
+ price : typing.Optional[int]
+
+ limit : typing.Optional[int]
+ Page limit (default 100)
+
+ offset : typing.Optional[int]
+ Page offset (default 0)
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ SearchBillingPricesResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from schematic import AsyncSchematic
+
+ client = AsyncSchematic(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.billing.search_billing_prices()
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ "billing/price",
+ method="GET",
+ params={
+ "ids": ids,
+ "interval": interval,
+ "usage_type": usage_type,
+ "price": price,
+ "limit": limit,
+ "offset": offset,
+ },
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ SearchBillingPricesResponse,
+ parse_obj_as(
+ type_=SearchBillingPricesResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+
async def upsert_billing_price(
self,
*,
+ currency: str,
interval: str,
price: int,
price_external_id: str,
product_external_id: str,
+ usage_type: str,
+ meter_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertBillingPriceResponse:
"""
Parameters
----------
+ currency : str
+
interval : str
price : int
@@ -2431,6 +3364,10 @@ async def upsert_billing_price(
product_external_id : str
+ usage_type : str
+
+ meter_id : typing.Optional[str]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -2452,10 +3389,12 @@ async def upsert_billing_price(
async def main() -> None:
await client.billing.upsert_billing_price(
+ currency="currency",
interval="interval",
price=1,
price_external_id="price_external_id",
product_external_id="product_external_id",
+ usage_type="usage_type",
)
@@ -2465,10 +3404,16 @@ async def main() -> None:
"billing/price/upsert",
method="POST",
json={
+ "currency": currency,
"interval": interval,
+ "meter_id": meter_id,
"price": price,
"price_external_id": price_external_id,
"product_external_id": product_external_id,
+ "usage_type": usage_type,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -2533,6 +3478,10 @@ async def list_product_prices(
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
name: typing.Optional[str] = None,
q: typing.Optional[str] = None,
+ price_usage_type: typing.Optional[str] = None,
+ without_linked_to_plan: typing.Optional[bool] = None,
+ with_zero_price: typing.Optional[bool] = None,
+ with_prices_only: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -2546,6 +3495,17 @@ async def list_product_prices(
q : typing.Optional[str]
+ price_usage_type : typing.Optional[str]
+
+ without_linked_to_plan : typing.Optional[bool]
+ Filter products that are not linked to any plan
+
+ 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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -2584,6 +3544,10 @@ async def main() -> None:
"ids": ids,
"name": name,
"q": q,
+ "price_usage_type": price_usage_type,
+ "without_linked_to_plan": without_linked_to_plan,
+ "with_zero_price": with_zero_price,
+ "with_prices_only": with_prices_only,
"limit": limit,
"offset": offset,
},
@@ -2643,6 +3607,101 @@ async def main() -> None:
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+ async def delete_product_price(
+ self, billing_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ ) -> DeleteProductPriceResponse:
+ """
+ Parameters
+ ----------
+ billing_id : str
+ billing_id
+
+ request_options : typing.Optional[RequestOptions]
+ Request-specific configuration.
+
+ Returns
+ -------
+ DeleteProductPriceResponse
+ OK
+
+ Examples
+ --------
+ import asyncio
+
+ from schematic import AsyncSchematic
+
+ client = AsyncSchematic(
+ api_key="YOUR_API_KEY",
+ )
+
+
+ async def main() -> None:
+ await client.billing.delete_product_price(
+ billing_id="billing_id",
+ )
+
+
+ asyncio.run(main())
+ """
+ _response = await self._client_wrapper.httpx_client.request(
+ f"billing/product/prices/{jsonable_encoder(billing_id)}",
+ method="DELETE",
+ request_options=request_options,
+ )
+ try:
+ if 200 <= _response.status_code < 300:
+ return typing.cast(
+ DeleteProductPriceResponse,
+ parse_obj_as(
+ type_=DeleteProductPriceResponse, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ if _response.status_code == 400:
+ raise BadRequestError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 401:
+ raise UnauthorizedError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 403:
+ raise ForbiddenError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ if _response.status_code == 500:
+ raise InternalServerError(
+ typing.cast(
+ types_api_error_ApiError,
+ parse_obj_as(
+ type_=types_api_error_ApiError, # type: ignore
+ object_=_response.json(),
+ ),
+ )
+ )
+ _response_json = _response.json()
+ except JSONDecodeError:
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
+ raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
+
async def upsert_billing_product(
self,
*,
@@ -2707,6 +3766,9 @@ async def main() -> None:
"price": price,
"quantity": quantity,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2770,6 +3832,10 @@ async def list_billing_products(
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
name: typing.Optional[str] = None,
q: typing.Optional[str] = None,
+ price_usage_type: typing.Optional[str] = None,
+ without_linked_to_plan: typing.Optional[bool] = None,
+ with_zero_price: typing.Optional[bool] = None,
+ with_prices_only: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -2783,6 +3849,17 @@ async def list_billing_products(
q : typing.Optional[str]
+ price_usage_type : typing.Optional[str]
+
+ without_linked_to_plan : typing.Optional[bool]
+ Filter products that are not linked to any plan
+
+ 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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -2821,6 +3898,10 @@ async def main() -> None:
"ids": ids,
"name": name,
"q": q,
+ "price_usage_type": price_usage_type,
+ "without_linked_to_plan": without_linked_to_plan,
+ "with_zero_price": with_zero_price,
+ "with_prices_only": with_prices_only,
"limit": limit,
"offset": offset,
},
@@ -2886,6 +3967,10 @@ async def count_billing_products(
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
name: typing.Optional[str] = None,
q: typing.Optional[str] = None,
+ price_usage_type: typing.Optional[str] = None,
+ without_linked_to_plan: typing.Optional[bool] = None,
+ with_zero_price: typing.Optional[bool] = None,
+ with_prices_only: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -2899,6 +3984,17 @@ async def count_billing_products(
q : typing.Optional[str]
+ price_usage_type : typing.Optional[str]
+
+ without_linked_to_plan : typing.Optional[bool]
+ Filter products that are not linked to any plan
+
+ 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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -2937,6 +4033,10 @@ async def main() -> None:
"ids": ids,
"name": name,
"q": q,
+ "price_usage_type": price_usage_type,
+ "without_linked_to_plan": without_linked_to_plan,
+ "with_zero_price": with_zero_price,
+ "with_prices_only": with_prices_only,
"limit": limit,
"offset": offset,
},
@@ -2999,6 +4099,7 @@ async def main() -> None:
async def upsert_billing_subscription(
self,
*,
+ currency: str,
customer_external_id: str,
expired_at: dt.datetime,
product_external_ids: typing.Sequence[BillingProductPricing],
@@ -3006,12 +4107,17 @@ async def upsert_billing_subscription(
total_price: int,
interval: typing.Optional[str] = OMIT,
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
+ period_end: typing.Optional[int] = OMIT,
+ period_start: typing.Optional[int] = OMIT,
status: typing.Optional[str] = OMIT,
+ trial_end: typing.Optional[int] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertBillingSubscriptionResponse:
"""
Parameters
----------
+ currency : str
+
customer_external_id : str
expired_at : dt.datetime
@@ -3026,8 +4132,14 @@ async def upsert_billing_subscription(
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]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -3050,14 +4162,20 @@ async def upsert_billing_subscription(
async def main() -> None:
await client.billing.upsert_billing_subscription(
+ currency="currency",
customer_external_id="customer_external_id",
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="usage_type",
)
],
subscription_external_id="subscription_external_id",
@@ -3071,16 +4189,23 @@ async def main() -> None:
"billing/subscription/upsert",
method="POST",
json={
+ "currency": currency,
"customer_external_id": customer_external_id,
"expired_at": expired_at,
"interval": interval,
"metadata": metadata,
+ "period_end": period_end,
+ "period_start": period_start,
"product_external_ids": convert_and_respect_annotation_metadata(
object_=product_external_ids, annotation=typing.Sequence[BillingProductPricing], direction="write"
),
"status": status,
"subscription_external_id": subscription_external_id,
"total_price": total_price,
+ "trial_end": trial_end,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
diff --git a/src/schematic/billing/types/__init__.py b/src/schematic/billing/types/__init__.py
index 6e74bbf..414a4ef 100644
--- a/src/schematic/billing/types/__init__.py
+++ b/src/schematic/billing/types/__init__.py
@@ -4,17 +4,23 @@
from .count_billing_products_response import CountBillingProductsResponse
from .count_customers_params import CountCustomersParams
from .count_customers_response import CountCustomersResponse
+from .delete_product_price_response import DeleteProductPriceResponse
from .list_billing_products_params import ListBillingProductsParams
from .list_billing_products_response import ListBillingProductsResponse
from .list_customers_params import ListCustomersParams
from .list_customers_response import ListCustomersResponse
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_response import ListProductPricesResponse
+from .search_billing_prices_params import SearchBillingPricesParams
+from .search_billing_prices_response import SearchBillingPricesResponse
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
@@ -26,17 +32,23 @@
"CountBillingProductsResponse",
"CountCustomersParams",
"CountCustomersResponse",
+ "DeleteProductPriceResponse",
"ListBillingProductsParams",
"ListBillingProductsResponse",
"ListCustomersParams",
"ListCustomersResponse",
"ListInvoicesParams",
"ListInvoicesResponse",
+ "ListMetersParams",
+ "ListMetersResponse",
"ListPaymentMethodsParams",
"ListPaymentMethodsResponse",
"ListProductPricesParams",
"ListProductPricesResponse",
+ "SearchBillingPricesParams",
+ "SearchBillingPricesResponse",
"UpsertBillingCustomerResponse",
+ "UpsertBillingMeterResponse",
"UpsertBillingPriceResponse",
"UpsertBillingProductResponse",
"UpsertBillingSubscriptionResponse",
diff --git a/src/schematic/billing/types/count_billing_products_params.py b/src/schematic/billing/types/count_billing_products_params.py
index e100147..f1ee291 100644
--- a/src/schematic/billing/types/count_billing_products_params.py
+++ b/src/schematic/billing/types/count_billing_products_params.py
@@ -23,7 +23,22 @@ class CountBillingProductsParams(UniversalBaseModel):
Page offset (default 0)
"""
+ price_usage_type: typing.Optional[str] = None
q: typing.Optional[str] = None
+ with_prices_only: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter products that have prices
+ """
+
+ with_zero_price: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter products that have zero price for free subscription type
+ """
+
+ without_linked_to_plan: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter products that are not linked to any plan
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/billing/types/delete_product_price_response.py b/src/schematic/billing/types/delete_product_price_response.py
new file mode 100644
index 0000000..00e13c6
--- /dev/null
+++ b/src/schematic/billing/types/delete_product_price_response.py
@@ -0,0 +1,24 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ...core.pydantic_utilities import UniversalBaseModel
+from ...types.delete_response import DeleteResponse
+import typing
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class DeleteProductPriceResponse(UniversalBaseModel):
+ data: DeleteResponse
+ params: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
+ """
+ Input parameters
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/billing/types/list_billing_products_params.py b/src/schematic/billing/types/list_billing_products_params.py
index 2b38ba5..15199ec 100644
--- a/src/schematic/billing/types/list_billing_products_params.py
+++ b/src/schematic/billing/types/list_billing_products_params.py
@@ -23,7 +23,22 @@ class ListBillingProductsParams(UniversalBaseModel):
Page offset (default 0)
"""
+ price_usage_type: typing.Optional[str] = None
q: typing.Optional[str] = None
+ with_prices_only: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter products that have prices
+ """
+
+ with_zero_price: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter products that have zero price for free subscription type
+ """
+
+ without_linked_to_plan: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter products that are not linked to any plan
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/billing/types/list_meters_params.py b/src/schematic/billing/types/list_meters_params.py
new file mode 100644
index 0000000..b234fbb
--- /dev/null
+++ b/src/schematic/billing/types/list_meters_params.py
@@ -0,0 +1,32 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ...core.pydantic_utilities import UniversalBaseModel
+import typing
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class ListMetersParams(UniversalBaseModel):
+ """
+ Input parameters
+ """
+
+ display_name: typing.Optional[str] = None
+ limit: typing.Optional[int] = pydantic.Field(default=None)
+ """
+ Page limit (default 100)
+ """
+
+ offset: typing.Optional[int] = pydantic.Field(default=None)
+ """
+ Page offset (default 0)
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/events/types/list_metric_counts_response.py b/src/schematic/billing/types/list_meters_response.py
similarity index 64%
rename from src/schematic/events/types/list_metric_counts_response.py
rename to src/schematic/billing/types/list_meters_response.py
index 9bfd070..3a63e0c 100644
--- a/src/schematic/events/types/list_metric_counts_response.py
+++ b/src/schematic/billing/types/list_meters_response.py
@@ -2,19 +2,19 @@
from ...core.pydantic_utilities import UniversalBaseModel
import typing
-from ...types.metric_counts_hourly_response_data import MetricCountsHourlyResponseData
+from ...types.billing_meter_response_data import BillingMeterResponseData
import pydantic
-from .list_metric_counts_params import ListMetricCountsParams
+from .list_meters_params import ListMetersParams
from ...core.pydantic_utilities import IS_PYDANTIC_V2
-class ListMetricCountsResponse(UniversalBaseModel):
- data: typing.List[MetricCountsHourlyResponseData] = pydantic.Field()
+class ListMetersResponse(UniversalBaseModel):
+ data: typing.List[BillingMeterResponseData] = pydantic.Field()
"""
The returned resources
"""
- params: ListMetricCountsParams = pydantic.Field()
+ params: ListMetersParams = pydantic.Field()
"""
Input parameters
"""
diff --git a/src/schematic/billing/types/list_product_prices_params.py b/src/schematic/billing/types/list_product_prices_params.py
index 0d1b245..9bdeacd 100644
--- a/src/schematic/billing/types/list_product_prices_params.py
+++ b/src/schematic/billing/types/list_product_prices_params.py
@@ -23,7 +23,22 @@ class ListProductPricesParams(UniversalBaseModel):
Page offset (default 0)
"""
+ price_usage_type: typing.Optional[str] = None
q: typing.Optional[str] = None
+ with_prices_only: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter products that have prices
+ """
+
+ with_zero_price: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter products that have zero price for free subscription type
+ """
+
+ without_linked_to_plan: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter products that are not linked to any plan
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/events/types/list_metric_counts_params.py b/src/schematic/billing/types/search_billing_prices_params.py
similarity index 61%
rename from src/schematic/events/types/list_metric_counts_params.py
rename to src/schematic/billing/types/search_billing_prices_params.py
index ba226b6..74499f8 100644
--- a/src/schematic/events/types/list_metric_counts_params.py
+++ b/src/schematic/billing/types/search_billing_prices_params.py
@@ -2,22 +2,17 @@
from ...core.pydantic_utilities import UniversalBaseModel
import typing
-import datetime as dt
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2
-class ListMetricCountsParams(UniversalBaseModel):
+class SearchBillingPricesParams(UniversalBaseModel):
"""
Input parameters
"""
- company_id: typing.Optional[str] = None
- company_ids: typing.Optional[typing.List[str]] = None
- end_time: typing.Optional[dt.datetime] = None
- event_subtype: typing.Optional[str] = None
- event_subtypes: typing.Optional[typing.List[str]] = None
- grouping: typing.Optional[str] = None
+ ids: typing.Optional[typing.List[str]] = None
+ interval: typing.Optional[str] = None
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
@@ -28,8 +23,8 @@ class ListMetricCountsParams(UniversalBaseModel):
Page offset (default 0)
"""
- start_time: typing.Optional[dt.datetime] = None
- user_id: typing.Optional[str] = None
+ price: typing.Optional[int] = None
+ usage_type: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/billing/types/search_billing_prices_response.py b/src/schematic/billing/types/search_billing_prices_response.py
new file mode 100644
index 0000000..bc90739
--- /dev/null
+++ b/src/schematic/billing/types/search_billing_prices_response.py
@@ -0,0 +1,29 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ...core.pydantic_utilities import UniversalBaseModel
+import typing
+from ...types.billing_price_view import BillingPriceView
+import pydantic
+from .search_billing_prices_params import SearchBillingPricesParams
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class SearchBillingPricesResponse(UniversalBaseModel):
+ data: typing.List[BillingPriceView] = pydantic.Field()
+ """
+ The returned resources
+ """
+
+ params: SearchBillingPricesParams = pydantic.Field()
+ """
+ Input parameters
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/billing/types/upsert_billing_meter_response.py b/src/schematic/billing/types/upsert_billing_meter_response.py
new file mode 100644
index 0000000..d9b563d
--- /dev/null
+++ b/src/schematic/billing/types/upsert_billing_meter_response.py
@@ -0,0 +1,24 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ...core.pydantic_utilities import UniversalBaseModel
+from ...types.billing_meter_response_data import BillingMeterResponseData
+import typing
+import pydantic
+from ...core.pydantic_utilities import IS_PYDANTIC_V2
+
+
+class UpsertBillingMeterResponse(UniversalBaseModel):
+ data: BillingMeterResponseData
+ params: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
+ """
+ Input parameters
+ """
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/companies/client.py b/src/schematic/companies/client.py
index d2033db..31be254 100644
--- a/src/schematic/companies/client.py
+++ b/src/schematic/companies/client.py
@@ -86,11 +86,13 @@ def list_companies(
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 filter
+ 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
@@ -494,11 +496,13 @@ def count_companies(
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 filter
+ 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
@@ -830,7 +834,7 @@ def lookup_company(
api_key="YOUR_API_KEY",
)
client.companies.lookup_company(
- keys={"string": {"key": "value"}},
+ keys={"keys": {"key": "value"}},
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -1143,6 +1147,9 @@ def get_or_create_company_membership(
"company_id": company_id,
"user_id": user_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1290,7 +1297,8 @@ def delete_company_membership(
def get_active_company_subscription(
self,
*,
- company_id: str,
+ company_id: typing.Optional[str] = None,
+ company_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1298,7 +1306,9 @@ def get_active_company_subscription(
"""
Parameters
----------
- company_id : str
+ company_id : typing.Optional[str]
+
+ company_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
limit : typing.Optional[int]
Page limit (default 100)
@@ -1321,15 +1331,14 @@ def get_active_company_subscription(
client = Schematic(
api_key="YOUR_API_KEY",
)
- client.companies.get_active_company_subscription(
- company_id="company_id",
- )
+ client.companies.get_active_company_subscription()
"""
_response = self._client_wrapper.httpx_client.request(
"company-subscriptions",
method="GET",
params={
"company_id": company_id,
+ "company_ids": company_ids,
"limit": limit,
"offset": offset,
},
@@ -1725,8 +1734,8 @@ def list_entity_trait_definitions(
*,
entity_type: typing.Optional[ListEntityTraitDefinitionsRequestEntityType] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- trait_type: typing.Optional[ListEntityTraitDefinitionsRequestTraitType] = None,
q: typing.Optional[str] = None,
+ trait_type: typing.Optional[ListEntityTraitDefinitionsRequestTraitType] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1738,10 +1747,10 @@ def list_entity_trait_definitions(
ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
- trait_type : typing.Optional[ListEntityTraitDefinitionsRequestTraitType]
-
q : typing.Optional[str]
+ trait_type : typing.Optional[ListEntityTraitDefinitionsRequestTraitType]
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -1771,8 +1780,8 @@ def list_entity_trait_definitions(
params={
"entity_type": entity_type,
"ids": ids,
- "trait_type": trait_type,
"q": q,
+ "trait_type": trait_type,
"limit": limit,
"offset": offset,
},
@@ -1882,6 +1891,9 @@ def get_or_create_entity_trait_definition(
"hierarchy": hierarchy,
"trait_type": trait_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2071,6 +2083,9 @@ def update_entity_trait_definition(
"display_name": display_name,
"trait_type": trait_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2143,8 +2158,8 @@ def count_entity_trait_definitions(
*,
entity_type: typing.Optional[CountEntityTraitDefinitionsRequestEntityType] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- trait_type: typing.Optional[CountEntityTraitDefinitionsRequestTraitType] = None,
q: typing.Optional[str] = None,
+ trait_type: typing.Optional[CountEntityTraitDefinitionsRequestTraitType] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -2156,10 +2171,10 @@ def count_entity_trait_definitions(
ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
- trait_type : typing.Optional[CountEntityTraitDefinitionsRequestTraitType]
-
q : typing.Optional[str]
+ trait_type : typing.Optional[CountEntityTraitDefinitionsRequestTraitType]
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -2189,8 +2204,8 @@ def count_entity_trait_definitions(
params={
"entity_type": entity_type,
"ids": ids,
- "trait_type": trait_type,
"q": q,
+ "trait_type": trait_type,
"limit": limit,
"offset": offset,
},
@@ -2486,13 +2501,16 @@ def list_users(
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 filter
+ Search for users by name, keys or string traits
limit : typing.Optional[int]
Page limit (default 100)
@@ -2897,13 +2915,16 @@ def count_users(
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 filter
+ Search for users by name, keys or string traits
limit : typing.Optional[int]
Page limit (default 100)
@@ -3239,7 +3260,7 @@ def lookup_user(
api_key="YOUR_API_KEY",
)
client.companies.lookup_user(
- keys={"string": {"key": "value"}},
+ keys={"keys": {"key": "value"}},
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -3325,11 +3346,13 @@ async def list_companies(
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 filter
+ 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
@@ -3765,11 +3788,13 @@ async def count_companies(
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 filter
+ 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
@@ -4130,7 +4155,7 @@ async def lookup_company(
async def main() -> None:
await client.companies.lookup_company(
- keys={"string": {"key": "value"}},
+ keys={"keys": {"key": "value"}},
)
@@ -4470,6 +4495,9 @@ async def main() -> None:
"company_id": company_id,
"user_id": user_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -4625,7 +4653,8 @@ async def main() -> None:
async def get_active_company_subscription(
self,
*,
- company_id: str,
+ company_id: typing.Optional[str] = None,
+ company_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -4633,7 +4662,9 @@ async def get_active_company_subscription(
"""
Parameters
----------
- company_id : str
+ company_id : typing.Optional[str]
+
+ company_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
limit : typing.Optional[int]
Page limit (default 100)
@@ -4661,9 +4692,7 @@ async def get_active_company_subscription(
async def main() -> None:
- await client.companies.get_active_company_subscription(
- company_id="company_id",
- )
+ await client.companies.get_active_company_subscription()
asyncio.run(main())
@@ -4673,6 +4702,7 @@ async def main() -> None:
method="GET",
params={
"company_id": company_id,
+ "company_ids": company_ids,
"limit": limit,
"offset": offset,
},
@@ -5092,8 +5122,8 @@ async def list_entity_trait_definitions(
*,
entity_type: typing.Optional[ListEntityTraitDefinitionsRequestEntityType] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- trait_type: typing.Optional[ListEntityTraitDefinitionsRequestTraitType] = None,
q: typing.Optional[str] = None,
+ trait_type: typing.Optional[ListEntityTraitDefinitionsRequestTraitType] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -5105,10 +5135,10 @@ async def list_entity_trait_definitions(
ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
- trait_type : typing.Optional[ListEntityTraitDefinitionsRequestTraitType]
-
q : typing.Optional[str]
+ trait_type : typing.Optional[ListEntityTraitDefinitionsRequestTraitType]
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -5146,8 +5176,8 @@ async def main() -> None:
params={
"entity_type": entity_type,
"ids": ids,
- "trait_type": trait_type,
"q": q,
+ "trait_type": trait_type,
"limit": limit,
"offset": offset,
},
@@ -5265,6 +5295,9 @@ async def main() -> None:
"hierarchy": hierarchy,
"trait_type": trait_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -5470,6 +5503,9 @@ async def main() -> None:
"display_name": display_name,
"trait_type": trait_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -5542,8 +5578,8 @@ async def count_entity_trait_definitions(
*,
entity_type: typing.Optional[CountEntityTraitDefinitionsRequestEntityType] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- trait_type: typing.Optional[CountEntityTraitDefinitionsRequestTraitType] = None,
q: typing.Optional[str] = None,
+ trait_type: typing.Optional[CountEntityTraitDefinitionsRequestTraitType] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -5555,10 +5591,10 @@ async def count_entity_trait_definitions(
ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
- trait_type : typing.Optional[CountEntityTraitDefinitionsRequestTraitType]
-
q : typing.Optional[str]
+ trait_type : typing.Optional[CountEntityTraitDefinitionsRequestTraitType]
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -5596,8 +5632,8 @@ async def main() -> None:
params={
"entity_type": entity_type,
"ids": ids,
- "trait_type": trait_type,
"q": q,
+ "trait_type": trait_type,
"limit": limit,
"offset": offset,
},
@@ -5909,13 +5945,16 @@ async def list_users(
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 filter
+ Search for users by name, keys or string traits
limit : typing.Optional[int]
Page limit (default 100)
@@ -6354,13 +6393,16 @@ async def count_users(
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 filter
+ Search for users by name, keys or string traits
limit : typing.Optional[int]
Page limit (default 100)
@@ -6725,7 +6767,7 @@ async def lookup_user(
async def main() -> None:
await client.companies.lookup_user(
- keys={"string": {"key": "value"}},
+ keys={"keys": {"key": "value"}},
)
diff --git a/src/schematic/companies/types/count_companies_params.py b/src/schematic/companies/types/count_companies_params.py
index f597f7b..3efb4ea 100644
--- a/src/schematic/companies/types/count_companies_params.py
+++ b/src/schematic/companies/types/count_companies_params.py
@@ -11,7 +11,11 @@ class CountCompaniesParams(UniversalBaseModel):
Input parameters
"""
- ids: typing.Optional[typing.List[str]] = None
+ ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter companies by multiple company IDs (starts with comp\_)
+ """
+
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
@@ -22,10 +26,14 @@ class CountCompaniesParams(UniversalBaseModel):
Page offset (default 0)
"""
- plan_id: typing.Optional[str] = None
+ plan_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter companies by plan ID (starts with plan\_)
+ """
+
q: typing.Optional[str] = pydantic.Field(default=None)
"""
- Search filter
+ Search for companies by name, keys or string traits
"""
without_feature_override_for: typing.Optional[str] = pydantic.Field(default=None)
diff --git a/src/schematic/companies/types/count_users_params.py b/src/schematic/companies/types/count_users_params.py
index 5336cc9..4f93e50 100644
--- a/src/schematic/companies/types/count_users_params.py
+++ b/src/schematic/companies/types/count_users_params.py
@@ -11,8 +11,16 @@ class CountUsersParams(UniversalBaseModel):
Input parameters
"""
- company_id: typing.Optional[str] = None
- ids: typing.Optional[typing.List[str]] = None
+ company_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter users by company ID (starts with comp\_)
+ """
+
+ ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter users by multiple user IDs (starts with user\_)
+ """
+
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
@@ -23,10 +31,14 @@ class CountUsersParams(UniversalBaseModel):
Page offset (default 0)
"""
- plan_id: typing.Optional[str] = None
+ plan_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter users by plan ID (starts with plan\_)
+ """
+
q: typing.Optional[str] = pydantic.Field(default=None)
"""
- Search filter
+ Search for users by name, keys or string traits
"""
if IS_PYDANTIC_V2:
diff --git a/src/schematic/companies/types/get_active_company_subscription_params.py b/src/schematic/companies/types/get_active_company_subscription_params.py
index ca26a9d..7498718 100644
--- a/src/schematic/companies/types/get_active_company_subscription_params.py
+++ b/src/schematic/companies/types/get_active_company_subscription_params.py
@@ -12,6 +12,7 @@ class GetActiveCompanySubscriptionParams(UniversalBaseModel):
"""
company_id: typing.Optional[str] = None
+ company_ids: typing.Optional[typing.List[str]] = None
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
diff --git a/src/schematic/companies/types/list_companies_params.py b/src/schematic/companies/types/list_companies_params.py
index 0594906..b1c2ddb 100644
--- a/src/schematic/companies/types/list_companies_params.py
+++ b/src/schematic/companies/types/list_companies_params.py
@@ -11,7 +11,11 @@ class ListCompaniesParams(UniversalBaseModel):
Input parameters
"""
- ids: typing.Optional[typing.List[str]] = None
+ ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter companies by multiple company IDs (starts with comp\_)
+ """
+
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
@@ -22,10 +26,14 @@ class ListCompaniesParams(UniversalBaseModel):
Page offset (default 0)
"""
- plan_id: typing.Optional[str] = None
+ plan_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter companies by plan ID (starts with plan\_)
+ """
+
q: typing.Optional[str] = pydantic.Field(default=None)
"""
- Search filter
+ Search for companies by name, keys or string traits
"""
without_feature_override_for: typing.Optional[str] = pydantic.Field(default=None)
diff --git a/src/schematic/companies/types/list_users_params.py b/src/schematic/companies/types/list_users_params.py
index 7e2bcae..248d8eb 100644
--- a/src/schematic/companies/types/list_users_params.py
+++ b/src/schematic/companies/types/list_users_params.py
@@ -11,8 +11,16 @@ class ListUsersParams(UniversalBaseModel):
Input parameters
"""
- company_id: typing.Optional[str] = None
- ids: typing.Optional[typing.List[str]] = None
+ company_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter users by company ID (starts with comp\_)
+ """
+
+ ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter users by multiple user IDs (starts with user\_)
+ """
+
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
@@ -23,10 +31,14 @@ class ListUsersParams(UniversalBaseModel):
Page offset (default 0)
"""
- plan_id: typing.Optional[str] = None
+ plan_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter users by plan ID (starts with plan\_)
+ """
+
q: typing.Optional[str] = pydantic.Field(default=None)
"""
- Search filter
+ Search for users by name, keys or string traits
"""
if IS_PYDANTIC_V2:
diff --git a/src/schematic/components/client.py b/src/schematic/components/client.py
index b4ca6cf..cf6139b 100644
--- a/src/schematic/components/client.py
+++ b/src/schematic/components/client.py
@@ -178,6 +178,9 @@ def create_component(
"entity_type": entity_type,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -374,6 +377,9 @@ def update_component(
"name": name,
"state": state,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -888,6 +894,9 @@ async def main() -> None:
"entity_type": entity_type,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1100,6 +1109,9 @@ async def main() -> None:
"name": name,
"state": state,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
diff --git a/src/schematic/components/types/preview_component_data_response.py b/src/schematic/components/types/preview_component_data_response.py
index f43dbec..3f88110 100644
--- a/src/schematic/components/types/preview_component_data_response.py
+++ b/src/schematic/components/types/preview_component_data_response.py
@@ -1,7 +1,7 @@
# This file was auto-generated by Fern from our API Definition.
from ...core.pydantic_utilities import UniversalBaseModel
-from ...types.component_hydrate_response_data import ComponentHydrateResponseData
+from ...types.component_preview_response_data import ComponentPreviewResponseData
from .preview_component_data_params import PreviewComponentDataParams
import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2
@@ -9,7 +9,7 @@
class PreviewComponentDataResponse(UniversalBaseModel):
- data: ComponentHydrateResponseData
+ data: ComponentPreviewResponseData
params: PreviewComponentDataParams = pydantic.Field()
"""
Input parameters
diff --git a/src/schematic/core/file.py b/src/schematic/core/file.py
index b4cbba3..44b0d27 100644
--- a/src/schematic/core/file.py
+++ b/src/schematic/core/file.py
@@ -43,20 +43,25 @@ def convert_file_dict_to_httpx_tuples(
return httpx_tuples
-def with_content_type(*, file: File, content_type: str) -> File:
- """ """
+def with_content_type(*, file: File, default_content_type: str) -> File:
+ """
+ This function resolves to the file's content type, if provided, and defaults
+ to the default_content_type value if not.
+ """
if isinstance(file, tuple):
if len(file) == 2:
filename, content = cast(Tuple[Optional[str], FileContent], file) # type: ignore
- return (filename, content, content_type)
+ return (filename, content, default_content_type)
elif len(file) == 3:
- filename, content, _ = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore
- return (filename, content, content_type)
+ filename, content, file_content_type = cast(Tuple[Optional[str], FileContent, Optional[str]], file) # type: ignore
+ out_content_type = file_content_type or default_content_type
+ return (filename, content, out_content_type)
elif len(file) == 4:
- filename, content, _, headers = cast( # type: ignore
+ filename, content, file_content_type, headers = cast( # type: ignore
Tuple[Optional[str], FileContent, Optional[str], Mapping[str, str]], file
)
- return (filename, content, content_type, headers)
+ out_content_type = file_content_type or default_content_type
+ return (filename, content, out_content_type, headers)
else:
raise ValueError(f"Unexpected tuple length: {len(file)}")
- return (None, file, content_type)
+ return (None, file, default_content_type)
diff --git a/src/schematic/core/http_client.py b/src/schematic/core/http_client.py
index eb4e894..1a1a131 100644
--- a/src/schematic/core/http_client.py
+++ b/src/schematic/core/http_client.py
@@ -227,9 +227,11 @@ def request(
json=json_body,
data=data_body,
content=content,
- files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files))
- if (files is not None and files is not omit)
- else None,
+ files=(
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if (files is not None and files is not omit)
+ else None
+ ),
timeout=timeout,
)
@@ -311,9 +313,11 @@ def stream(
json=json_body,
data=data_body,
content=content,
- files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files))
- if (files is not None and files is not omit)
- else None,
+ files=(
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if (files is not None and files is not omit)
+ else None
+ ),
timeout=timeout,
) as stream:
yield stream
@@ -400,7 +404,11 @@ async def request(
json=json_body,
data=data_body,
content=content,
- files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) if files is not None else None,
+ files=(
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if files is not None
+ else None
+ ),
timeout=timeout,
)
@@ -481,7 +489,11 @@ async def stream(
json=json_body,
data=data_body,
content=content,
- files=convert_file_dict_to_httpx_tuples(remove_none_from_dict(files)) if files is not None else None,
+ files=(
+ convert_file_dict_to_httpx_tuples(remove_omit_from_dict(remove_none_from_dict(files), omit))
+ if files is not None
+ else None
+ ),
timeout=timeout,
) as stream:
yield stream
diff --git a/src/schematic/core/request_options.py b/src/schematic/core/request_options.py
index d0bf0db..1b38804 100644
--- a/src/schematic/core/request_options.py
+++ b/src/schematic/core/request_options.py
@@ -23,6 +23,8 @@ class RequestOptions(typing.TypedDict, total=False):
- additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict
- additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict
+
+ - chunk_size: int. The size, in bytes, to process each chunk of data being streamed back within the response. This equates to leveraging `chunk_size` within `requests` or `httpx`, and is only leveraged for file downloads.
"""
timeout_in_seconds: NotRequired[int]
@@ -30,3 +32,4 @@ class RequestOptions(typing.TypedDict, total=False):
additional_headers: NotRequired[typing.Dict[str, typing.Any]]
additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]]
additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]]
+ chunk_size: NotRequired[int]
diff --git a/src/schematic/crm/client.py b/src/schematic/crm/client.py
index 36d1ce0..267e848 100644
--- a/src/schematic/crm/client.py
+++ b/src/schematic/crm/client.py
@@ -67,6 +67,9 @@ def upsert_deal_line_item_association(
"deal_external_id": deal_external_id,
"line_item_external_id": line_item_external_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -132,8 +135,8 @@ def upsert_line_item(
line_item_external_id: str,
product_external_id: str,
quantity: int,
- term_month: typing.Optional[int] = OMIT,
discount_percentage: typing.Optional[str] = OMIT,
+ term_month: typing.Optional[int] = OMIT,
total_discount: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertLineItemResponse:
@@ -150,10 +153,10 @@ def upsert_line_item(
quantity : int
- term_month : typing.Optional[int]
-
discount_percentage : typing.Optional[str]
+ term_month : typing.Optional[int]
+
total_discount : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -183,15 +186,18 @@ def upsert_line_item(
"crm/deal-line-item/upsert",
method="POST",
json={
- "TermMonth": term_month,
"amount": amount,
"discount_percentage": discount_percentage,
"interval": interval,
"line_item_external_id": line_item_external_id,
"product_external_id": product_external_id,
"quantity": quantity,
+ "term_month": term_month,
"total_discount": total_discount,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -319,6 +325,9 @@ def upsert_crm_deal(
"deal_stage": deal_stage,
"mrr": mrr,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -551,6 +560,9 @@ def upsert_crm_product(
"quantity": quantity,
"sku": sku,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -662,6 +674,9 @@ async def main() -> None:
"deal_external_id": deal_external_id,
"line_item_external_id": line_item_external_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -727,8 +742,8 @@ async def upsert_line_item(
line_item_external_id: str,
product_external_id: str,
quantity: int,
- term_month: typing.Optional[int] = OMIT,
discount_percentage: typing.Optional[str] = OMIT,
+ term_month: typing.Optional[int] = OMIT,
total_discount: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertLineItemResponse:
@@ -745,10 +760,10 @@ async def upsert_line_item(
quantity : int
- term_month : typing.Optional[int]
-
discount_percentage : typing.Optional[str]
+ term_month : typing.Optional[int]
+
total_discount : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -786,15 +801,18 @@ async def main() -> None:
"crm/deal-line-item/upsert",
method="POST",
json={
- "TermMonth": term_month,
"amount": amount,
"discount_percentage": discount_percentage,
"interval": interval,
"line_item_external_id": line_item_external_id,
"product_external_id": product_external_id,
"quantity": quantity,
+ "term_month": term_month,
"total_discount": total_discount,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -930,6 +948,9 @@ async def main() -> None:
"deal_stage": deal_stage,
"mrr": mrr,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1178,6 +1199,9 @@ async def main() -> None:
"quantity": quantity,
"sku": sku,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
diff --git a/src/schematic/entitlements/__init__.py b/src/schematic/entitlements/__init__.py
index 064fa7b..c04567c 100644
--- a/src/schematic/entitlements/__init__.py
+++ b/src/schematic/entitlements/__init__.py
@@ -12,9 +12,11 @@
CountPlanEntitlementsParams,
CountPlanEntitlementsResponse,
CreateCompanyOverrideRequestBodyMetricPeriod,
+ CreateCompanyOverrideRequestBodyMetricPeriodMonthReset,
CreateCompanyOverrideRequestBodyValueType,
CreateCompanyOverrideResponse,
CreatePlanEntitlementRequestBodyMetricPeriod,
+ CreatePlanEntitlementRequestBodyMetricPeriodMonthReset,
CreatePlanEntitlementRequestBodyValueType,
CreatePlanEntitlementResponse,
DeleteCompanyOverrideResponse,
@@ -34,9 +36,11 @@
ListPlanEntitlementsParams,
ListPlanEntitlementsResponse,
UpdateCompanyOverrideRequestBodyMetricPeriod,
+ UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset,
UpdateCompanyOverrideRequestBodyValueType,
UpdateCompanyOverrideResponse,
UpdatePlanEntitlementRequestBodyMetricPeriod,
+ UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset,
UpdatePlanEntitlementRequestBodyValueType,
UpdatePlanEntitlementResponse,
)
@@ -53,9 +57,11 @@
"CountPlanEntitlementsParams",
"CountPlanEntitlementsResponse",
"CreateCompanyOverrideRequestBodyMetricPeriod",
+ "CreateCompanyOverrideRequestBodyMetricPeriodMonthReset",
"CreateCompanyOverrideRequestBodyValueType",
"CreateCompanyOverrideResponse",
"CreatePlanEntitlementRequestBodyMetricPeriod",
+ "CreatePlanEntitlementRequestBodyMetricPeriodMonthReset",
"CreatePlanEntitlementRequestBodyValueType",
"CreatePlanEntitlementResponse",
"DeleteCompanyOverrideResponse",
@@ -75,9 +81,11 @@
"ListPlanEntitlementsParams",
"ListPlanEntitlementsResponse",
"UpdateCompanyOverrideRequestBodyMetricPeriod",
+ "UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset",
"UpdateCompanyOverrideRequestBodyValueType",
"UpdateCompanyOverrideResponse",
"UpdatePlanEntitlementRequestBodyMetricPeriod",
+ "UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset",
"UpdatePlanEntitlementRequestBodyValueType",
"UpdatePlanEntitlementResponse",
]
diff --git a/src/schematic/entitlements/client.py b/src/schematic/entitlements/client.py
index eefc54b..5bc6784 100644
--- a/src/schematic/entitlements/client.py
+++ b/src/schematic/entitlements/client.py
@@ -13,13 +13,20 @@
from json.decoder import JSONDecodeError
from ..core.api_error import ApiError as core_api_error_ApiError
from .types.create_company_override_request_body_value_type import CreateCompanyOverrideRequestBodyValueType
+import datetime as dt
from .types.create_company_override_request_body_metric_period import CreateCompanyOverrideRequestBodyMetricPeriod
+from .types.create_company_override_request_body_metric_period_month_reset import (
+ CreateCompanyOverrideRequestBodyMetricPeriodMonthReset,
+)
from .types.create_company_override_response import CreateCompanyOverrideResponse
from .types.get_company_override_response import GetCompanyOverrideResponse
from ..core.jsonable_encoder import jsonable_encoder
from ..errors.not_found_error import NotFoundError
from .types.update_company_override_request_body_value_type import UpdateCompanyOverrideRequestBodyValueType
from .types.update_company_override_request_body_metric_period import UpdateCompanyOverrideRequestBodyMetricPeriod
+from .types.update_company_override_request_body_metric_period_month_reset import (
+ UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset,
+)
from .types.update_company_override_response import UpdateCompanyOverrideResponse
from .types.delete_company_override_response import DeleteCompanyOverrideResponse
from .types.count_company_overrides_response import CountCompanyOverridesResponse
@@ -32,10 +39,16 @@
from .types.list_plan_entitlements_response import ListPlanEntitlementsResponse
from .types.create_plan_entitlement_request_body_value_type import CreatePlanEntitlementRequestBodyValueType
from .types.create_plan_entitlement_request_body_metric_period import CreatePlanEntitlementRequestBodyMetricPeriod
+from .types.create_plan_entitlement_request_body_metric_period_month_reset import (
+ CreatePlanEntitlementRequestBodyMetricPeriodMonthReset,
+)
from .types.create_plan_entitlement_response import CreatePlanEntitlementResponse
from .types.get_plan_entitlement_response import GetPlanEntitlementResponse
from .types.update_plan_entitlement_request_body_value_type import UpdatePlanEntitlementRequestBodyValueType
from .types.update_plan_entitlement_request_body_metric_period import UpdatePlanEntitlementRequestBodyMetricPeriod
+from .types.update_plan_entitlement_request_body_metric_period_month_reset import (
+ UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset,
+)
from .types.update_plan_entitlement_response import UpdatePlanEntitlementResponse
from .types.delete_plan_entitlement_response import DeletePlanEntitlementResponse
from .types.count_plan_entitlements_response import CountPlanEntitlementsResponse
@@ -67,16 +80,22 @@ def list_company_overrides(
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\_)
q : typing.Optional[str]
+ Search for company overrides by feature or company name
limit : typing.Optional[int]
Page limit (default 100)
@@ -176,7 +195,11 @@ def create_company_override(
company_id: str,
feature_id: str,
value_type: CreateCompanyOverrideRequestBodyValueType,
+ expiration_date: typing.Optional[dt.datetime] = OMIT,
+ metered_monthly_price_id: typing.Optional[str] = OMIT,
+ metered_yearly_price_id: typing.Optional[str] = OMIT,
metric_period: typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriod] = OMIT,
+ metric_period_month_reset: typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriodMonthReset] = OMIT,
value_bool: typing.Optional[bool] = OMIT,
value_numeric: typing.Optional[int] = OMIT,
value_trait_id: typing.Optional[str] = OMIT,
@@ -191,8 +214,16 @@ def create_company_override(
value_type : CreateCompanyOverrideRequestBodyValueType
+ expiration_date : typing.Optional[dt.datetime]
+
+ metered_monthly_price_id : typing.Optional[str]
+
+ metered_yearly_price_id : typing.Optional[str]
+
metric_period : typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriod]
+ metric_period_month_reset : typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriodMonthReset]
+
value_bool : typing.Optional[bool]
value_numeric : typing.Optional[int]
@@ -225,13 +256,20 @@ def create_company_override(
method="POST",
json={
"company_id": company_id,
+ "expiration_date": expiration_date,
"feature_id": feature_id,
+ "metered_monthly_price_id": metered_monthly_price_id,
+ "metered_yearly_price_id": metered_yearly_price_id,
"metric_period": metric_period,
+ "metric_period_month_reset": metric_period_month_reset,
"value_bool": value_bool,
"value_numeric": value_numeric,
"value_trait_id": value_trait_id,
"value_type": value_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -381,7 +419,11 @@ def update_company_override(
company_override_id: str,
*,
value_type: UpdateCompanyOverrideRequestBodyValueType,
+ expiration_date: typing.Optional[dt.datetime] = OMIT,
+ metered_monthly_price_id: typing.Optional[str] = OMIT,
+ metered_yearly_price_id: typing.Optional[str] = OMIT,
metric_period: typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriod] = OMIT,
+ metric_period_month_reset: typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset] = OMIT,
value_bool: typing.Optional[bool] = OMIT,
value_numeric: typing.Optional[int] = OMIT,
value_trait_id: typing.Optional[str] = OMIT,
@@ -395,8 +437,16 @@ def update_company_override(
value_type : UpdateCompanyOverrideRequestBodyValueType
+ expiration_date : typing.Optional[dt.datetime]
+
+ metered_monthly_price_id : typing.Optional[str]
+
+ metered_yearly_price_id : typing.Optional[str]
+
metric_period : typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriod]
+ metric_period_month_reset : typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset]
+
value_bool : typing.Optional[bool]
value_numeric : typing.Optional[int]
@@ -427,12 +477,19 @@ def update_company_override(
f"company-overrides/{jsonable_encoder(company_override_id)}",
method="PUT",
json={
+ "expiration_date": expiration_date,
+ "metered_monthly_price_id": metered_monthly_price_id,
+ "metered_yearly_price_id": metered_yearly_price_id,
"metric_period": metric_period,
+ "metric_period_month_reset": metric_period_month_reset,
"value_bool": value_bool,
"value_numeric": value_numeric,
"value_trait_id": value_trait_id,
"value_type": value_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -604,16 +661,22 @@ def count_company_overrides(
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\_)
q : typing.Optional[str]
+ Search for company overrides by feature or company name
limit : typing.Optional[int]
Page limit (default 100)
@@ -926,6 +989,7 @@ def list_feature_usage(
company_keys: typing.Optional[typing.Dict[str, str]] = None,
feature_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ without_negative_entitlements: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -941,6 +1005,8 @@ def list_feature_usage(
q : typing.Optional[str]
+ without_negative_entitlements : typing.Optional[bool]
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -972,6 +1038,7 @@ def list_feature_usage(
"company_keys": company_keys,
"feature_ids": feature_ids,
"q": q,
+ "without_negative_entitlements": without_negative_entitlements,
"limit": limit,
"offset": offset,
},
@@ -1038,6 +1105,7 @@ def count_feature_usage(
company_keys: typing.Optional[typing.Dict[str, str]] = None,
feature_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ without_negative_entitlements: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1053,6 +1121,8 @@ def count_feature_usage(
q : typing.Optional[str]
+ without_negative_entitlements : typing.Optional[bool]
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -1084,6 +1154,7 @@ def count_feature_usage(
"company_keys": company_keys,
"feature_ids": feature_ids,
"q": q,
+ "without_negative_entitlements": without_negative_entitlements,
"limit": limit,
"offset": offset,
},
@@ -1364,6 +1435,7 @@ def list_plan_entitlements(
plan_id: typing.Optional[str] = None,
plan_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ with_metered_products: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1372,16 +1444,25 @@ def list_plan_entitlements(
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)
@@ -1416,6 +1497,7 @@ def list_plan_entitlements(
"plan_id": plan_id,
"plan_ids": plan_ids,
"q": q,
+ "with_metered_products": with_metered_products,
"limit": limit,
"offset": offset,
},
@@ -1481,10 +1563,16 @@ def create_plan_entitlement(
feature_id: str,
plan_id: str,
value_type: CreatePlanEntitlementRequestBodyValueType,
+ metered_monthly_price_id: typing.Optional[str] = OMIT,
+ metered_yearly_price_id: typing.Optional[str] = OMIT,
metric_period: typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriod] = OMIT,
+ metric_period_month_reset: typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriodMonthReset] = OMIT,
+ monthly_metered_price_id: typing.Optional[str] = OMIT,
+ price_behavior: typing.Optional[str] = OMIT,
value_bool: typing.Optional[bool] = OMIT,
value_numeric: typing.Optional[int] = OMIT,
value_trait_id: typing.Optional[str] = OMIT,
+ yearly_metered_price_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CreatePlanEntitlementResponse:
"""
@@ -1496,14 +1584,26 @@ def create_plan_entitlement(
value_type : CreatePlanEntitlementRequestBodyValueType
+ metered_monthly_price_id : typing.Optional[str]
+
+ metered_yearly_price_id : typing.Optional[str]
+
metric_period : typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriod]
+ metric_period_month_reset : typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriodMonthReset]
+
+ monthly_metered_price_id : typing.Optional[str]
+
+ price_behavior : typing.Optional[str]
+
value_bool : typing.Optional[bool]
value_numeric : typing.Optional[int]
value_trait_id : typing.Optional[str]
+ yearly_metered_price_id : typing.Optional[str]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -1530,12 +1630,21 @@ def create_plan_entitlement(
method="POST",
json={
"feature_id": feature_id,
+ "metered_monthly_price_id": metered_monthly_price_id,
+ "metered_yearly_price_id": metered_yearly_price_id,
"metric_period": metric_period,
+ "metric_period_month_reset": metric_period_month_reset,
+ "monthly_metered_price_id": monthly_metered_price_id,
"plan_id": plan_id,
+ "price_behavior": price_behavior,
"value_bool": value_bool,
"value_numeric": value_numeric,
"value_trait_id": value_trait_id,
"value_type": value_type,
+ "yearly_metered_price_id": yearly_metered_price_id,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -1686,7 +1795,10 @@ def update_plan_entitlement(
plan_entitlement_id: str,
*,
value_type: UpdatePlanEntitlementRequestBodyValueType,
+ metered_monthly_price_id: typing.Optional[str] = OMIT,
+ metered_yearly_price_id: typing.Optional[str] = OMIT,
metric_period: typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriod] = OMIT,
+ metric_period_month_reset: typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset] = OMIT,
value_bool: typing.Optional[bool] = OMIT,
value_numeric: typing.Optional[int] = OMIT,
value_trait_id: typing.Optional[str] = OMIT,
@@ -1700,8 +1812,14 @@ def update_plan_entitlement(
value_type : UpdatePlanEntitlementRequestBodyValueType
+ metered_monthly_price_id : typing.Optional[str]
+
+ metered_yearly_price_id : typing.Optional[str]
+
metric_period : typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriod]
+ metric_period_month_reset : typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset]
+
value_bool : typing.Optional[bool]
value_numeric : typing.Optional[int]
@@ -1732,12 +1850,18 @@ def update_plan_entitlement(
f"plan-entitlements/{jsonable_encoder(plan_entitlement_id)}",
method="PUT",
json={
+ "metered_monthly_price_id": metered_monthly_price_id,
+ "metered_yearly_price_id": metered_yearly_price_id,
"metric_period": metric_period,
+ "metric_period_month_reset": metric_period_month_reset,
"value_bool": value_bool,
"value_numeric": value_numeric,
"value_trait_id": value_trait_id,
"value_type": value_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1901,6 +2025,7 @@ def count_plan_entitlements(
plan_id: typing.Optional[str] = None,
plan_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ with_metered_products: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1909,16 +2034,25 @@ def count_plan_entitlements(
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)
@@ -1953,6 +2087,7 @@ def count_plan_entitlements(
"plan_id": plan_id,
"plan_ids": plan_ids,
"q": q,
+ "with_metered_products": with_metered_products,
"limit": limit,
"offset": offset,
},
@@ -2040,7 +2175,7 @@ def get_feature_usage_by_company(
api_key="YOUR_API_KEY",
)
client.entitlements.get_feature_usage_by_company(
- keys={"string": {"key": "value"}},
+ keys={"keys": {"key": "value"}},
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -2127,16 +2262,22 @@ async def list_company_overrides(
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\_)
q : typing.Optional[str]
+ Search for company overrides by feature or company name
limit : typing.Optional[int]
Page limit (default 100)
@@ -2244,7 +2385,11 @@ async def create_company_override(
company_id: str,
feature_id: str,
value_type: CreateCompanyOverrideRequestBodyValueType,
+ expiration_date: typing.Optional[dt.datetime] = OMIT,
+ metered_monthly_price_id: typing.Optional[str] = OMIT,
+ metered_yearly_price_id: typing.Optional[str] = OMIT,
metric_period: typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriod] = OMIT,
+ metric_period_month_reset: typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriodMonthReset] = OMIT,
value_bool: typing.Optional[bool] = OMIT,
value_numeric: typing.Optional[int] = OMIT,
value_trait_id: typing.Optional[str] = OMIT,
@@ -2259,8 +2404,16 @@ async def create_company_override(
value_type : CreateCompanyOverrideRequestBodyValueType
+ expiration_date : typing.Optional[dt.datetime]
+
+ metered_monthly_price_id : typing.Optional[str]
+
+ metered_yearly_price_id : typing.Optional[str]
+
metric_period : typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriod]
+ metric_period_month_reset : typing.Optional[CreateCompanyOverrideRequestBodyMetricPeriodMonthReset]
+
value_bool : typing.Optional[bool]
value_numeric : typing.Optional[int]
@@ -2301,13 +2454,20 @@ async def main() -> None:
method="POST",
json={
"company_id": company_id,
+ "expiration_date": expiration_date,
"feature_id": feature_id,
+ "metered_monthly_price_id": metered_monthly_price_id,
+ "metered_yearly_price_id": metered_yearly_price_id,
"metric_period": metric_period,
+ "metric_period_month_reset": metric_period_month_reset,
"value_bool": value_bool,
"value_numeric": value_numeric,
"value_trait_id": value_trait_id,
"value_type": value_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2465,7 +2625,11 @@ async def update_company_override(
company_override_id: str,
*,
value_type: UpdateCompanyOverrideRequestBodyValueType,
+ expiration_date: typing.Optional[dt.datetime] = OMIT,
+ metered_monthly_price_id: typing.Optional[str] = OMIT,
+ metered_yearly_price_id: typing.Optional[str] = OMIT,
metric_period: typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriod] = OMIT,
+ metric_period_month_reset: typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset] = OMIT,
value_bool: typing.Optional[bool] = OMIT,
value_numeric: typing.Optional[int] = OMIT,
value_trait_id: typing.Optional[str] = OMIT,
@@ -2479,8 +2643,16 @@ async def update_company_override(
value_type : UpdateCompanyOverrideRequestBodyValueType
+ expiration_date : typing.Optional[dt.datetime]
+
+ metered_monthly_price_id : typing.Optional[str]
+
+ metered_yearly_price_id : typing.Optional[str]
+
metric_period : typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriod]
+ metric_period_month_reset : typing.Optional[UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset]
+
value_bool : typing.Optional[bool]
value_numeric : typing.Optional[int]
@@ -2519,12 +2691,19 @@ async def main() -> None:
f"company-overrides/{jsonable_encoder(company_override_id)}",
method="PUT",
json={
+ "expiration_date": expiration_date,
+ "metered_monthly_price_id": metered_monthly_price_id,
+ "metered_yearly_price_id": metered_yearly_price_id,
"metric_period": metric_period,
+ "metric_period_month_reset": metric_period_month_reset,
"value_bool": value_bool,
"value_numeric": value_numeric,
"value_trait_id": value_trait_id,
"value_type": value_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2704,16 +2883,22 @@ async def count_company_overrides(
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\_)
q : typing.Optional[str]
+ Search for company overrides by feature or company name
limit : typing.Optional[int]
Page limit (default 100)
@@ -3050,6 +3235,7 @@ async def list_feature_usage(
company_keys: typing.Optional[typing.Dict[str, str]] = None,
feature_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ without_negative_entitlements: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -3065,6 +3251,8 @@ async def list_feature_usage(
q : typing.Optional[str]
+ without_negative_entitlements : typing.Optional[bool]
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -3104,6 +3292,7 @@ async def main() -> None:
"company_keys": company_keys,
"feature_ids": feature_ids,
"q": q,
+ "without_negative_entitlements": without_negative_entitlements,
"limit": limit,
"offset": offset,
},
@@ -3170,6 +3359,7 @@ async def count_feature_usage(
company_keys: typing.Optional[typing.Dict[str, str]] = None,
feature_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ without_negative_entitlements: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -3185,6 +3375,8 @@ async def count_feature_usage(
q : typing.Optional[str]
+ without_negative_entitlements : typing.Optional[bool]
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -3224,6 +3416,7 @@ async def main() -> None:
"company_keys": company_keys,
"feature_ids": feature_ids,
"q": q,
+ "without_negative_entitlements": without_negative_entitlements,
"limit": limit,
"offset": offset,
},
@@ -3520,6 +3713,7 @@ async def list_plan_entitlements(
plan_id: typing.Optional[str] = None,
plan_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ with_metered_products: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -3528,16 +3722,25 @@ async def list_plan_entitlements(
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)
@@ -3580,6 +3783,7 @@ async def main() -> None:
"plan_id": plan_id,
"plan_ids": plan_ids,
"q": q,
+ "with_metered_products": with_metered_products,
"limit": limit,
"offset": offset,
},
@@ -3645,10 +3849,16 @@ async def create_plan_entitlement(
feature_id: str,
plan_id: str,
value_type: CreatePlanEntitlementRequestBodyValueType,
+ metered_monthly_price_id: typing.Optional[str] = OMIT,
+ metered_yearly_price_id: typing.Optional[str] = OMIT,
metric_period: typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriod] = OMIT,
+ metric_period_month_reset: typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriodMonthReset] = OMIT,
+ monthly_metered_price_id: typing.Optional[str] = OMIT,
+ price_behavior: typing.Optional[str] = OMIT,
value_bool: typing.Optional[bool] = OMIT,
value_numeric: typing.Optional[int] = OMIT,
value_trait_id: typing.Optional[str] = OMIT,
+ yearly_metered_price_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CreatePlanEntitlementResponse:
"""
@@ -3660,14 +3870,26 @@ async def create_plan_entitlement(
value_type : CreatePlanEntitlementRequestBodyValueType
+ metered_monthly_price_id : typing.Optional[str]
+
+ metered_yearly_price_id : typing.Optional[str]
+
metric_period : typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriod]
+ metric_period_month_reset : typing.Optional[CreatePlanEntitlementRequestBodyMetricPeriodMonthReset]
+
+ monthly_metered_price_id : typing.Optional[str]
+
+ price_behavior : typing.Optional[str]
+
value_bool : typing.Optional[bool]
value_numeric : typing.Optional[int]
value_trait_id : typing.Optional[str]
+ yearly_metered_price_id : typing.Optional[str]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -3702,12 +3924,21 @@ async def main() -> None:
method="POST",
json={
"feature_id": feature_id,
+ "metered_monthly_price_id": metered_monthly_price_id,
+ "metered_yearly_price_id": metered_yearly_price_id,
"metric_period": metric_period,
+ "metric_period_month_reset": metric_period_month_reset,
+ "monthly_metered_price_id": monthly_metered_price_id,
"plan_id": plan_id,
+ "price_behavior": price_behavior,
"value_bool": value_bool,
"value_numeric": value_numeric,
"value_trait_id": value_trait_id,
"value_type": value_type,
+ "yearly_metered_price_id": yearly_metered_price_id,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -3866,7 +4097,10 @@ async def update_plan_entitlement(
plan_entitlement_id: str,
*,
value_type: UpdatePlanEntitlementRequestBodyValueType,
+ metered_monthly_price_id: typing.Optional[str] = OMIT,
+ metered_yearly_price_id: typing.Optional[str] = OMIT,
metric_period: typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriod] = OMIT,
+ metric_period_month_reset: typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset] = OMIT,
value_bool: typing.Optional[bool] = OMIT,
value_numeric: typing.Optional[int] = OMIT,
value_trait_id: typing.Optional[str] = OMIT,
@@ -3880,8 +4114,14 @@ async def update_plan_entitlement(
value_type : UpdatePlanEntitlementRequestBodyValueType
+ metered_monthly_price_id : typing.Optional[str]
+
+ metered_yearly_price_id : typing.Optional[str]
+
metric_period : typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriod]
+ metric_period_month_reset : typing.Optional[UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset]
+
value_bool : typing.Optional[bool]
value_numeric : typing.Optional[int]
@@ -3920,12 +4160,18 @@ async def main() -> None:
f"plan-entitlements/{jsonable_encoder(plan_entitlement_id)}",
method="PUT",
json={
+ "metered_monthly_price_id": metered_monthly_price_id,
+ "metered_yearly_price_id": metered_yearly_price_id,
"metric_period": metric_period,
+ "metric_period_month_reset": metric_period_month_reset,
"value_bool": value_bool,
"value_numeric": value_numeric,
"value_trait_id": value_trait_id,
"value_type": value_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -4097,6 +4343,7 @@ async def count_plan_entitlements(
plan_id: typing.Optional[str] = None,
plan_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ with_metered_products: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -4105,16 +4352,25 @@ async def count_plan_entitlements(
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)
@@ -4157,6 +4413,7 @@ async def main() -> None:
"plan_id": plan_id,
"plan_ids": plan_ids,
"q": q,
+ "with_metered_products": with_metered_products,
"limit": limit,
"offset": offset,
},
@@ -4249,7 +4506,7 @@ async def get_feature_usage_by_company(
async def main() -> None:
await client.entitlements.get_feature_usage_by_company(
- keys={"string": {"key": "value"}},
+ keys={"keys": {"key": "value"}},
)
diff --git a/src/schematic/entitlements/types/__init__.py b/src/schematic/entitlements/types/__init__.py
index bf1ae2e..7f60310 100644
--- a/src/schematic/entitlements/types/__init__.py
+++ b/src/schematic/entitlements/types/__init__.py
@@ -11,9 +11,15 @@
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_value_type import CreatePlanEntitlementRequestBodyValueType
from .create_plan_entitlement_response import CreatePlanEntitlementResponse
from .delete_company_override_response import DeleteCompanyOverrideResponse
@@ -33,9 +39,15 @@
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_value_type import UpdatePlanEntitlementRequestBodyValueType
from .update_plan_entitlement_response import UpdatePlanEntitlementResponse
@@ -51,9 +63,11 @@
"CountPlanEntitlementsParams",
"CountPlanEntitlementsResponse",
"CreateCompanyOverrideRequestBodyMetricPeriod",
+ "CreateCompanyOverrideRequestBodyMetricPeriodMonthReset",
"CreateCompanyOverrideRequestBodyValueType",
"CreateCompanyOverrideResponse",
"CreatePlanEntitlementRequestBodyMetricPeriod",
+ "CreatePlanEntitlementRequestBodyMetricPeriodMonthReset",
"CreatePlanEntitlementRequestBodyValueType",
"CreatePlanEntitlementResponse",
"DeleteCompanyOverrideResponse",
@@ -73,9 +87,11 @@
"ListPlanEntitlementsParams",
"ListPlanEntitlementsResponse",
"UpdateCompanyOverrideRequestBodyMetricPeriod",
+ "UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset",
"UpdateCompanyOverrideRequestBodyValueType",
"UpdateCompanyOverrideResponse",
"UpdatePlanEntitlementRequestBodyMetricPeriod",
+ "UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset",
"UpdatePlanEntitlementRequestBodyValueType",
"UpdatePlanEntitlementResponse",
]
diff --git a/src/schematic/entitlements/types/count_company_overrides_params.py b/src/schematic/entitlements/types/count_company_overrides_params.py
index 233d8fd..9dc788c 100644
--- a/src/schematic/entitlements/types/count_company_overrides_params.py
+++ b/src/schematic/entitlements/types/count_company_overrides_params.py
@@ -11,11 +11,31 @@ class CountCompanyOverridesParams(UniversalBaseModel):
Input parameters
"""
- company_id: typing.Optional[str] = None
- company_ids: typing.Optional[typing.List[str]] = None
- feature_id: typing.Optional[str] = None
- feature_ids: typing.Optional[typing.List[str]] = None
- ids: typing.Optional[typing.List[str]] = None
+ company_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter company overrides by a single company ID (starting with comp\_)
+ """
+
+ company_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter company overrides by multiple company IDs (starting with comp\_)
+ """
+
+ feature_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter company overrides by a single feature ID (starting with feat\_)
+ """
+
+ feature_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter company overrides by multiple feature IDs (starting with feat\_)
+ """
+
+ ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter company overrides by multiple company override IDs (starting with cmov\_)
+ """
+
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
@@ -26,7 +46,10 @@ class CountCompanyOverridesParams(UniversalBaseModel):
Page offset (default 0)
"""
- q: typing.Optional[str] = None
+ q: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Search for company overrides by feature or company name
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/entitlements/types/count_feature_usage_params.py b/src/schematic/entitlements/types/count_feature_usage_params.py
index 8517092..0051799 100644
--- a/src/schematic/entitlements/types/count_feature_usage_params.py
+++ b/src/schematic/entitlements/types/count_feature_usage_params.py
@@ -25,6 +25,7 @@ class CountFeatureUsageParams(UniversalBaseModel):
"""
q: typing.Optional[str] = None
+ without_negative_entitlements: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/entitlements/types/count_plan_entitlements_params.py b/src/schematic/entitlements/types/count_plan_entitlements_params.py
index ff8cb5a..ecc52bf 100644
--- a/src/schematic/entitlements/types/count_plan_entitlements_params.py
+++ b/src/schematic/entitlements/types/count_plan_entitlements_params.py
@@ -11,9 +11,21 @@ class CountPlanEntitlementsParams(UniversalBaseModel):
Input parameters
"""
- feature_id: typing.Optional[str] = None
- feature_ids: typing.Optional[typing.List[str]] = None
- ids: typing.Optional[typing.List[str]] = None
+ feature_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by a single feature ID (starting with feat\_)
+ """
+
+ feature_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by multiple feature IDs (starting with feat\_)
+ """
+
+ ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by multiple plan entitlement IDs (starting with pltl\_)
+ """
+
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
@@ -24,9 +36,25 @@ class CountPlanEntitlementsParams(UniversalBaseModel):
Page offset (default 0)
"""
- plan_id: typing.Optional[str] = None
- plan_ids: typing.Optional[typing.List[str]] = None
- q: typing.Optional[str] = None
+ plan_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by a single plan ID (starting with plan\_)
+ """
+
+ plan_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by multiple plan IDs (starting with plan\_)
+ """
+
+ q: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Search for plan entitlements by feature or company name
+ """
+
+ with_metered_products: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements only with metered products
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/entitlements/types/create_company_override_request_body_metric_period.py b/src/schematic/entitlements/types/create_company_override_request_body_metric_period.py
index d786c15..ce0e825 100644
--- a/src/schematic/entitlements/types/create_company_override_request_body_metric_period.py
+++ b/src/schematic/entitlements/types/create_company_override_request_body_metric_period.py
@@ -3,5 +3,5 @@
import typing
CreateCompanyOverrideRequestBodyMetricPeriod = typing.Union[
- typing.Literal["current_month", "current_week", "current_day"], typing.Any
+ typing.Literal["all_time", "billing", "current_month", "current_week", "current_day"], typing.Any
]
diff --git a/src/schematic/entitlements/types/create_company_override_request_body_metric_period_month_reset.py b/src/schematic/entitlements/types/create_company_override_request_body_metric_period_month_reset.py
new file mode 100644
index 0000000..829da81
--- /dev/null
+++ b/src/schematic/entitlements/types/create_company_override_request_body_metric_period_month_reset.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+CreateCompanyOverrideRequestBodyMetricPeriodMonthReset = typing.Union[
+ typing.Literal["first_of_month", "billing_cycle"], typing.Any
+]
diff --git a/src/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period.py b/src/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period.py
index c5ebc02..b412e68 100644
--- a/src/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period.py
+++ b/src/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period.py
@@ -3,5 +3,5 @@
import typing
CreatePlanEntitlementRequestBodyMetricPeriod = typing.Union[
- typing.Literal["current_month", "current_week", "current_day"], typing.Any
+ typing.Literal["all_time", "billing", "current_month", "current_week", "current_day"], typing.Any
]
diff --git a/src/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period_month_reset.py b/src/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period_month_reset.py
new file mode 100644
index 0000000..204cd57
--- /dev/null
+++ b/src/schematic/entitlements/types/create_plan_entitlement_request_body_metric_period_month_reset.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+CreatePlanEntitlementRequestBodyMetricPeriodMonthReset = typing.Union[
+ typing.Literal["first_of_month", "billing_cycle"], typing.Any
+]
diff --git a/src/schematic/entitlements/types/list_company_overrides_params.py b/src/schematic/entitlements/types/list_company_overrides_params.py
index 29e57ba..e31727f 100644
--- a/src/schematic/entitlements/types/list_company_overrides_params.py
+++ b/src/schematic/entitlements/types/list_company_overrides_params.py
@@ -11,11 +11,31 @@ class ListCompanyOverridesParams(UniversalBaseModel):
Input parameters
"""
- company_id: typing.Optional[str] = None
- company_ids: typing.Optional[typing.List[str]] = None
- feature_id: typing.Optional[str] = None
- feature_ids: typing.Optional[typing.List[str]] = None
- ids: typing.Optional[typing.List[str]] = None
+ company_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter company overrides by a single company ID (starting with comp\_)
+ """
+
+ company_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter company overrides by multiple company IDs (starting with comp\_)
+ """
+
+ feature_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter company overrides by a single feature ID (starting with feat\_)
+ """
+
+ feature_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter company overrides by multiple feature IDs (starting with feat\_)
+ """
+
+ ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter company overrides by multiple company override IDs (starting with cmov\_)
+ """
+
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
@@ -26,7 +46,10 @@ class ListCompanyOverridesParams(UniversalBaseModel):
Page offset (default 0)
"""
- q: typing.Optional[str] = None
+ q: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Search for company overrides by feature or company name
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/entitlements/types/list_feature_usage_params.py b/src/schematic/entitlements/types/list_feature_usage_params.py
index 51041ff..484abf4 100644
--- a/src/schematic/entitlements/types/list_feature_usage_params.py
+++ b/src/schematic/entitlements/types/list_feature_usage_params.py
@@ -25,6 +25,7 @@ class ListFeatureUsageParams(UniversalBaseModel):
"""
q: typing.Optional[str] = None
+ without_negative_entitlements: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/entitlements/types/list_plan_entitlements_params.py b/src/schematic/entitlements/types/list_plan_entitlements_params.py
index f296e20..ff3d764 100644
--- a/src/schematic/entitlements/types/list_plan_entitlements_params.py
+++ b/src/schematic/entitlements/types/list_plan_entitlements_params.py
@@ -11,9 +11,21 @@ class ListPlanEntitlementsParams(UniversalBaseModel):
Input parameters
"""
- feature_id: typing.Optional[str] = None
- feature_ids: typing.Optional[typing.List[str]] = None
- ids: typing.Optional[typing.List[str]] = None
+ feature_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by a single feature ID (starting with feat\_)
+ """
+
+ feature_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by multiple feature IDs (starting with feat\_)
+ """
+
+ ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by multiple plan entitlement IDs (starting with pltl\_)
+ """
+
limit: typing.Optional[int] = pydantic.Field(default=None)
"""
Page limit (default 100)
@@ -24,9 +36,25 @@ class ListPlanEntitlementsParams(UniversalBaseModel):
Page offset (default 0)
"""
- plan_id: typing.Optional[str] = None
- plan_ids: typing.Optional[typing.List[str]] = None
- q: typing.Optional[str] = None
+ plan_id: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by a single plan ID (starting with plan\_)
+ """
+
+ plan_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements by multiple plan IDs (starting with plan\_)
+ """
+
+ q: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ Search for plan entitlements by feature or company name
+ """
+
+ with_metered_products: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter plan entitlements only with metered products
+ """
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/entitlements/types/update_company_override_request_body_metric_period.py b/src/schematic/entitlements/types/update_company_override_request_body_metric_period.py
index 478e1fd..e48e086 100644
--- a/src/schematic/entitlements/types/update_company_override_request_body_metric_period.py
+++ b/src/schematic/entitlements/types/update_company_override_request_body_metric_period.py
@@ -3,5 +3,5 @@
import typing
UpdateCompanyOverrideRequestBodyMetricPeriod = typing.Union[
- typing.Literal["current_month", "current_week", "current_day"], typing.Any
+ typing.Literal["all_time", "billing", "current_month", "current_week", "current_day"], typing.Any
]
diff --git a/src/schematic/entitlements/types/update_company_override_request_body_metric_period_month_reset.py b/src/schematic/entitlements/types/update_company_override_request_body_metric_period_month_reset.py
new file mode 100644
index 0000000..557dee5
--- /dev/null
+++ b/src/schematic/entitlements/types/update_company_override_request_body_metric_period_month_reset.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset = typing.Union[
+ typing.Literal["first_of_month", "billing_cycle"], typing.Any
+]
diff --git a/src/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period.py b/src/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period.py
index 2243461..c2e7b24 100644
--- a/src/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period.py
+++ b/src/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period.py
@@ -3,5 +3,5 @@
import typing
UpdatePlanEntitlementRequestBodyMetricPeriod = typing.Union[
- typing.Literal["current_month", "current_week", "current_day"], typing.Any
+ typing.Literal["all_time", "billing", "current_month", "current_week", "current_day"], typing.Any
]
diff --git a/src/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period_month_reset.py b/src/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period_month_reset.py
new file mode 100644
index 0000000..f054f74
--- /dev/null
+++ b/src/schematic/entitlements/types/update_plan_entitlement_request_body_metric_period_month_reset.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset = typing.Union[
+ typing.Literal["first_of_month", "billing_cycle"], typing.Any
+]
diff --git a/src/schematic/events/__init__.py b/src/schematic/events/__init__.py
index a0b1ae7..4a199ae 100644
--- a/src/schematic/events/__init__.py
+++ b/src/schematic/events/__init__.py
@@ -10,8 +10,6 @@
GetSegmentIntegrationStatusResponse,
ListEventsParams,
ListEventsResponse,
- ListMetricCountsParams,
- ListMetricCountsResponse,
)
__all__ = [
@@ -24,6 +22,4 @@
"GetSegmentIntegrationStatusResponse",
"ListEventsParams",
"ListEventsResponse",
- "ListMetricCountsParams",
- "ListMetricCountsResponse",
]
diff --git a/src/schematic/events/client.py b/src/schematic/events/client.py
index dd2be10..4ecabfe 100644
--- a/src/schematic/events/client.py
+++ b/src/schematic/events/client.py
@@ -24,8 +24,6 @@
import datetime as dt
from .types.create_event_response import CreateEventResponse
from .types.get_event_response import GetEventResponse
-from .types.list_metric_counts_response import ListMetricCountsResponse
-from ..core.datetime_utils import serialize_datetime
from .types.get_segment_integration_status_response import GetSegmentIntegrationStatusResponse
from ..core.client_wrapper import AsyncClientWrapper
@@ -79,6 +77,9 @@ def create_event_batch(
object_=events, annotation=typing.Sequence[CreateEventRequestBody], direction="write"
),
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -631,134 +632,6 @@ def get_event(self, event_id: str, *, request_options: typing.Optional[RequestOp
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
- def list_metric_counts(
- self,
- *,
- start_time: typing.Optional[dt.datetime] = None,
- end_time: typing.Optional[dt.datetime] = None,
- event_subtype: typing.Optional[str] = None,
- event_subtypes: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- company_id: typing.Optional[str] = None,
- company_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- user_id: typing.Optional[str] = None,
- limit: typing.Optional[int] = None,
- offset: typing.Optional[int] = None,
- grouping: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> ListMetricCountsResponse:
- """
- Parameters
- ----------
- start_time : typing.Optional[dt.datetime]
-
- end_time : typing.Optional[dt.datetime]
-
- event_subtype : typing.Optional[str]
-
- event_subtypes : typing.Optional[typing.Union[str, typing.Sequence[str]]]
-
- company_id : typing.Optional[str]
-
- company_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
-
- user_id : typing.Optional[str]
-
- limit : typing.Optional[int]
- Page limit (default 100)
-
- offset : typing.Optional[int]
- Page offset (default 0)
-
- grouping : typing.Optional[str]
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- ListMetricCountsResponse
- OK
-
- Examples
- --------
- from schematic import Schematic
-
- client = Schematic(
- api_key="YOUR_API_KEY",
- )
- client.events.list_metric_counts()
- """
- _response = self._client_wrapper.httpx_client.request(
- "metric-counts",
- method="GET",
- params={
- "start_time": serialize_datetime(start_time) if start_time is not None else None,
- "end_time": serialize_datetime(end_time) if end_time is not None else None,
- "event_subtype": event_subtype,
- "event_subtypes": event_subtypes,
- "company_id": company_id,
- "company_ids": company_ids,
- "user_id": user_id,
- "limit": limit,
- "offset": offset,
- "grouping": grouping,
- },
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- return typing.cast(
- ListMetricCountsResponse,
- parse_obj_as(
- type_=ListMetricCountsResponse, # type: ignore
- object_=_response.json(),
- ),
- )
- if _response.status_code == 400:
- raise BadRequestError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 401:
- raise UnauthorizedError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 403:
- raise ForbiddenError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 500:
- raise InternalServerError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
- raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
-
def get_segment_integration_status(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> GetSegmentIntegrationStatusResponse:
@@ -896,6 +769,9 @@ async def main() -> None:
object_=events, annotation=typing.Sequence[CreateEventRequestBody], direction="write"
),
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1490,142 +1366,6 @@ async def main() -> None:
raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
- async def list_metric_counts(
- self,
- *,
- start_time: typing.Optional[dt.datetime] = None,
- end_time: typing.Optional[dt.datetime] = None,
- event_subtype: typing.Optional[str] = None,
- event_subtypes: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- company_id: typing.Optional[str] = None,
- company_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- user_id: typing.Optional[str] = None,
- limit: typing.Optional[int] = None,
- offset: typing.Optional[int] = None,
- grouping: typing.Optional[str] = None,
- request_options: typing.Optional[RequestOptions] = None,
- ) -> ListMetricCountsResponse:
- """
- Parameters
- ----------
- start_time : typing.Optional[dt.datetime]
-
- end_time : typing.Optional[dt.datetime]
-
- event_subtype : typing.Optional[str]
-
- event_subtypes : typing.Optional[typing.Union[str, typing.Sequence[str]]]
-
- company_id : typing.Optional[str]
-
- company_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
-
- user_id : typing.Optional[str]
-
- limit : typing.Optional[int]
- Page limit (default 100)
-
- offset : typing.Optional[int]
- Page offset (default 0)
-
- grouping : typing.Optional[str]
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- ListMetricCountsResponse
- OK
-
- Examples
- --------
- import asyncio
-
- from schematic import AsyncSchematic
-
- client = AsyncSchematic(
- api_key="YOUR_API_KEY",
- )
-
-
- async def main() -> None:
- await client.events.list_metric_counts()
-
-
- asyncio.run(main())
- """
- _response = await self._client_wrapper.httpx_client.request(
- "metric-counts",
- method="GET",
- params={
- "start_time": serialize_datetime(start_time) if start_time is not None else None,
- "end_time": serialize_datetime(end_time) if end_time is not None else None,
- "event_subtype": event_subtype,
- "event_subtypes": event_subtypes,
- "company_id": company_id,
- "company_ids": company_ids,
- "user_id": user_id,
- "limit": limit,
- "offset": offset,
- "grouping": grouping,
- },
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- return typing.cast(
- ListMetricCountsResponse,
- parse_obj_as(
- type_=ListMetricCountsResponse, # type: ignore
- object_=_response.json(),
- ),
- )
- if _response.status_code == 400:
- raise BadRequestError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 401:
- raise UnauthorizedError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 403:
- raise ForbiddenError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- if _response.status_code == 500:
- raise InternalServerError(
- typing.cast(
- types_api_error_ApiError,
- parse_obj_as(
- type_=types_api_error_ApiError, # type: ignore
- object_=_response.json(),
- ),
- )
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise core_api_error_ApiError(status_code=_response.status_code, body=_response.text)
- raise core_api_error_ApiError(status_code=_response.status_code, body=_response_json)
-
async def get_segment_integration_status(
self, *, request_options: typing.Optional[RequestOptions] = None
) -> GetSegmentIntegrationStatusResponse:
diff --git a/src/schematic/events/types/__init__.py b/src/schematic/events/types/__init__.py
index 98ac1af..5560213 100644
--- a/src/schematic/events/types/__init__.py
+++ b/src/schematic/events/types/__init__.py
@@ -9,8 +9,6 @@
from .get_segment_integration_status_response import GetSegmentIntegrationStatusResponse
from .list_events_params import ListEventsParams
from .list_events_response import ListEventsResponse
-from .list_metric_counts_params import ListMetricCountsParams
-from .list_metric_counts_response import ListMetricCountsResponse
__all__ = [
"CreateEventBatchResponse",
@@ -22,6 +20,4 @@
"GetSegmentIntegrationStatusResponse",
"ListEventsParams",
"ListEventsResponse",
- "ListMetricCountsParams",
- "ListMetricCountsResponse",
]
diff --git a/src/schematic/features/client.py b/src/schematic/features/client.py
index 80f90fc..f65b4fe 100644
--- a/src/schematic/features/client.py
+++ b/src/schematic/features/client.py
@@ -795,6 +795,9 @@ def create_feature(
"name": name,
"trait_id": trait_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1013,6 +1016,9 @@ def update_feature(
"name": name,
"trait_id": trait_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1890,6 +1896,9 @@ def update_flag_rules(
object_=rules, annotation=typing.Sequence[CreateOrUpdateRuleRequestBody], direction="write"
),
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -3060,6 +3069,9 @@ async def main() -> None:
"name": name,
"trait_id": trait_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -3294,6 +3306,9 @@ async def main() -> None:
"name": name,
"trait_id": trait_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -4237,6 +4252,9 @@ async def main() -> None:
object_=rules, annotation=typing.Sequence[CreateOrUpdateRuleRequestBody], direction="write"
),
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
diff --git a/src/schematic/plangroups/client.py b/src/schematic/plangroups/client.py
index 97dd61b..f2c0f24 100644
--- a/src/schematic/plangroups/client.py
+++ b/src/schematic/plangroups/client.py
@@ -109,17 +109,26 @@ def get_plan_group(self, *, request_options: typing.Optional[RequestOptions] = N
def create_plan_group(
self,
*,
+ add_on_ids: typing.Sequence[str],
plan_ids: typing.Sequence[str],
default_plan_id: typing.Optional[str] = OMIT,
+ trial_days: typing.Optional[int] = OMIT,
+ trial_payment_method_required: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CreatePlanGroupResponse:
"""
Parameters
----------
+ add_on_ids : typing.Sequence[str]
+
plan_ids : typing.Sequence[str]
default_plan_id : typing.Optional[str]
+ trial_days : typing.Optional[int]
+
+ trial_payment_method_required : typing.Optional[bool]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -136,6 +145,7 @@ def create_plan_group(
api_key="YOUR_API_KEY",
)
client.plangroups.create_plan_group(
+ add_on_ids=["add_on_ids"],
plan_ids=["plan_ids"],
)
"""
@@ -143,8 +153,14 @@ def create_plan_group(
"plan-groups",
method="POST",
json={
+ "add_on_ids": add_on_ids,
"default_plan_id": default_plan_id,
"plan_ids": plan_ids,
+ "trial_days": trial_days,
+ "trial_payment_method_required": trial_payment_method_required,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -207,8 +223,11 @@ def update_plan_group(
self,
plan_group_id: str,
*,
+ add_on_ids: typing.Sequence[str],
plan_ids: typing.Sequence[str],
default_plan_id: typing.Optional[str] = OMIT,
+ trial_days: typing.Optional[int] = OMIT,
+ trial_payment_method_required: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpdatePlanGroupResponse:
"""
@@ -217,10 +236,16 @@ def update_plan_group(
plan_group_id : str
plan_group_id
+ add_on_ids : typing.Sequence[str]
+
plan_ids : typing.Sequence[str]
default_plan_id : typing.Optional[str]
+ trial_days : typing.Optional[int]
+
+ trial_payment_method_required : typing.Optional[bool]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -238,6 +263,7 @@ def update_plan_group(
)
client.plangroups.update_plan_group(
plan_group_id="plan_group_id",
+ add_on_ids=["add_on_ids"],
plan_ids=["plan_ids"],
)
"""
@@ -245,8 +271,14 @@ def update_plan_group(
f"plan-groups/{jsonable_encoder(plan_group_id)}",
method="PUT",
json={
+ "add_on_ids": add_on_ids,
"default_plan_id": default_plan_id,
"plan_ids": plan_ids,
+ "trial_days": trial_days,
+ "trial_payment_method_required": trial_payment_method_required,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -411,17 +443,26 @@ async def main() -> None:
async def create_plan_group(
self,
*,
+ add_on_ids: typing.Sequence[str],
plan_ids: typing.Sequence[str],
default_plan_id: typing.Optional[str] = OMIT,
+ trial_days: typing.Optional[int] = OMIT,
+ trial_payment_method_required: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> CreatePlanGroupResponse:
"""
Parameters
----------
+ add_on_ids : typing.Sequence[str]
+
plan_ids : typing.Sequence[str]
default_plan_id : typing.Optional[str]
+ trial_days : typing.Optional[int]
+
+ trial_payment_method_required : typing.Optional[bool]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -443,6 +484,7 @@ async def create_plan_group(
async def main() -> None:
await client.plangroups.create_plan_group(
+ add_on_ids=["add_on_ids"],
plan_ids=["plan_ids"],
)
@@ -453,8 +495,14 @@ async def main() -> None:
"plan-groups",
method="POST",
json={
+ "add_on_ids": add_on_ids,
"default_plan_id": default_plan_id,
"plan_ids": plan_ids,
+ "trial_days": trial_days,
+ "trial_payment_method_required": trial_payment_method_required,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
@@ -517,8 +565,11 @@ async def update_plan_group(
self,
plan_group_id: str,
*,
+ add_on_ids: typing.Sequence[str],
plan_ids: typing.Sequence[str],
default_plan_id: typing.Optional[str] = OMIT,
+ trial_days: typing.Optional[int] = OMIT,
+ trial_payment_method_required: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpdatePlanGroupResponse:
"""
@@ -527,10 +578,16 @@ async def update_plan_group(
plan_group_id : str
plan_group_id
+ add_on_ids : typing.Sequence[str]
+
plan_ids : typing.Sequence[str]
default_plan_id : typing.Optional[str]
+ trial_days : typing.Optional[int]
+
+ trial_payment_method_required : typing.Optional[bool]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -553,6 +610,7 @@ async def update_plan_group(
async def main() -> None:
await client.plangroups.update_plan_group(
plan_group_id="plan_group_id",
+ add_on_ids=["add_on_ids"],
plan_ids=["plan_ids"],
)
@@ -563,8 +621,14 @@ async def main() -> None:
f"plan-groups/{jsonable_encoder(plan_group_id)}",
method="PUT",
json={
+ "add_on_ids": add_on_ids,
"default_plan_id": default_plan_id,
"plan_ids": plan_ids,
+ "trial_days": trial_days,
+ "trial_payment_method_required": trial_payment_method_required,
+ },
+ headers={
+ "content-type": "application/json",
},
request_options=request_options,
omit=OMIT,
diff --git a/src/schematic/plans/client.py b/src/schematic/plans/client.py
index eb4df4f..ebd57ef 100644
--- a/src/schematic/plans/client.py
+++ b/src/schematic/plans/client.py
@@ -200,6 +200,9 @@ def update_audience(
direction="write",
),
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -358,11 +361,12 @@ def list_plans(
self,
*,
company_id: typing.Optional[str] = None,
+ has_product_id: typing.Optional[bool] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- q: typing.Optional[str] = None,
plan_type: typing.Optional[ListPlansRequestPlanType] = None,
- has_product_id: typing.Optional[bool] = None,
+ q: typing.Optional[str] = None,
without_entitlement_for: typing.Optional[str] = None,
+ without_product_id: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -372,19 +376,22 @@ def list_plans(
----------
company_id : typing.Optional[str]
- ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+ has_product_id : typing.Optional[bool]
+ Filter out plans that do not have a billing product ID
- q : typing.Optional[str]
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
plan_type : typing.Optional[ListPlansRequestPlanType]
Filter by plan type
- has_product_id : typing.Optional[bool]
- Filter out plans that do not have a billing product ID
+ q : typing.Optional[str]
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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -413,11 +420,12 @@ def list_plans(
method="GET",
params={
"company_id": company_id,
+ "has_product_id": has_product_id,
"ids": ids,
- "q": q,
"plan_type": plan_type,
- "has_product_id": has_product_id,
+ "q": q,
"without_entitlement_for": without_entitlement_for,
+ "without_product_id": without_product_id,
"limit": limit,
"offset": offset,
},
@@ -527,6 +535,9 @@ def create_plan(
"name": name,
"plan_type": plan_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -718,6 +729,9 @@ def update_plan(
"icon": icon,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -876,8 +890,11 @@ def upsert_billing_product_plan(
self,
plan_id: str,
*,
- billing_product_id: str,
+ is_free_plan: bool,
+ is_trialable: bool,
+ billing_product_id: typing.Optional[str] = OMIT,
monthly_price_id: typing.Optional[str] = OMIT,
+ trial_days: typing.Optional[int] = OMIT,
yearly_price_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertBillingProductPlanResponse:
@@ -887,10 +904,16 @@ def upsert_billing_product_plan(
plan_id : str
plan_id
- billing_product_id : str
+ is_free_plan : bool
+
+ is_trialable : bool
+
+ billing_product_id : typing.Optional[str]
monthly_price_id : typing.Optional[str]
+ trial_days : typing.Optional[int]
+
yearly_price_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -910,7 +933,8 @@ def upsert_billing_product_plan(
)
client.plans.upsert_billing_product_plan(
plan_id="plan_id",
- billing_product_id="billing_product_id",
+ is_free_plan=True,
+ is_trialable=True,
)
"""
_response = self._client_wrapper.httpx_client.request(
@@ -918,9 +942,15 @@ def upsert_billing_product_plan(
method="PUT",
json={
"billing_product_id": billing_product_id,
+ "is_free_plan": is_free_plan,
+ "is_trialable": is_trialable,
"monthly_price_id": monthly_price_id,
+ "trial_days": trial_days,
"yearly_price_id": yearly_price_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -992,11 +1022,12 @@ def count_plans(
self,
*,
company_id: typing.Optional[str] = None,
+ has_product_id: typing.Optional[bool] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- q: typing.Optional[str] = None,
plan_type: typing.Optional[CountPlansRequestPlanType] = None,
- has_product_id: typing.Optional[bool] = None,
+ q: typing.Optional[str] = None,
without_entitlement_for: typing.Optional[str] = None,
+ without_product_id: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1006,19 +1037,22 @@ def count_plans(
----------
company_id : typing.Optional[str]
- ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+ has_product_id : typing.Optional[bool]
+ Filter out plans that do not have a billing product ID
- q : typing.Optional[str]
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
plan_type : typing.Optional[CountPlansRequestPlanType]
Filter by plan type
- has_product_id : typing.Optional[bool]
- Filter out plans that do not have a billing product ID
+ q : typing.Optional[str]
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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -1047,11 +1081,12 @@ def count_plans(
method="GET",
params={
"company_id": company_id,
+ "has_product_id": has_product_id,
"ids": ids,
- "q": q,
"plan_type": plan_type,
- "has_product_id": has_product_id,
+ "q": q,
"without_entitlement_for": without_entitlement_for,
+ "without_product_id": without_product_id,
"limit": limit,
"offset": offset,
},
@@ -1293,6 +1328,9 @@ async def main() -> None:
direction="write",
),
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1459,11 +1497,12 @@ async def list_plans(
self,
*,
company_id: typing.Optional[str] = None,
+ has_product_id: typing.Optional[bool] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- q: typing.Optional[str] = None,
plan_type: typing.Optional[ListPlansRequestPlanType] = None,
- has_product_id: typing.Optional[bool] = None,
+ q: typing.Optional[str] = None,
without_entitlement_for: typing.Optional[str] = None,
+ without_product_id: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1473,19 +1512,22 @@ async def list_plans(
----------
company_id : typing.Optional[str]
- ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+ has_product_id : typing.Optional[bool]
+ Filter out plans that do not have a billing product ID
- q : typing.Optional[str]
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
plan_type : typing.Optional[ListPlansRequestPlanType]
Filter by plan type
- has_product_id : typing.Optional[bool]
- Filter out plans that do not have a billing product ID
+ q : typing.Optional[str]
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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -1522,11 +1564,12 @@ async def main() -> None:
method="GET",
params={
"company_id": company_id,
+ "has_product_id": has_product_id,
"ids": ids,
- "q": q,
"plan_type": plan_type,
- "has_product_id": has_product_id,
+ "q": q,
"without_entitlement_for": without_entitlement_for,
+ "without_product_id": without_product_id,
"limit": limit,
"offset": offset,
},
@@ -1644,6 +1687,9 @@ async def main() -> None:
"name": name,
"plan_type": plan_type,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1853,6 +1899,9 @@ async def main() -> None:
"icon": icon,
"name": name,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2019,8 +2068,11 @@ async def upsert_billing_product_plan(
self,
plan_id: str,
*,
- billing_product_id: str,
+ is_free_plan: bool,
+ is_trialable: bool,
+ billing_product_id: typing.Optional[str] = OMIT,
monthly_price_id: typing.Optional[str] = OMIT,
+ trial_days: typing.Optional[int] = OMIT,
yearly_price_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> UpsertBillingProductPlanResponse:
@@ -2030,10 +2082,16 @@ async def upsert_billing_product_plan(
plan_id : str
plan_id
- billing_product_id : str
+ is_free_plan : bool
+
+ is_trialable : bool
+
+ billing_product_id : typing.Optional[str]
monthly_price_id : typing.Optional[str]
+ trial_days : typing.Optional[int]
+
yearly_price_id : typing.Optional[str]
request_options : typing.Optional[RequestOptions]
@@ -2058,7 +2116,8 @@ async def upsert_billing_product_plan(
async def main() -> None:
await client.plans.upsert_billing_product_plan(
plan_id="plan_id",
- billing_product_id="billing_product_id",
+ is_free_plan=True,
+ is_trialable=True,
)
@@ -2069,9 +2128,15 @@ async def main() -> None:
method="PUT",
json={
"billing_product_id": billing_product_id,
+ "is_free_plan": is_free_plan,
+ "is_trialable": is_trialable,
"monthly_price_id": monthly_price_id,
+ "trial_days": trial_days,
"yearly_price_id": yearly_price_id,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -2143,11 +2208,12 @@ async def count_plans(
self,
*,
company_id: typing.Optional[str] = None,
+ has_product_id: typing.Optional[bool] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
- q: typing.Optional[str] = None,
plan_type: typing.Optional[CountPlansRequestPlanType] = None,
- has_product_id: typing.Optional[bool] = None,
+ q: typing.Optional[str] = None,
without_entitlement_for: typing.Optional[str] = None,
+ without_product_id: typing.Optional[bool] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -2157,19 +2223,22 @@ async def count_plans(
----------
company_id : typing.Optional[str]
- ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
+ has_product_id : typing.Optional[bool]
+ Filter out plans that do not have a billing product ID
- q : typing.Optional[str]
+ ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
plan_type : typing.Optional[CountPlansRequestPlanType]
Filter by plan type
- has_product_id : typing.Optional[bool]
- Filter out plans that do not have a billing product ID
+ q : typing.Optional[str]
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
+
limit : typing.Optional[int]
Page limit (default 100)
@@ -2206,11 +2275,12 @@ async def main() -> None:
method="GET",
params={
"company_id": company_id,
+ "has_product_id": has_product_id,
"ids": ids,
- "q": q,
"plan_type": plan_type,
- "has_product_id": has_product_id,
+ "q": q,
"without_entitlement_for": without_entitlement_for,
+ "without_product_id": without_product_id,
"limit": limit,
"offset": offset,
},
diff --git a/src/schematic/plans/types/count_plans_params.py b/src/schematic/plans/types/count_plans_params.py
index d250925..70d9071 100644
--- a/src/schematic/plans/types/count_plans_params.py
+++ b/src/schematic/plans/types/count_plans_params.py
@@ -40,6 +40,11 @@ class CountPlansParams(UniversalBaseModel):
Filter out plans that already have a plan entitlement for the specified feature ID
"""
+ without_product_id: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter out plans that have a billing product ID
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/schematic/plans/types/list_plans_params.py b/src/schematic/plans/types/list_plans_params.py
index cc5f947..e433140 100644
--- a/src/schematic/plans/types/list_plans_params.py
+++ b/src/schematic/plans/types/list_plans_params.py
@@ -40,6 +40,11 @@ class ListPlansParams(UniversalBaseModel):
Filter out plans that already have a plan entitlement for the specified feature ID
"""
+ without_product_id: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Filter out plans that have a billing product ID
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/schematic/types/__init__.py b/src/schematic/types/__init__.py
index 6475276..701ae6e 100644
--- a/src/schematic/types/__init__.py
+++ b/src/schematic/types/__init__.py
@@ -9,14 +9,17 @@
from .billing_customer_response_data import BillingCustomerResponseData
from .billing_customer_subscription import BillingCustomerSubscription
from .billing_customer_with_subscriptions_response_data import BillingCustomerWithSubscriptionsResponseData
-from .billing_plan import BillingPlan
+from .billing_meter_response_data import BillingMeterResponseData
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_pricing import BillingProductPricing
from .billing_product_response_data import BillingProductResponseData
from .billing_subscription_response_data import BillingSubscriptionResponseData
+from .billing_subscription_view import BillingSubscriptionView
from .check_flag_output_with_flag_key import CheckFlagOutputWithFlagKey
from .check_flag_request_body import CheckFlagRequestBody
from .check_flag_response_data import CheckFlagResponseData
@@ -27,11 +30,18 @@
from .company_membership_response_data import CompanyMembershipResponseData
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 .component_capabilities import ComponentCapabilities
from .component_hydrate_response_data import ComponentHydrateResponseData
+from .component_preview_response_data import ComponentPreviewResponseData
from .component_response_data import ComponentResponseData
from .count_response import CountResponse
+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
@@ -39,13 +49,13 @@
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_req_common import CreateReqCommon
-from .create_req_common_metric_period import CreateReqCommonMetricPeriod
-from .create_req_common_value_type import CreateReqCommonValueType
from .crm_deal_line_item import CrmDealLineItem
from .crm_deal_response_data import CrmDealResponseData
from .crm_line_item_response_data import CrmLineItemResponseData
@@ -80,11 +90,12 @@
from .feature_usage_response_data_allocation_type import FeatureUsageResponseDataAllocationType
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 .metric_counts_hourly_response_data import MetricCountsHourlyResponseData
+from .meter_request_body import MeterRequestBody
from .pagination_filter import PaginationFilter
from .payment_method_request_body import PaymentMethodRequestBody
from .payment_method_response_data import PaymentMethodResponseData
@@ -97,12 +108,12 @@
from .plan_group_response_data import PlanGroupResponseData
from .plan_response_data import PlanResponseData
from .preview_object import PreviewObject
+from .preview_object_response_data import PreviewObjectResponseData
from .raw_event_batch_response_data import RawEventBatchResponseData
from .raw_event_response_data import RawEventResponseData
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_resource_response_data import RuleConditionResourceResponseData
from .rule_condition_response_data import RuleConditionResponseData
from .rule_detail_response_data import RuleDetailResponseData
from .rule_response_data import RuleResponseData
@@ -110,14 +121,16 @@
from .segment_status_resp import SegmentStatusResp
from .stripe_embed_info import StripeEmbedInfo
from .temporary_access_token_response_data import TemporaryAccessTokenResponseData
-from .update_req_common import UpdateReqCommon
-from .update_req_common_metric_period import UpdateReqCommonMetricPeriod
-from .update_req_common_value_type import UpdateReqCommonValueType
+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_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_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
@@ -134,14 +147,17 @@
"BillingCustomerResponseData",
"BillingCustomerSubscription",
"BillingCustomerWithSubscriptionsResponseData",
- "BillingPlan",
+ "BillingMeterResponseData",
"BillingPriceResponseData",
+ "BillingPriceView",
"BillingProductDetailResponseData",
"BillingProductForSubscriptionResponseData",
"BillingProductPlanResponseData",
+ "BillingProductPriceResponseData",
"BillingProductPricing",
"BillingProductResponseData",
"BillingSubscriptionResponseData",
+ "BillingSubscriptionView",
"CheckFlagOutputWithFlagKey",
"CheckFlagRequestBody",
"CheckFlagResponseData",
@@ -152,11 +168,18 @@
"CompanyMembershipResponseData",
"CompanyOverrideResponseData",
"CompanyPlanDetailResponseData",
+ "CompanyPlanWithBillingSubView",
"CompanyResponseData",
"CompanySubscriptionResponseData",
+ "ComponentCapabilities",
"ComponentHydrateResponseData",
+ "ComponentPreviewResponseData",
"ComponentResponseData",
"CountResponse",
+ "CreateEntitlementReqCommon",
+ "CreateEntitlementReqCommonMetricPeriod",
+ "CreateEntitlementReqCommonMetricPeriodMonthReset",
+ "CreateEntitlementReqCommonValueType",
"CreateEventRequestBody",
"CreateEventRequestBodyEventType",
"CreateFlagRequestBody",
@@ -164,13 +187,11 @@
"CreateOrUpdateConditionRequestBody",
"CreateOrUpdateConditionRequestBodyConditionType",
"CreateOrUpdateConditionRequestBodyMetricPeriod",
+ "CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset",
"CreateOrUpdateConditionRequestBodyOperator",
"CreateOrUpdateFlagRequestBody",
"CreateOrUpdateRuleRequestBody",
"CreateOrUpdateRuleRequestBodyRuleType",
- "CreateReqCommon",
- "CreateReqCommonMetricPeriod",
- "CreateReqCommonValueType",
"CrmDealLineItem",
"CrmDealResponseData",
"CrmLineItemResponseData",
@@ -205,11 +226,12 @@
"FeatureUsageResponseDataAllocationType",
"FlagDetailResponseData",
"FlagResponseData",
+ "GenericPreviewObject",
"InvoiceRequestBody",
"InvoiceResponseData",
"IssueTemporaryAccessTokenResponseData",
"KeysRequestBody",
- "MetricCountsHourlyResponseData",
+ "MeterRequestBody",
"PaginationFilter",
"PaymentMethodRequestBody",
"PaymentMethodResponseData",
@@ -222,12 +244,12 @@
"PlanGroupResponseData",
"PlanResponseData",
"PreviewObject",
+ "PreviewObjectResponseData",
"RawEventBatchResponseData",
"RawEventResponseData",
"RuleConditionDetailResponseData",
"RuleConditionGroupDetailResponseData",
"RuleConditionGroupResponseData",
- "RuleConditionResourceResponseData",
"RuleConditionResponseData",
"RuleDetailResponseData",
"RuleResponseData",
@@ -235,14 +257,16 @@
"SegmentStatusResp",
"StripeEmbedInfo",
"TemporaryAccessTokenResponseData",
- "UpdateReqCommon",
- "UpdateReqCommonMetricPeriod",
- "UpdateReqCommonValueType",
+ "UpdateEntitlementReqCommon",
+ "UpdateEntitlementReqCommonMetricPeriod",
+ "UpdateEntitlementReqCommonMetricPeriodMonthReset",
+ "UpdateEntitlementReqCommonValueType",
"UpdateRuleRequestBody",
"UpsertCompanyRequestBody",
"UpsertTraitRequestBody",
"UpsertUserRequestBody",
"UpsertUserSubRequestBody",
+ "UsageBasedEntitlementResponseData",
"UserDetailResponseData",
"UserResponseData",
"WebhookEventDetailResponseData",
diff --git a/src/schematic/types/billing_customer_subscription.py b/src/schematic/types/billing_customer_subscription.py
index 1e92420..38db2af 100644
--- a/src/schematic/types/billing_customer_subscription.py
+++ b/src/schematic/types/billing_customer_subscription.py
@@ -8,7 +8,11 @@
class BillingCustomerSubscription(UniversalBaseModel):
+ currency: str
expired_at: typing.Optional[dt.datetime] = None
+ interval: str
+ metered_usage: bool
+ per_unit_price: int
total_price: int
if IS_PYDANTIC_V2:
diff --git a/src/schematic/types/update_req_common.py b/src/schematic/types/billing_meter_response_data.py
similarity index 53%
rename from src/schematic/types/update_req_common.py
rename to src/schematic/types/billing_meter_response_data.py
index 168537e..973382d 100644
--- a/src/schematic/types/update_req_common.py
+++ b/src/schematic/types/billing_meter_response_data.py
@@ -1,19 +1,17 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-import typing
-from .update_req_common_metric_period import UpdateReqCommonMetricPeriod
-from .update_req_common_value_type import UpdateReqCommonValueType
from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
import pydantic
-class UpdateReqCommon(UniversalBaseModel):
- metric_period: typing.Optional[UpdateReqCommonMetricPeriod] = None
- value_bool: typing.Optional[bool] = None
- value_numeric: typing.Optional[int] = None
- value_trait_id: typing.Optional[str] = None
- value_type: UpdateReqCommonValueType
+class BillingMeterResponseData(UniversalBaseModel):
+ dispaly_name: str
+ event_name: str
+ event_payload_key: str
+ external_price_id: str
+ id: str
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/billing_price_response_data.py b/src/schematic/types/billing_price_response_data.py
index 6fe9f27..eb63251 100644
--- a/src/schematic/types/billing_price_response_data.py
+++ b/src/schematic/types/billing_price_response_data.py
@@ -7,6 +7,7 @@
class BillingPriceResponseData(UniversalBaseModel):
+ currency: str
external_price_id: str
id: str
interval: str
diff --git a/src/schematic/types/billing_price_view.py b/src/schematic/types/billing_price_view.py
new file mode 100644
index 0000000..2b1f37e
--- /dev/null
+++ b/src/schematic/types/billing_price_view.py
@@ -0,0 +1,32 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import datetime as dt
+import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BillingPriceView(UniversalBaseModel):
+ created_at: dt.datetime
+ currency: str
+ id: str
+ interval: str
+ meter_id: typing.Optional[str] = None
+ price: int
+ price_external_id: str
+ price_id: str
+ product_external_id: str
+ product_id: str
+ product_name: str
+ updated_at: dt.datetime
+ usage_type: str
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/billing_product_detail_response_data.py b/src/schematic/types/billing_product_detail_response_data.py
index c877576..0cbfad1 100644
--- a/src/schematic/types/billing_product_detail_response_data.py
+++ b/src/schematic/types/billing_product_detail_response_data.py
@@ -1,17 +1,14 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
+import datetime as dt
import typing
from .billing_price_response_data import BillingPriceResponseData
-from ..core.serialization import FieldMetadata
-import datetime as dt
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
class BillingProductDetailResponseData(UniversalBaseModel):
- prices: typing_extensions.Annotated[typing.List[BillingPriceResponseData], FieldMetadata(alias="Prices")]
account_id: str
created_at: dt.datetime
currency: str
@@ -19,6 +16,7 @@ class BillingProductDetailResponseData(UniversalBaseModel):
external_id: str
name: str
price: float
+ prices: typing.List[BillingPriceResponseData]
product_id: str
quantity: float
updated_at: dt.datetime
diff --git a/src/schematic/types/billing_product_for_subscription_response_data.py b/src/schematic/types/billing_product_for_subscription_response_data.py
index 8efc6a5..0daca31 100644
--- a/src/schematic/types/billing_product_for_subscription_response_data.py
+++ b/src/schematic/types/billing_product_for_subscription_response_data.py
@@ -8,18 +8,20 @@
class BillingProductForSubscriptionResponseData(UniversalBaseModel):
- account_id: str
created_at: dt.datetime
currency: str
environment_id: str
external_id: str
id: str
- interval: typing.Optional[str] = None
+ interval: str
+ meter_id: typing.Optional[str] = None
name: str
- price: float
+ price: int
+ price_external_id: str
quantity: float
subscription_id: str
updated_at: dt.datetime
+ usage_type: str
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/billing_product_plan_response_data.py b/src/schematic/types/billing_product_plan_response_data.py
index 516468d..cb6e43b 100644
--- a/src/schematic/types/billing_product_plan_response_data.py
+++ b/src/schematic/types/billing_product_plan_response_data.py
@@ -14,8 +14,10 @@ class BillingProductPlanResponseData(UniversalBaseModel):
account_id: str
billing_product_id: str
environment_id: str
+ is_trialable: bool
monthly_price_id: typing.Optional[str] = None
plan_id: str
+ trial_days: typing.Optional[int] = None
yearly_price_id: typing.Optional[str] = None
if IS_PYDANTIC_V2:
diff --git a/src/schematic/types/metric_counts_hourly_response_data.py b/src/schematic/types/billing_product_price_response_data.py
similarity index 67%
rename from src/schematic/types/metric_counts_hourly_response_data.py
rename to src/schematic/types/billing_product_price_response_data.py
index ab5d950..ada8f9a 100644
--- a/src/schematic/types/metric_counts_hourly_response_data.py
+++ b/src/schematic/types/billing_product_price_response_data.py
@@ -1,20 +1,23 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-import typing
import datetime as dt
+import typing
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-class MetricCountsHourlyResponseData(UniversalBaseModel):
- company_id: typing.Optional[str] = None
+class BillingProductPriceResponseData(UniversalBaseModel):
created_at: dt.datetime
- environment_id: str
- event_subtype: str
- start_time: dt.datetime
- user_id: typing.Optional[str] = None
- value: int
+ currency: str
+ id: str
+ interval: str
+ meter_id: typing.Optional[str] = None
+ price: int
+ price_external_id: str
+ product_external_id: str
+ updated_at: dt.datetime
+ usage_type: str
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/billing_product_pricing.py b/src/schematic/types/billing_product_pricing.py
index 429e86b..17810f9 100644
--- a/src/schematic/types/billing_product_pricing.py
+++ b/src/schematic/types/billing_product_pricing.py
@@ -7,10 +7,14 @@
class BillingProductPricing(UniversalBaseModel):
- interval: typing.Optional[str] = None
+ currency: str
+ interval: str
+ meter_id: typing.Optional[str] = None
price: int
- price_external_id: typing.Optional[str] = None
+ price_external_id: str
product_external_id: str
+ quantity: int
+ usage_type: str
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/billing_subscription_response_data.py b/src/schematic/types/billing_subscription_response_data.py
index 298064b..7caffd7 100644
--- a/src/schematic/types/billing_subscription_response_data.py
+++ b/src/schematic/types/billing_subscription_response_data.py
@@ -8,14 +8,20 @@
class BillingSubscriptionResponseData(UniversalBaseModel):
- """
- The created resource
- """
-
+ company_id: typing.Optional[str] = None
+ created_at: dt.datetime
+ currency: str
+ customer_external_id: str
expired_at: typing.Optional[dt.datetime] = None
- external_id: str
- id: int
- updated_at: dt.datetime
+ id: str
+ interval: str
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ period_end: int
+ period_start: int
+ status: str
+ subscription_external_id: str
+ total_price: int
+ trial_end: typing.Optional[int] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/billing_subscription_view.py b/src/schematic/types/billing_subscription_view.py
new file mode 100644
index 0000000..4965e92
--- /dev/null
+++ b/src/schematic/types/billing_subscription_view.py
@@ -0,0 +1,39 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+import datetime as dt
+from .invoice_response_data import InvoiceResponseData
+from .payment_method_response_data import PaymentMethodResponseData
+from .billing_product_for_subscription_response_data import BillingProductForSubscriptionResponseData
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class BillingSubscriptionView(UniversalBaseModel):
+ company_id: typing.Optional[str] = None
+ created_at: dt.datetime
+ currency: str
+ customer_external_id: str
+ expired_at: typing.Optional[dt.datetime] = None
+ id: str
+ interval: str
+ latest_invoice: typing.Optional[InvoiceResponseData] = None
+ metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
+ payment_method: typing.Optional[PaymentMethodResponseData] = None
+ period_end: int
+ period_start: int
+ products: typing.List[BillingProductForSubscriptionResponseData]
+ status: str
+ subscription_external_id: str
+ total_price: int
+ trial_end: typing.Optional[int] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/check_flag_output_with_flag_key.py b/src/schematic/types/check_flag_output_with_flag_key.py
index 3c21bec..77f5df1 100644
--- a/src/schematic/types/check_flag_output_with_flag_key.py
+++ b/src/schematic/types/check_flag_output_with_flag_key.py
@@ -10,6 +10,7 @@ class CheckFlagOutputWithFlagKey(UniversalBaseModel):
company_id: typing.Optional[str] = None
error: typing.Optional[str] = None
flag: str
+ flag_id: typing.Optional[str] = None
reason: str
rule_id: typing.Optional[str] = None
user_id: typing.Optional[str] = None
diff --git a/src/schematic/types/check_flag_response_data.py b/src/schematic/types/check_flag_response_data.py
index a4542b1..e18dfe5 100644
--- a/src/schematic/types/check_flag_response_data.py
+++ b/src/schematic/types/check_flag_response_data.py
@@ -13,6 +13,7 @@ class CheckFlagResponseData(UniversalBaseModel):
company_id: typing.Optional[str] = None
error: typing.Optional[str] = None
+ flag_id: typing.Optional[str] = None
reason: str
rule_id: typing.Optional[str] = None
user_id: typing.Optional[str] = None
diff --git a/src/schematic/types/company_detail_response_data.py b/src/schematic/types/company_detail_response_data.py
index 7cf03a5..9f72596 100644
--- a/src/schematic/types/company_detail_response_data.py
+++ b/src/schematic/types/company_detail_response_data.py
@@ -2,17 +2,20 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .billing_plan import BillingPlan
+from .company_plan_with_billing_sub_view import CompanyPlanWithBillingSubView
+from .billing_subscription_view import BillingSubscriptionView
import datetime as dt
from .entity_trait_detail_response_data import EntityTraitDetailResponseData
from .entity_key_detail_response_data import EntityKeyDetailResponseData
-from .preview_object import PreviewObject
+from .generic_preview_object import GenericPreviewObject
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
class CompanyDetailResponseData(UniversalBaseModel):
- add_ons: typing.List[BillingPlan]
+ add_ons: typing.List[CompanyPlanWithBillingSubView]
+ billing_subscription: typing.Optional[BillingSubscriptionView] = None
+ billing_subscriptions: typing.List[BillingSubscriptionView]
created_at: dt.datetime
entity_traits: typing.List[EntityTraitDetailResponseData]
environment_id: str
@@ -21,8 +24,8 @@ class CompanyDetailResponseData(UniversalBaseModel):
last_seen_at: typing.Optional[dt.datetime] = None
logo_url: typing.Optional[str] = None
name: str
- plan: typing.Optional[BillingPlan] = None
- plans: typing.List[PreviewObject]
+ plan: typing.Optional[CompanyPlanWithBillingSubView] = None
+ plans: typing.List[GenericPreviewObject]
traits: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
"""
A map of trait names to trait values
diff --git a/src/schematic/types/company_override_response_data.py b/src/schematic/types/company_override_response_data.py
index 61e7472..544ff21 100644
--- a/src/schematic/types/company_override_response_data.py
+++ b/src/schematic/types/company_override_response_data.py
@@ -19,11 +19,13 @@ class CompanyOverrideResponseData(UniversalBaseModel):
company_id: str
created_at: dt.datetime
environment_id: str
+ expiration_date: typing.Optional[dt.datetime] = None
feature: typing.Optional[FeatureResponseData] = None
feature_id: str
id: str
metric_period: typing.Optional[str] = None
- rule_id: str
+ metric_period_month_reset: typing.Optional[str] = None
+ rule_id: typing.Optional[str] = None
updated_at: dt.datetime
value_bool: typing.Optional[bool] = None
value_numeric: typing.Optional[int] = None
diff --git a/src/schematic/types/company_plan_detail_response_data.py b/src/schematic/types/company_plan_detail_response_data.py
index 67e14d7..63629f3 100644
--- a/src/schematic/types/company_plan_detail_response_data.py
+++ b/src/schematic/types/company_plan_detail_response_data.py
@@ -14,6 +14,7 @@
class CompanyPlanDetailResponseData(UniversalBaseModel):
audience_type: typing.Optional[str] = None
billing_product: typing.Optional[BillingProductDetailResponseData] = None
+ company_can_trial: bool
company_count: int
created_at: dt.datetime
current: bool
@@ -22,9 +23,13 @@ class CompanyPlanDetailResponseData(UniversalBaseModel):
features: typing.List[FeatureDetailResponseData]
icon: str
id: str
+ is_default: bool
+ is_free: bool
+ is_trialable: bool
monthly_price: typing.Optional[BillingPriceResponseData] = None
name: str
plan_type: str
+ trial_days: typing.Optional[int] = None
updated_at: dt.datetime
valid: bool
yearly_price: typing.Optional[BillingPriceResponseData] = None
diff --git a/src/schematic/types/billing_plan.py b/src/schematic/types/company_plan_with_billing_sub_view.py
similarity index 86%
rename from src/schematic/types/billing_plan.py
rename to src/schematic/types/company_plan_with_billing_sub_view.py
index 838042c..ae20425 100644
--- a/src/schematic/types/billing_plan.py
+++ b/src/schematic/types/company_plan_with_billing_sub_view.py
@@ -6,7 +6,8 @@
import pydantic
-class BillingPlan(UniversalBaseModel):
+class CompanyPlanWithBillingSubView(UniversalBaseModel):
+ billing_product_id: typing.Optional[str] = None
description: typing.Optional[str] = None
id: str
image_url: typing.Optional[str] = None
diff --git a/src/schematic/types/company_subscription_response_data.py b/src/schematic/types/company_subscription_response_data.py
index 38070c5..8bece2c 100644
--- a/src/schematic/types/company_subscription_response_data.py
+++ b/src/schematic/types/company_subscription_response_data.py
@@ -11,12 +11,14 @@
class CompanySubscriptionResponseData(UniversalBaseModel):
+ currency: str
customer_external_id: str
expired_at: typing.Optional[dt.datetime] = None
interval: str
latest_invoice: typing.Optional[InvoiceResponseData] = None
payment_method: typing.Optional[PaymentMethodResponseData] = None
products: typing.List[BillingProductForSubscriptionResponseData]
+ status: str
subscription_external_id: str
total_price: int
diff --git a/src/schematic/types/rule_condition_resource_response_data.py b/src/schematic/types/component_capabilities.py
similarity index 85%
rename from src/schematic/types/rule_condition_resource_response_data.py
rename to src/schematic/types/component_capabilities.py
index cd230e1..a3011e1 100644
--- a/src/schematic/types/rule_condition_resource_response_data.py
+++ b/src/schematic/types/component_capabilities.py
@@ -6,9 +6,8 @@
import pydantic
-class RuleConditionResourceResponseData(UniversalBaseModel):
- id: str
- name: str
+class ComponentCapabilities(UniversalBaseModel):
+ checkout: bool
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/component_hydrate_response_data.py b/src/schematic/types/component_hydrate_response_data.py
index ac92861..c33ef29 100644
--- a/src/schematic/types/component_hydrate_response_data.py
+++ b/src/schematic/types/component_hydrate_response_data.py
@@ -3,6 +3,8 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
from .company_plan_detail_response_data import CompanyPlanDetailResponseData
+from .usage_based_entitlement_response_data import UsageBasedEntitlementResponseData
+from .component_capabilities import ComponentCapabilities
from .company_detail_response_data import CompanyDetailResponseData
from .component_response_data import ComponentResponseData
from .feature_usage_detail_response_data import FeatureUsageDetailResponseData
@@ -14,11 +16,10 @@
class ComponentHydrateResponseData(UniversalBaseModel):
- """
- The returned resource
- """
-
+ active_add_ons: typing.List[CompanyPlanDetailResponseData]
active_plans: typing.List[CompanyPlanDetailResponseData]
+ active_usage_based_entitlements: typing.List[UsageBasedEntitlementResponseData]
+ capabilities: typing.Optional[ComponentCapabilities] = None
company: typing.Optional[CompanyDetailResponseData] = None
component: typing.Optional[ComponentResponseData] = None
feature_usage: typing.Optional[FeatureUsageDetailResponseData] = None
diff --git a/src/schematic/types/component_preview_response_data.py b/src/schematic/types/component_preview_response_data.py
new file mode 100644
index 0000000..9083ef0
--- /dev/null
+++ b/src/schematic/types/component_preview_response_data.py
@@ -0,0 +1,42 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+from .company_plan_detail_response_data import CompanyPlanDetailResponseData
+from .usage_based_entitlement_response_data import UsageBasedEntitlementResponseData
+from .component_capabilities import ComponentCapabilities
+from .company_detail_response_data import CompanyDetailResponseData
+from .component_response_data import ComponentResponseData
+from .feature_usage_detail_response_data import FeatureUsageDetailResponseData
+from .invoice_response_data import InvoiceResponseData
+from .stripe_embed_info import StripeEmbedInfo
+from .company_subscription_response_data import CompanySubscriptionResponseData
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class ComponentPreviewResponseData(UniversalBaseModel):
+ """
+ The returned resource
+ """
+
+ active_add_ons: typing.List[CompanyPlanDetailResponseData]
+ active_plans: typing.List[CompanyPlanDetailResponseData]
+ active_usage_based_entitlements: typing.List[UsageBasedEntitlementResponseData]
+ capabilities: typing.Optional[ComponentCapabilities] = None
+ company: typing.Optional[CompanyDetailResponseData] = None
+ component: typing.Optional[ComponentResponseData] = None
+ feature_usage: typing.Optional[FeatureUsageDetailResponseData] = None
+ invoices: typing.List[InvoiceResponseData]
+ stripe_embed: typing.Optional[StripeEmbedInfo] = None
+ subscription: typing.Optional[CompanySubscriptionResponseData] = None
+ upcoming_invoice: typing.Optional[InvoiceResponseData] = None
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/create_entitlement_req_common.py b/src/schematic/types/create_entitlement_req_common.py
new file mode 100644
index 0000000..13859d1
--- /dev/null
+++ b/src/schematic/types/create_entitlement_req_common.py
@@ -0,0 +1,30 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+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 ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class CreateEntitlementReqCommon(UniversalBaseModel):
+ feature_id: str
+ metered_monthly_price_id: typing.Optional[str] = None
+ metered_yearly_price_id: typing.Optional[str] = None
+ metric_period: typing.Optional[CreateEntitlementReqCommonMetricPeriod] = None
+ metric_period_month_reset: typing.Optional[CreateEntitlementReqCommonMetricPeriodMonthReset] = None
+ value_bool: typing.Optional[bool] = None
+ value_numeric: typing.Optional[int] = None
+ value_trait_id: typing.Optional[str] = None
+ value_type: CreateEntitlementReqCommonValueType
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/create_entitlement_req_common_metric_period.py b/src/schematic/types/create_entitlement_req_common_metric_period.py
new file mode 100644
index 0000000..02c5139
--- /dev/null
+++ b/src/schematic/types/create_entitlement_req_common_metric_period.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+CreateEntitlementReqCommonMetricPeriod = typing.Union[
+ typing.Literal["all_time", "billing", "current_month", "current_week", "current_day"], typing.Any
+]
diff --git a/src/schematic/types/create_entitlement_req_common_metric_period_month_reset.py b/src/schematic/types/create_entitlement_req_common_metric_period_month_reset.py
new file mode 100644
index 0000000..956e459
--- /dev/null
+++ b/src/schematic/types/create_entitlement_req_common_metric_period_month_reset.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+CreateEntitlementReqCommonMetricPeriodMonthReset = typing.Union[
+ typing.Literal["first_of_month", "billing_cycle"], typing.Any
+]
diff --git a/src/schematic/types/create_entitlement_req_common_value_type.py b/src/schematic/types/create_entitlement_req_common_value_type.py
new file mode 100644
index 0000000..5b1eff8
--- /dev/null
+++ b/src/schematic/types/create_entitlement_req_common_value_type.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+CreateEntitlementReqCommonValueType = typing.Union[
+ typing.Literal["boolean", "numeric", "trait", "unlimited"], typing.Any
+]
diff --git a/src/schematic/types/create_or_update_condition_request_body.py b/src/schematic/types/create_or_update_condition_request_body.py
index 5d36754..f8c58cf 100644
--- a/src/schematic/types/create_or_update_condition_request_body.py
+++ b/src/schematic/types/create_or_update_condition_request_body.py
@@ -5,6 +5,9 @@
import pydantic
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 ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -27,6 +30,13 @@ class CreateOrUpdateConditionRequestBody(UniversalBaseModel):
Period of time over which to measure the track event metric
"""
+ metric_period_month_reset: typing.Optional[CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset] = (
+ pydantic.Field(default=None)
+ )
+ """
+ When metric_period=current_month, specify whether the month restarts based on the calendar month or the billing period
+ """
+
metric_value: typing.Optional[int] = pydantic.Field(default=None)
"""
Value to compare the track event metric against
diff --git a/src/schematic/types/create_or_update_condition_request_body_condition_type.py b/src/schematic/types/create_or_update_condition_request_body_condition_type.py
index 852a7f3..eb620d7 100644
--- a/src/schematic/types/create_or_update_condition_request_body_condition_type.py
+++ b/src/schematic/types/create_or_update_condition_request_body_condition_type.py
@@ -3,5 +3,6 @@
import typing
CreateOrUpdateConditionRequestBodyConditionType = typing.Union[
- typing.Literal["company", "metric", "trait", "user", "plan", "billing_product", "crm_product"], typing.Any
+ typing.Literal["company", "metric", "trait", "user", "plan", "billing_product", "crm_product", "base_plan"],
+ typing.Any,
]
diff --git a/src/schematic/types/create_or_update_condition_request_body_metric_period.py b/src/schematic/types/create_or_update_condition_request_body_metric_period.py
index 4154560..f13aff9 100644
--- a/src/schematic/types/create_or_update_condition_request_body_metric_period.py
+++ b/src/schematic/types/create_or_update_condition_request_body_metric_period.py
@@ -3,5 +3,5 @@
import typing
CreateOrUpdateConditionRequestBodyMetricPeriod = typing.Union[
- typing.Literal["current_month", "current_week", "current_day"], typing.Any
+ typing.Literal["all_time", "billing", "current_month", "current_week", "current_day"], typing.Any
]
diff --git a/src/schematic/types/create_or_update_condition_request_body_metric_period_month_reset.py b/src/schematic/types/create_or_update_condition_request_body_metric_period_month_reset.py
new file mode 100644
index 0000000..1dc5451
--- /dev/null
+++ b/src/schematic/types/create_or_update_condition_request_body_metric_period_month_reset.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset = typing.Union[
+ typing.Literal["first_of_month", "billing_cycle"], typing.Any
+]
diff --git a/src/schematic/types/create_or_update_condition_request_body_operator.py b/src/schematic/types/create_or_update_condition_request_body_operator.py
index 2d9debb..431b5e4 100644
--- a/src/schematic/types/create_or_update_condition_request_body_operator.py
+++ b/src/schematic/types/create_or_update_condition_request_body_operator.py
@@ -3,5 +3,5 @@
import typing
CreateOrUpdateConditionRequestBodyOperator = typing.Union[
- typing.Literal["eq", "ne", "gt", "gte", "lt", "lte"], typing.Any
+ typing.Literal["eq", "ne", "gt", "gte", "lt", "lte", "is_empty", "not_empty"], typing.Any
]
diff --git a/src/schematic/types/create_req_common_metric_period.py b/src/schematic/types/create_req_common_metric_period.py
deleted file mode 100644
index 3f694c5..0000000
--- a/src/schematic/types/create_req_common_metric_period.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-
-CreateReqCommonMetricPeriod = typing.Union[typing.Literal["current_month", "current_week", "current_day"], typing.Any]
diff --git a/src/schematic/types/create_req_common_value_type.py b/src/schematic/types/create_req_common_value_type.py
deleted file mode 100644
index 5029608..0000000
--- a/src/schematic/types/create_req_common_value_type.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-
-CreateReqCommonValueType = typing.Union[typing.Literal["boolean", "numeric", "trait", "unlimited"], typing.Any]
diff --git a/src/schematic/types/feature_company_response_data.py b/src/schematic/types/feature_company_response_data.py
index f7437dd..4ce0335 100644
--- a/src/schematic/types/feature_company_response_data.py
+++ b/src/schematic/types/feature_company_response_data.py
@@ -6,6 +6,7 @@
from .feature_company_response_data_allocation_type import FeatureCompanyResponseDataAllocationType
from .company_detail_response_data import CompanyDetailResponseData
from .feature_detail_response_data import FeatureDetailResponseData
+import datetime as dt
from .plan_response_data import PlanResponseData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -30,6 +31,16 @@ class FeatureCompanyResponseData(UniversalBaseModel):
entitlement_id: str
entitlement_type: str
feature: typing.Optional[FeatureDetailResponseData] = None
+ metric_reset_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
+ """
+ The time at which the metric will resets.
+ """
+
+ month_reset: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ If the period is current_month, when the month resets.
+ """
+
period: typing.Optional[str] = pydantic.Field(default=None)
"""
The period over which usage is measured.
diff --git a/src/schematic/types/feature_company_user_response_data.py b/src/schematic/types/feature_company_user_response_data.py
index 6c89a1b..df34a59 100644
--- a/src/schematic/types/feature_company_user_response_data.py
+++ b/src/schematic/types/feature_company_user_response_data.py
@@ -6,6 +6,7 @@
from .feature_company_user_response_data_allocation_type import FeatureCompanyUserResponseDataAllocationType
from .company_detail_response_data import CompanyDetailResponseData
from .feature_detail_response_data import FeatureDetailResponseData
+import datetime as dt
from .plan_response_data import PlanResponseData
from .user_response_data import UserResponseData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -31,6 +32,16 @@ class FeatureCompanyUserResponseData(UniversalBaseModel):
entitlement_id: str
entitlement_type: str
feature: typing.Optional[FeatureDetailResponseData] = None
+ metric_reset_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
+ """
+ The time at which the metric will resets.
+ """
+
+ month_reset: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ If the period is current_month, when the month resets.
+ """
+
period: typing.Optional[str] = pydantic.Field(default=None)
"""
The period over which usage is measured.
diff --git a/src/schematic/types/feature_usage_response_data.py b/src/schematic/types/feature_usage_response_data.py
index fee6948..d4bd42f 100644
--- a/src/schematic/types/feature_usage_response_data.py
+++ b/src/schematic/types/feature_usage_response_data.py
@@ -5,6 +5,7 @@
import typing
from .feature_usage_response_data_allocation_type import FeatureUsageResponseDataAllocationType
from .feature_detail_response_data import FeatureDetailResponseData
+import datetime as dt
from .plan_response_data import PlanResponseData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -28,6 +29,16 @@ class FeatureUsageResponseData(UniversalBaseModel):
entitlement_id: str
entitlement_type: str
feature: typing.Optional[FeatureDetailResponseData] = None
+ metric_reset_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
+ """
+ The time at which the metric will resets.
+ """
+
+ month_reset: typing.Optional[str] = pydantic.Field(default=None)
+ """
+ If the period is current_month, when the month resets.
+ """
+
period: typing.Optional[str] = pydantic.Field(default=None)
"""
The period over which usage is measured.
diff --git a/src/schematic/types/generic_preview_object.py b/src/schematic/types/generic_preview_object.py
new file mode 100644
index 0000000..bf767ae
--- /dev/null
+++ b/src/schematic/types/generic_preview_object.py
@@ -0,0 +1,22 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class GenericPreviewObject(UniversalBaseModel):
+ description: typing.Optional[str] = None
+ id: str
+ image_url: typing.Optional[str] = None
+ name: str
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/invoice_request_body.py b/src/schematic/types/invoice_request_body.py
index 0c47639..f7f76cd 100644
--- a/src/schematic/types/invoice_request_body.py
+++ b/src/schematic/types/invoice_request_body.py
@@ -18,6 +18,7 @@ class InvoiceRequestBody(UniversalBaseModel):
payment_method_external_id: typing.Optional[str] = None
subscription_external_id: typing.Optional[str] = None
subtotal: int
+ url: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/invoice_response_data.py b/src/schematic/types/invoice_response_data.py
index b668d24..5129512 100644
--- a/src/schematic/types/invoice_response_data.py
+++ b/src/schematic/types/invoice_response_data.py
@@ -18,12 +18,13 @@ class InvoiceResponseData(UniversalBaseModel):
customer_external_id: str
due_date: typing.Optional[dt.datetime] = None
environment_id: str
- external_id: str
+ external_id: typing.Optional[str] = None
id: str
payment_method_external_id: typing.Optional[str] = None
subscription_external_id: typing.Optional[str] = None
subtotal: int
updated_at: dt.datetime
+ url: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/meter_request_body.py b/src/schematic/types/meter_request_body.py
new file mode 100644
index 0000000..0a257da
--- /dev/null
+++ b/src/schematic/types/meter_request_body.py
@@ -0,0 +1,21 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import typing
+import pydantic
+
+
+class MeterRequestBody(UniversalBaseModel):
+ display_name: str
+ event_name: str
+ event_payload_key: str
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/payment_method_request_body.py b/src/schematic/types/payment_method_request_body.py
index ae3c6ae..c31fe22 100644
--- a/src/schematic/types/payment_method_request_body.py
+++ b/src/schematic/types/payment_method_request_body.py
@@ -1,14 +1,19 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-import typing
import typing_extensions
+import typing
from ..core.serialization import FieldMetadata
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
class PaymentMethodRequestBody(UniversalBaseModel):
+ account_last_4: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="account_last4")] = None
+ account_name: typing.Optional[str] = None
+ bank_name: typing.Optional[str] = None
+ billing_email: typing.Optional[str] = None
+ billing_name: typing.Optional[str] = None
card_brand: typing.Optional[str] = None
card_exp_month: typing.Optional[int] = None
card_exp_year: typing.Optional[int] = None
diff --git a/src/schematic/types/payment_method_response_data.py b/src/schematic/types/payment_method_response_data.py
index 2f99a0f..32540cf 100644
--- a/src/schematic/types/payment_method_response_data.py
+++ b/src/schematic/types/payment_method_response_data.py
@@ -1,8 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-import typing
import typing_extensions
+import typing
from ..core.serialization import FieldMetadata
import datetime as dt
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -10,6 +10,11 @@
class PaymentMethodResponseData(UniversalBaseModel):
+ account_last_4: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="account_last4")] = None
+ account_name: typing.Optional[str] = None
+ bank_name: typing.Optional[str] = None
+ billing_email: typing.Optional[str] = None
+ billing_name: typing.Optional[str] = None
card_brand: typing.Optional[str] = None
card_exp_month: typing.Optional[int] = None
card_exp_year: typing.Optional[int] = None
diff --git a/src/schematic/types/plan_detail_response_data.py b/src/schematic/types/plan_detail_response_data.py
index 1fec9a7..5442a4a 100644
--- a/src/schematic/types/plan_detail_response_data.py
+++ b/src/schematic/types/plan_detail_response_data.py
@@ -19,9 +19,13 @@ class PlanDetailResponseData(UniversalBaseModel):
features: typing.List[FeatureDetailResponseData]
icon: str
id: str
+ is_default: bool
+ is_free: bool
+ is_trialable: bool
monthly_price: typing.Optional[BillingPriceResponseData] = None
name: str
plan_type: str
+ trial_days: typing.Optional[int] = None
updated_at: dt.datetime
yearly_price: typing.Optional[BillingPriceResponseData] = None
diff --git a/src/schematic/types/plan_entitlement_response_data.py b/src/schematic/types/plan_entitlement_response_data.py
index 314d7ee..2f87d6c 100644
--- a/src/schematic/types/plan_entitlement_response_data.py
+++ b/src/schematic/types/plan_entitlement_response_data.py
@@ -4,6 +4,7 @@
import datetime as dt
import typing
from .feature_response_data import FeatureResponseData
+from .billing_price_view import BillingPriceView
from .plan_response_data import PlanResponseData
from .entity_trait_definition_response_data import EntityTraitDefinitionResponseData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
@@ -16,9 +17,13 @@ class PlanEntitlementResponseData(UniversalBaseModel):
feature: typing.Optional[FeatureResponseData] = None
feature_id: str
id: str
+ metered_monthly_price: typing.Optional[BillingPriceView] = None
+ metered_yearly_price: typing.Optional[BillingPriceView] = None
metric_period: typing.Optional[str] = None
+ metric_period_month_reset: typing.Optional[str] = None
plan: typing.Optional[PlanResponseData] = None
plan_id: str
+ price_behavior: typing.Optional[str] = None
rule_id: str
updated_at: dt.datetime
value_bool: typing.Optional[bool] = None
diff --git a/src/schematic/types/plan_group_detail_response_data.py b/src/schematic/types/plan_group_detail_response_data.py
index a70cb69..002aa1f 100644
--- a/src/schematic/types/plan_group_detail_response_data.py
+++ b/src/schematic/types/plan_group_detail_response_data.py
@@ -12,10 +12,13 @@ class PlanGroupDetailResponseData(UniversalBaseModel):
The returned resource
"""
+ add_ons: typing.List[PlanGroupPlanDetailResponseData]
default_plan: typing.Optional[PlanGroupPlanDetailResponseData] = None
default_plan_id: typing.Optional[str] = None
id: str
plans: typing.List[PlanGroupPlanDetailResponseData]
+ trial_days: typing.Optional[int] = None
+ trial_payment_method_required: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/plan_group_plan_detail_response_data.py b/src/schematic/types/plan_group_plan_detail_response_data.py
index a9e496d..6330cd7 100644
--- a/src/schematic/types/plan_group_plan_detail_response_data.py
+++ b/src/schematic/types/plan_group_plan_detail_response_data.py
@@ -22,9 +22,12 @@ class PlanGroupPlanDetailResponseData(UniversalBaseModel):
icon: str
id: str
is_default: bool
+ is_free: bool
+ is_trialable: bool
monthly_price: typing.Optional[BillingPriceResponseData] = None
name: str
plan_type: str
+ trial_days: typing.Optional[int] = None
updated_at: dt.datetime
yearly_price: typing.Optional[BillingPriceResponseData] = None
diff --git a/src/schematic/types/plan_group_response_data.py b/src/schematic/types/plan_group_response_data.py
index c8fd682..42f74d7 100644
--- a/src/schematic/types/plan_group_response_data.py
+++ b/src/schematic/types/plan_group_response_data.py
@@ -11,9 +11,12 @@ class PlanGroupResponseData(UniversalBaseModel):
The updated resource
"""
+ add_on_ids: typing.List[str]
default_plan_id: typing.Optional[str] = None
id: str
plan_ids: typing.List[str]
+ trial_days: typing.Optional[int] = None
+ trial_payment_method_required: typing.Optional[bool] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/types/preview_object_response_data.py b/src/schematic/types/preview_object_response_data.py
new file mode 100644
index 0000000..cda4fed
--- /dev/null
+++ b/src/schematic/types/preview_object_response_data.py
@@ -0,0 +1,22 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+from ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class PreviewObjectResponseData(UniversalBaseModel):
+ description: typing.Optional[str] = None
+ id: str
+ image_url: typing.Optional[str] = None
+ name: str
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/rule_condition_detail_response_data.py b/src/schematic/types/rule_condition_detail_response_data.py
index 1b4e60e..7208eb5 100644
--- a/src/schematic/types/rule_condition_detail_response_data.py
+++ b/src/schematic/types/rule_condition_detail_response_data.py
@@ -4,7 +4,7 @@
import typing
from .entity_trait_definition_response_data import EntityTraitDefinitionResponseData
import datetime as dt
-from .rule_condition_resource_response_data import RuleConditionResourceResponseData
+from .preview_object_response_data import PreviewObjectResponseData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
@@ -20,11 +20,12 @@ class RuleConditionDetailResponseData(UniversalBaseModel):
flag_id: typing.Optional[str] = None
id: str
metric_period: typing.Optional[str] = None
+ metric_period_month_reset: typing.Optional[str] = None
metric_value: typing.Optional[int] = None
operator: str
plan_id: typing.Optional[str] = None
resource_ids: typing.List[str]
- resources: typing.List[RuleConditionResourceResponseData]
+ resources: typing.List[PreviewObjectResponseData]
rule_id: str
trait: typing.Optional[EntityTraitDefinitionResponseData] = None
trait_entity_type: typing.Optional[str] = None
diff --git a/src/schematic/types/rule_condition_response_data.py b/src/schematic/types/rule_condition_response_data.py
index 78873ea..78caf49 100644
--- a/src/schematic/types/rule_condition_response_data.py
+++ b/src/schematic/types/rule_condition_response_data.py
@@ -17,6 +17,7 @@ class RuleConditionResponseData(UniversalBaseModel):
flag_id: typing.Optional[str] = None
id: str
metric_period: typing.Optional[str] = None
+ metric_period_month_reset: typing.Optional[str] = None
metric_value: typing.Optional[int] = None
operator: str
plan_id: typing.Optional[str] = None
diff --git a/src/schematic/types/rules_detail_response_data.py b/src/schematic/types/rules_detail_response_data.py
index f068742..6c8a1cb 100644
--- a/src/schematic/types/rules_detail_response_data.py
+++ b/src/schematic/types/rules_detail_response_data.py
@@ -1,10 +1,8 @@
# This file was auto-generated by Fern from our API Definition.
from ..core.pydantic_utilities import UniversalBaseModel
-import typing_extensions
import typing
from .flag_response_data import FlagResponseData
-from ..core.serialization import FieldMetadata
from .rule_detail_response_data import RuleDetailResponseData
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
@@ -15,7 +13,7 @@ class RulesDetailResponseData(UniversalBaseModel):
The updated resource
"""
- flag: typing_extensions.Annotated[typing.Optional[FlagResponseData], FieldMetadata(alias="Flag")] = None
+ flag: typing.Optional[FlagResponseData] = None
rules: typing.List[RuleDetailResponseData]
if IS_PYDANTIC_V2:
diff --git a/src/schematic/types/stripe_embed_info.py b/src/schematic/types/stripe_embed_info.py
index 2d69907..bdd3d03 100644
--- a/src/schematic/types/stripe_embed_info.py
+++ b/src/schematic/types/stripe_embed_info.py
@@ -7,7 +7,6 @@
class StripeEmbedInfo(UniversalBaseModel):
- customer_ekey: typing.Optional[str] = None
publishable_key: str
setup_intent_client_secret: typing.Optional[str] = None
diff --git a/src/schematic/types/update_entitlement_req_common.py b/src/schematic/types/update_entitlement_req_common.py
new file mode 100644
index 0000000..bb16b08
--- /dev/null
+++ b/src/schematic/types/update_entitlement_req_common.py
@@ -0,0 +1,29 @@
+# This file was auto-generated by Fern from our API Definition.
+
+from ..core.pydantic_utilities import UniversalBaseModel
+import typing
+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 ..core.pydantic_utilities import IS_PYDANTIC_V2
+import pydantic
+
+
+class UpdateEntitlementReqCommon(UniversalBaseModel):
+ metered_monthly_price_id: typing.Optional[str] = None
+ metered_yearly_price_id: typing.Optional[str] = None
+ metric_period: typing.Optional[UpdateEntitlementReqCommonMetricPeriod] = None
+ metric_period_month_reset: typing.Optional[UpdateEntitlementReqCommonMetricPeriodMonthReset] = None
+ value_bool: typing.Optional[bool] = None
+ value_numeric: typing.Optional[int] = None
+ value_trait_id: typing.Optional[str] = None
+ value_type: UpdateEntitlementReqCommonValueType
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
diff --git a/src/schematic/types/update_entitlement_req_common_metric_period.py b/src/schematic/types/update_entitlement_req_common_metric_period.py
new file mode 100644
index 0000000..03eb778
--- /dev/null
+++ b/src/schematic/types/update_entitlement_req_common_metric_period.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+UpdateEntitlementReqCommonMetricPeriod = typing.Union[
+ typing.Literal["all_time", "billing", "current_month", "current_week", "current_day"], typing.Any
+]
diff --git a/src/schematic/types/update_entitlement_req_common_metric_period_month_reset.py b/src/schematic/types/update_entitlement_req_common_metric_period_month_reset.py
new file mode 100644
index 0000000..904a201
--- /dev/null
+++ b/src/schematic/types/update_entitlement_req_common_metric_period_month_reset.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+UpdateEntitlementReqCommonMetricPeriodMonthReset = typing.Union[
+ typing.Literal["first_of_month", "billing_cycle"], typing.Any
+]
diff --git a/src/schematic/types/update_entitlement_req_common_value_type.py b/src/schematic/types/update_entitlement_req_common_value_type.py
new file mode 100644
index 0000000..257aef6
--- /dev/null
+++ b/src/schematic/types/update_entitlement_req_common_value_type.py
@@ -0,0 +1,7 @@
+# This file was auto-generated by Fern from our API Definition.
+
+import typing
+
+UpdateEntitlementReqCommonValueType = typing.Union[
+ typing.Literal["boolean", "numeric", "trait", "unlimited"], typing.Any
+]
diff --git a/src/schematic/types/update_req_common_metric_period.py b/src/schematic/types/update_req_common_metric_period.py
deleted file mode 100644
index 700db14..0000000
--- a/src/schematic/types/update_req_common_metric_period.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-
-UpdateReqCommonMetricPeriod = typing.Union[typing.Literal["current_month", "current_week", "current_day"], typing.Any]
diff --git a/src/schematic/types/update_req_common_value_type.py b/src/schematic/types/update_req_common_value_type.py
deleted file mode 100644
index 4ef818e..0000000
--- a/src/schematic/types/update_req_common_value_type.py
+++ /dev/null
@@ -1,5 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-
-UpdateReqCommonValueType = typing.Union[typing.Literal["boolean", "numeric", "trait", "unlimited"], typing.Any]
diff --git a/src/schematic/types/create_req_common.py b/src/schematic/types/usage_based_entitlement_response_data.py
similarity index 64%
rename from src/schematic/types/create_req_common.py
rename to src/schematic/types/usage_based_entitlement_response_data.py
index 8f4a063..4240afb 100644
--- a/src/schematic/types/create_req_common.py
+++ b/src/schematic/types/usage_based_entitlement_response_data.py
@@ -2,19 +2,20 @@
from ..core.pydantic_utilities import UniversalBaseModel
import typing
-from .create_req_common_metric_period import CreateReqCommonMetricPeriod
-from .create_req_common_value_type import CreateReqCommonValueType
+from .billing_price_view import BillingPriceView
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic
-class CreateReqCommon(UniversalBaseModel):
+class UsageBasedEntitlementResponseData(UniversalBaseModel):
feature_id: str
- metric_period: typing.Optional[CreateReqCommonMetricPeriod] = None
+ metered_price: typing.Optional[BillingPriceView] = None
+ metric_period: typing.Optional[str] = None
+ metric_period_month_reset: typing.Optional[str] = None
+ price_behavior: typing.Optional[str] = None
value_bool: typing.Optional[bool] = None
value_numeric: typing.Optional[int] = None
- value_trait_id: typing.Optional[str] = None
- value_type: CreateReqCommonValueType
+ value_type: str
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/schematic/webhooks/client.py b/src/schematic/webhooks/client.py
index 02a9250..fe57151 100644
--- a/src/schematic/webhooks/client.py
+++ b/src/schematic/webhooks/client.py
@@ -38,9 +38,9 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
def list_webhook_events(
self,
*,
- webhook_id: typing.Optional[str] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ webhook_id: typing.Optional[str] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -48,12 +48,12 @@ def list_webhook_events(
"""
Parameters
----------
- webhook_id : typing.Optional[str]
-
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)
@@ -81,9 +81,9 @@ def list_webhook_events(
"webhook-events",
method="GET",
params={
- "webhook_id": webhook_id,
"ids": ids,
"q": q,
+ "webhook_id": webhook_id,
"limit": limit,
"offset": offset,
},
@@ -233,9 +233,9 @@ def get_webhook_event(
def count_webhook_events(
self,
*,
- webhook_id: typing.Optional[str] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ webhook_id: typing.Optional[str] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -243,12 +243,12 @@ def count_webhook_events(
"""
Parameters
----------
- webhook_id : typing.Optional[str]
-
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)
@@ -276,9 +276,9 @@ def count_webhook_events(
"webhook-events/count",
method="GET",
params={
- "webhook_id": webhook_id,
"ids": ids,
"q": q,
+ "webhook_id": webhook_id,
"limit": limit,
"offset": offset,
},
@@ -484,6 +484,9 @@ def create_webhook(
"request_types": request_types,
"url": url,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -680,6 +683,9 @@ def update_webhook(
"status": status,
"url": url,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -942,9 +948,9 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
async def list_webhook_events(
self,
*,
- webhook_id: typing.Optional[str] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ webhook_id: typing.Optional[str] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -952,12 +958,12 @@ async def list_webhook_events(
"""
Parameters
----------
- webhook_id : typing.Optional[str]
-
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)
@@ -993,9 +999,9 @@ async def main() -> None:
"webhook-events",
method="GET",
params={
- "webhook_id": webhook_id,
"ids": ids,
"q": q,
+ "webhook_id": webhook_id,
"limit": limit,
"offset": offset,
},
@@ -1153,9 +1159,9 @@ async def main() -> None:
async def count_webhook_events(
self,
*,
- webhook_id: typing.Optional[str] = None,
ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
q: typing.Optional[str] = None,
+ webhook_id: typing.Optional[str] = None,
limit: typing.Optional[int] = None,
offset: typing.Optional[int] = None,
request_options: typing.Optional[RequestOptions] = None,
@@ -1163,12 +1169,12 @@ async def count_webhook_events(
"""
Parameters
----------
- webhook_id : typing.Optional[str]
-
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)
@@ -1204,9 +1210,9 @@ async def main() -> None:
"webhook-events/count",
method="GET",
params={
- "webhook_id": webhook_id,
"ids": ids,
"q": q,
+ "webhook_id": webhook_id,
"limit": limit,
"offset": offset,
},
@@ -1428,6 +1434,9 @@ async def main() -> None:
"request_types": request_types,
"url": url,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)
@@ -1640,6 +1649,9 @@ async def main() -> None:
"status": status,
"url": url,
},
+ headers={
+ "content-type": "application/json",
+ },
request_options=request_options,
omit=OMIT,
)